LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how can main vi detect whether sub-vi closes after opening and running it by user?

Hi I learned more using the call by reference node function.
From what I know is that, after opening and running subvi by means of method nodes.
So after running it, "call by reference" node stays active and there is no flow of data coming out of it till it is closed.

However what if I do not want to use this "call by reference" node as I have multiple sub-vis to choose. So how does the main program detect that any one of sub-vi is closed by user?

 regards,
Clement
0 Kudos
Message 1 of 2
(2,428 Views)
Hi Clement,

first: you may run the vi with the option "wait until completion" set to false, the call-by-reference node will return promptly.

2nd:
There are many options to signal the completion of the subvi to the main vi: globals (easiest, but may lead to race conditions), LV2-style global, queues. You can even check the status of the subvi (running or not) via vi server.
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 2
(2,412 Views)