LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

No transition with infinite loop

Capture.PNG

 

Greetings people, 

 

I have a pretty basic question, I am working on this state machine architecture, but the problem is the state gets 'stuck' because of loop that iterates infinite no of times, the while loop inside the case structure is causing the trouble, when the "OK" button is pressed  the Tank starts to fill  in a continuous manner and when "OK" button is pressed again(case structure goes 'false')  it pauses (but it remains in that state forever) and no transition to next state occurs, when pressing case 3 button.

 

How do switch to next state, even though the loop runs continuously ? 

 

Kindly help.

 

0 Kudos
Message 1 of 5
(2,730 Views)
You cannot go to the next case until all the code in the current case completes.
=====================
LabVIEW 2012


0 Kudos
Message 2 of 5
(2,721 Views)

Try putting a wait statement inside that loop.  Right now it is running as fast as the CPU will allow to poll the status of that boolean.

 

I don't know why you need a loop inside a loop like that.  I think you could merge the two loops so that the true and false cases can handle the differences.

0 Kudos
Message 3 of 5
(2,719 Views)

Can you please elaborate, I did put the timer for polling, but it didn't work.. 😞 

0 Kudos
Message 4 of 5
(2,707 Views)
Ravens Fan is not suggesting that putting a wait in the loop will fix your problem. You have a wait in one loop but nothing in the other. He is just saying that you should not have a loop running full throttle if it is doing nothing but polling for someone to press a button. His suggestion to fix the problem is to merge the loops. Your case will not finish until both buttons are pressed. (going from memory here since I am posting this from my phone)
=====================
LabVIEW 2012


0 Kudos
Message 5 of 5
(2,692 Views)