LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Single event inside a while loop?

It's a little difficult to understand what's going on at first, especially if you are new to Labview.  The first thing it does is goes to Macro:Initialize state which queues up several initialization routines.  THen it goes to IDLE and waits for something to happen on the UI.  

 

Basically all you need to do is drop your button on the diagram, add an event to the event structure and use that event to call a state where you run your routine.  Try to avoid having long running states with loops that never end because your UI will become unresponsive.  Rather than use loops, the state where you might want a loop should just run once and then call itself again.  It's probably a good idea to throw in a call back to the IDLE state so that it can check to see if any events are queued up (i.e. Stop Routine).  

 

aputman
0 Kudos
Message 21 of 21
(583 Views)