05-20-2016 06:43 PM - edited 05-20-2016 07:01 PM
Hello fellow labviewers!
Newby here!
So im writing a program for an (crappy homemade out of broken pieces) industrial coffeemachine. It works perfectly fine but there is one kink: the program that makes sure there is enough water and that the water is heated properly turns itself of when the part that makes the coffee is turned on. After the coffee is made the program continues just fine.
This is not really a big deal, but for the sake of learning proper labview id like to know what im doing wrong.
Why cant you run multiple case selectors + while loops and why does my program stop running when this happens?
Thanks in advance!
Oh in the program i removed the hardware sensors /outputs and put in some random data for the sake of convinient testing.
Solved! Go to Solution.
05-20-2016 08:24 PM
Data flow. You have a loop inside of the case structure. The main loop cannot iterate until EVERYTHING has completed. This includes that inner loop. So while that inner loop is running, everything else is stuck waiting for the main loop to iterate (from what I can tell 8 seconds!).
Instead of an inner loop, keep a count in a shift register on the main loop. You can do your comparisons as you already have, just with the value stored in the shift register. You will also have to iterate the value yourself instead of relying on the i.
05-20-2016 08:28 PM
Ahhhh ofcourse. The while loop in the loop needs to finish causing everything to wait. So i can either use a shift register or (if possible) use a seperate parralel while loop.
Thank you so much!
Kind regard.