LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event case + while loop (controls inside loop won't update)

Solved!
Go to solution

Ok. I don't know what I'm doing wrong.

 

But when I press Start, I can't move the control slide anymore.

 

Any Obvious errors here?

Download All
0 Kudos
Message 1 of 4
(2,898 Views)

Yes. Your control will not be seen as the "start Program" event case will trigger when the button is pressed and if it is a momentary action button, when it is released. You need to create cases for the slider and the stop button for them to be seen.

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 2 of 4
(2,892 Views)
Solution
Accepted by topic author Bob123456

Bob123456 wrote:

But when I press Start, I can't move the control slide anymore.


Your event is set to lock the front panel until the event completes. This means you are deadlocked, because the event cannot complete until the stop button is pressed, which cannot happen because the FP is locked.

 

The quick "bandaid fix" would be to uncheck that option in the event configuration. Not recommended!!

 

You should never place interactive code inside event structures. Restructure your code accordingly. Look at state machines, for example.

0 Kudos
Message 3 of 4
(2,886 Views)

Here's a very quick rewrite that seems to retain your intended (slightly weird!) functionality. You can use the outer loop for everything if done right.

 

 

0 Kudos
Message 4 of 4
(2,869 Views)