From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event Structure

Hi,

 

I am learning how to use an event structure with state machine. The state machine is able to go from state to state when the "wifi module" boolean is pressed. However the program hangs after I press the "stop" button when the "wifi module" boolean is executing. May I know how to stop the program when the wifi module is executing? 

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

A couple major problems.

 

1.  Your event structure isn't in a while loop.  So it will only execute one time.

2.  Your events are set to lock the front panel until the event case is complete.  So if it can't execute a second time because there is no while loop, the next event that gets triggered will lock the front panel, and the event case will never complete because it is no longer in the path of execution.

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

Hi, 

What does it mean by "lock the front panel" ?

I have added a while loop to the event strucuture. How do I let the program continue to flow even if there is no event?

Download All
0 Kudos
Message 3 of 4
(2,611 Views)

Right click on an event and pick Edit Events handle by this case.  Then look at the checkboxes at the lower middle of the dialog box.  Be sure to click on help.

 

You should also read Caveats and Recommendations when Using Events in LabVIEW - LabVIEW 2015 Help

 



I have added a while loop to the event strucuture. How do I let the program continue to flow even if there is no event?


How did you expect it to continue before?

 

Looking at your state machine in the lower half, I don't understand the logic you have in there.  It is very odd how you have the multiple embedded case structures.  But the code doesn't seem to really do anything and looks more like a proof of concept.  So I'm not going to spend time trying to decode that logic.

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