LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Loop communication

Solved!
Go to solution

Sup guys,

Is there a way to make a VI outside a loop to take data from a VI that is inside a loop while it's running.

(My problem is that I have sub vi that has a loop inside of it and I want another VI that cannot be located inside of it to take data about the loop iteration)

You'll find a screenshot attached to this

0 Kudos
Message 1 of 6
(2,804 Views)

Look into queues, notifiers, events, or even functional global variables.  These are all common practices for transferring data between asynchronous processes

0 Kudos
Message 2 of 6
(2,796 Views)
Solution
Accepted by topic author 77maxmustermann

This is one of the standard problems in Labview. You can use for instance a shared variable, stream, notifier or queue to communicate between the loops. Here are some examples: http://zone.ni.com/reference/en-XX/help/371361N-01/lvconcepts/channel_wires_intro/

The easiest is probably to take a shared variable.

 

Message 3 of 6
(2,783 Views)

Thanks it should work

0 Kudos
Message 4 of 6
(2,780 Views)

@77maxmustermann wrote:

Is there a way to make a VI outside a loop to take data from a VI that is inside a loop while it's running.


Whatever is reading the data will also need to be in a loop of its own if you want to constantly get the updates.  If not in a loop, it will only read once.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 6
(2,777 Views)

Thanks for the warning. It's already the case

0 Kudos
Message 6 of 6
(2,753 Views)