LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Abort Sub VI

    All,

      What I'm trying to do here is abort a sub vi that is running an event loop. The problem is the front panel locks up while the SubVI is running and I can't generate the abort event. Code is attached. Thanks for the help.
0 Kudos
Message 1 of 5
(3,433 Views)
In your Main vi, edit the event case for the Run value change, and uncheck the checkbox next to "lock front panel until the event case for this event completes".
- tbob

Inventor of the WORM Global
0 Kudos
Message 2 of 5
(3,423 Views)
In addition to tbob's suggestion it is generally not a goood practice to put any code inside an event structure which might take longer to execute than the minimum time between events. If you run the subVI in parallel to the main VI, the main can continue to respond to its own events.

If all you are trying to do is to stop the subVI from the main VI front panel, there are much easier ways than nested loops and event structures: Notifiers, queues, occurrences, action engines, global variables, ...

Lynn
0 Kudos
Message 3 of 5
(3,407 Views)

Hi Kenneth.Miller,

You can use Emergency VI Aborter

https://decibel.ni.com/content/docs/DOC-2309

 


Best regards
Van Phu
0 Kudos
Message 4 of 5
(2,922 Views)

vanphu:

 

You are about 4 years too late in your response.  Smiley Happy  Check the date stamp.  Kenneth Miller may not still be around to read your suggestion.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 5 of 5
(2,899 Views)