LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Part of the program stops working

Solved!
Go to solution

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.

0 Kudos
Message 1 of 3
(2,612 Views)
Solution
Accepted by topic author Berkhof

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 3
(2,585 Views)

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.

0 Kudos
Message 3 of 3
(2,579 Views)