Please help with a Mixing Machine


hey guys , gals, need write little application , not know start nor finish.  

we have old ingredient mixer in plant 100% manual. right operator checks ingredient tables , mixing times , starts , stops process push button (you push once , starts , push again , stops) , check times watch.  we  are producing 12 different recipes in mixer, each recipe need number of ingredients , mixing times.  

here actual example of process 1 recipe:

recipe 1

  • pour ingredient 1 mixer
  • check watch , start machine (push start/stop push-button)
  • mix x amount of time
  • stop machine (push start/stop push-button)
  • pour ingredient 2 mixer
  • check watch , start machine (push start/stop push-button)
  • mix y amount of time
  • stop machine (push start/stop push-button)
  • pour ingredient 3 mixer
  • check watch , start machine (push start/stop push-button)
  • mix z amount of time
  • stop machine (push start/stop push-button)

some recipes require 3 ingredients, 12 , 13.  the mixing times varies too.

i wanted use plc our budget limited, decided go arduino , few electronic components have.

what is:


  • operator select recipe 1 12 using rotary switch.
  • pour ingredient 1 mixer
  • push arduino push-button start
  • mixer stop automatically
  • pour ingredient 2 mixer
  • push arduino push-button start
  • mixer stop automatically
  • pour ingredient 3 mixer
  • push arduino push-button start
  • mixer stop automatically
  • led on indicate process completed


the hardware
i'm using rotary switch (to select 1 of 12 recipes) on a0, push-button on input d5, mixer control on output d6 , output d7 connected led indicate when process finish.

can please give me hand , show me way structure body of program....  a link or example welcome too...

thanks lot

you can use if statements.  here outline of 1 possible solution.
if(recipe==1){
    if (ingredient == 1){
         if (button pressed){
              turn machine on;
              delay(time);
              ingredient=2;
   } else if (ingredient==2){
        if(button pressed){
            turn machine on;
            delay(2000);
            ingredient=3;

then @ end of last step reset 'ingredient' 1.


Arduino Forum > Forum 2005-2010 (read only) > Software > Syntax & Programs > Please help with a Mixing Machine


arduino

Comments

Popular posts from this blog

CAN'T INSTALL MAMBELFISH 1.5 FROM DIRECTORY - Joomla! Forum - community, help and support

error: expected initializer before 'void'

CPU load monitoring using GPIO and leds - Raspberry Pi Forums