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: 

Stop in subvi also aborts execution of mainvi

IS there any function that allows you to stop the mainvi's execution via the subvi i.e. stop the running of the program entirely?

 

Thanks

0 Kudos
Message 1 of 3
(1,979 Views)

Yes, it can be done.  There are various ways to do it (pass a control refereence to the subvi, use a Functional Global, etc.)  Please give us some more details about your specific situation.

 

 

>

"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
0 Kudos
Message 2 of 3
(1,965 Views)

There is no generic function for doing that, except the Quit LabVIEW node and it shutsdown LabVIEW completely. That will work, but like a friend of mine once said:

 

"You can sucessfully stop you car by running it into a tree -- but there can be unintended consequences..."

 

The problem is that if you quit LV in a subVI there is no orderly shutdown, execution stops immediately. And depending upon what your code is doing this can be a Very Bad Thing.

 

What exactly is it that you are wanting to accomplish? How is the program in question structured?

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 3 of 3
(1,958 Views)