LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Wait vi end

Solved!
Go to solution

Hello,

 

I have a started many vi using "Start ASynchrounous call" and build an array of vi reference.

 

At the end of my main vi, i'd like to wait for each vi end before releasing some common resources.

 

At first i try to use "Wait on Asynchronous Call" on each vi reference, but my issue is that each vi reference are not of the same type.

 

Is there another way to wait for the end of a vi execution whatever type is my vi reference ?

 

Thanks,

Guillaume

0 Kudos
Message 1 of 3
(2,066 Views)
Solution
Accepted by topic author basteo

Data communication->Synchronization pallette.

There are several possibilities, e.g. Rendevous by which all processes will wait to exit, or Occurence, which you can loop through until all have created one.

With Occurence and assuming you spawn 6 calls, set a for loop of 6 recieve occurences to wait after the spawns. Let all sub vi's exit and signal an occurence as they exit.

 

What way you'll wait until you've recieved all 6 occurences.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 3
(2,059 Views)

Thank you. I manage with a queue, waiting for a queue size.

It looks similar to the occurence behaviour.

 

I keep sad there is not an external mechanism to check a vi state, but now my application is working.

 

Thank you a lot,

 

Guillaume

 

 

0 Kudos
Message 3 of 3
(2,049 Views)