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: 

running multiple user interface events

Solved!
Go to solution

I created a LabView VI using the "User Interface Event Handler" template.

 

While one command (event) is executing, I would like to be able to process and execute additional user events.

 

For example, button 1 executes a power interrupt by sending a power off command to the remote device, waits 10 seconds, then sends a power on command.

 

While I am waiting 10 seconds to execute the ''power on' command, I'd like to be able to run 'button 2' and so on.

 

Thanks for your help...

0 Kudos
Message 1 of 3
(2,836 Views)
Solution
Accepted by topic author jonwang

This is often done by having another loop that handles the "long" events.  Use a queue to send the message to this loop.  Then the event handling loop can service the other events.

 

Another option is to dynamically call a VI to run asynchonrously so that its running happens in parallel with everything else.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 3
(2,827 Views)

Thank you.

0 Kudos
Message 3 of 3
(2,820 Views)