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
(3,509 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
(3,501 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: https://www.ni.com/docs/en-US/bundle/labview/page/communicating-data-between-parallel-sections-of-co...

The easiest is probably to take a shared variable.

 

Message 3 of 6
(3,488 Views)

Thanks it should work

0 Kudos
Message 4 of 6
(3,485 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
(3,482 Views)

Thanks for the warning. It's already the case

0 Kudos
Message 6 of 6
(3,458 Views)