LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

launching a subvi as a separate application

I posted last week about opening a subvi in its own window and was able to do so sucessfully. But, I would actually like the subvi to run as it's own separate program, rather than as a subvi. Is there any way for me to do this?

In the main program, I have an event structure to monitor the buttons on the ui. Once I launch my subvi, the main program no longer recongizes those events, and the front panel buttons are not functional. The subvi indicates a hardware error, and I would like to be able to exit out of my main program in the case that the hardware error cannot be resolved. But my exit button doesn't work!

Thanks.
0 Kudos
Message 1 of 7
(3,327 Views)
If your main program does not need data from the output terminals of your subVI, just put your subVI outside your main while loop and set it to "open when called".
0 Kudos
Message 2 of 7
(3,320 Views)
You can also get a reference to the VI and run it using an invoke node (Can be found in the Application control palette). Set "Wait until done" to F, and your VI will continue running.

___________________
Try to take over the world!
0 Kudos
Message 3 of 7
(3,308 Views)
Thank you for the ideas. I tried using an invoke node, but I get an error that
the vi is not in a state compatible with this operation". Do you know what I need to do to the vi to get it to run?

Thanks again.
0 Kudos
Message 4 of 7
(3,301 Views)

@Kasey wrote:
Thank you for the ideas. I tried using an invoke node, but I get an error that
the vi is not in a state compatible with this operation". Do you know what I need to do to the vi to get it to run?

Thanks again.




This error message is most commonly seen when you try to run a VI that is already executing.

Calling a VI by Reference

Regards,

Matt F

0 Kudos
Message 5 of 7
(3,281 Views)
There is yet another way to deal with this situation. Set your event structure so that front panel activity is NOT locked until the event completes. Pass your sub-vi a reference to a STOP button from your calling vi. Set up your sub-vi to check the value of the control associated with this reference and exit if the control is TRUE. Then your main vi can cause the sub-vi to quit.

Rich
0 Kudos
Message 6 of 7
(3,278 Views)
Thanks for all the suggestions. I'll try them.

Kasey
0 Kudos
Message 7 of 7
(3,272 Views)