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: 

How to trigger another events during one event is running?

dear all,

i have two events. both of them are triggered by pussing two different buttuns.
one has been triggered and at running status.
right now i can't not trigger the other events. clicking the buttons doesn't give my any response.

does any one have some ideas?
thank you very much

Jack
0 Kudos
Message 1 of 4
(2,307 Views)
Hello Jack
 
When you select edit events in the context menu from the event case, a dialog appears. At the bottom is a check box which allows to lock the frontpanel until the event is executed (meaning the event case is finished). If you disable this case, the frontpanel is not locked, but the events are not handled before the event case is called for the next time. Therefore it should be placed in a loop. There are some examples in LabVIEW which might help.
If you want to trigger the second event when the first is not finished yet, you must create two separe event cases, each in an own loop. And the check box mentioned above must be off for both events.
 
I hope this helps. If not, aks again.
Greetings
shb
Message 2 of 4
(2,296 Views)
Jack,

If you have code which takes a long time to execute as a result of an event, then that code should be put in an independent (parallel) loop. Commands from the event loop can be sent to the processing loop via a queue. "Long time" in the first line can be defined as any time period longer than it takes the user to decide to push another button. Generally you want to avoid multiple event structures (see the cautions in the help files), but one event structure may have many event cases.

Look at the template for Producer/Consumer (Events) which ships with LV for an example.

Lynn
Message 3 of 4
(2,290 Views)
thank you guys...very helpfulSmiley Happy
i guess i need to avoid multiple event..:)

best,

Jack
0 Kudos
Message 4 of 4
(2,271 Views)