LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can the indicator changing of a subVI be seen in the main VI before it finish its execution?

Hi all,
 
Usually the output indicator of a subVI are seen by the main VI after it finish its execution.
Is it possible send out the indicator value just when it change and before the end of the the subVI execution?
Usually if during the subVI a variable changes more times just the last value is seen by the main VI. I need that all the changings were seen by the MainVI.
 
Thanks Nicola
0 Kudos
Message 1 of 7
(3,018 Views)

There are quite  a few methods to achieve this.

The simplest is to create a Global Variable.

Write into the global variable in sub VI, read it and display its value on the Main VI

 

Message 2 of 7
(3,016 Views)

Thanks for you answer,

Could you suggest me the other methods too?

Thanks Ius

0 Kudos
Message 3 of 7
(3,008 Views)
As Dev mentionned, Globals is one way.
 
Using References is another method.  However, it has to be designed almost before creating the sub-vi.  Although the sub-vi can be modified to support it.
 
I use References for things like a progress bar that is shown on the Front Panel of a main vi, but gets it's values from a sub-vi.
 
I will look for example code that was posted a while ago..
 
RayR
0 Kudos
Message 4 of 7
(3,001 Views)

Since we're discussing alternative methods:

"You could also use datasocket to accomplish this. If your two applications are compiled executables, then references or globals may not be an option."

0 Kudos
Message 5 of 7
(2,997 Views)

Here is an example that was done by rpursely8 a while ago.  It contains both Globals & one form of references (see Third).

 

0 Kudos
Message 6 of 7
(2,993 Views)