From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

Is it possible to pass data from a subVI before that subVI has finished executing?

Basically this is my problem:

1.  I have a subVI which contains a loop that reads data from a device for a specified amount of time.
2.  I would like to graph this data in real time on the front panel of the main VI.

So is there a way to pass data from inside the loop of my subVI to the graph of my main VI before the subVI has finished executing, and if so how do I do this?

Thank you.
0 Kudos
Message 1 of 5
(2,599 Views)
How about using a global variable or a Queue?
0 Kudos
Message 2 of 5
(2,596 Views)
Global: If I write to a global from my subVI wouldn't it not update the graph until my main VI reads from said global and therefore wouldn't do anything until the subVI has finished executing, or am I misunderstanding you?

Queue: Please explain this approach further.
0 Kudos
Message 3 of 5
(2,593 Views)
The best way to do this is to pass a reference to your main graph or indicator to the subvi.  The subvi can then write to a value property node of the reference in real time.  Every time the property node is written to, the main indicator will be updated.
See the attached vi's for an example.
 

Message Edited by tbob on 05-07-2007 05:24 PM

- tbob

Inventor of the WORM Global
Download All
0 Kudos
Message 4 of 5
(2,590 Views)
Thank you so much.  Seems like this will work perfectly.
0 Kudos
Message 5 of 5
(2,578 Views)