LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to stop the execution of a sub-vi without stopping the execution of the main vi ?

Hi,
 
I have the following problem :
 
My main vi uses a sub-vi for temperature measurements used in multitask (the sub-vi can run eight times in paralell). In this sub-vi, I have another little sub-vi which controls date/hour format written by the user of the program. On output of the sub-vi, I have a boolean which tells me if the date/hour is OK or wrong. In the case of a wrong format, I want to stop the execution of the concerned sub-vi without interrupting the entire program.
 
Is it possible ?
 
Thanks for any help you can provide.
 
S. HERVE
0 Kudos
Message 1 of 2
(2,473 Views)
Your description of your setup is not clear.  Is your subvi truly in parallel to all of your other code?  If so, then if you just need to wire the subvi to stop when your boolean changes to wrong.
 
If your subvi is in the same loop as the rest of your program and you just don't want it to run in subsequent loops use a case structure around the subvi.  In the True case (this could be false, depending upon the logic that you use) put the subvi.  Pass the value of the boolean from one iteration to the next using a shift register (make sure that you initialize the shift register in order to run on the first iteration).  The other case will be empty.  Just wire the boolean value through the case structure.
0 Kudos
Message 2 of 2
(2,468 Views)