Question

I have one larger while loop and another while loop(Loop 2) inside the other while loop. Many of the inputs and outputs are reliant on the time. When Loop 2 is inside the bigger while loop the time stops working. I think the two different stops are conflicting with each other and causing the time to stop and thus stopping all other functions. If I remove Loop 2 everything works normally. Does anyone have a fix for this? I tried connecting the bigger while loop's stop, via a local variable, to the smaller's stop-but that gives an error. This is the whole code: http://i.stack.imgur.com/KOjnQ.png

Another Question: If a lamp flickers from time to time does that mean there is something wrong in the code. I can attach a photo for this question.(http://i.stack.imgur.com/zEUsF.png)

Was it helpful?

Solution

First:
Your code is broken (none of the stop conditions of the while loops are connected).
Second:
You need to understand LabVIEW code better, the inner while loop will prevent the outer while loop to finish it's iteration. Try to run the code with Execution Highlighting (the light bulb) to see what's happening (debug).
Try to go over the tutorials in LabVIEW to get the hang of the LabVIEW language.

One solution could be to move the inner loop out the outer loop, but that depends on your requirements.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top