LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data synchronize when calling another VI

Solved!
Go to solution

Saying I have A.vi and B.vi, A called B. I want to display a waveform in A and B is collecting data in a while loop.

 

The question is how the waveform is updated in real-time when B is running? I tried global variables but looks like A.vi is not in thread when calling B, so the data can't pass to A in real-time.

 

Any suggestions?

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

You will want to search for "Producer/Consumer" for info on that design pattern. It consists of a Producer that shares data using an Action Engine or a queue to pass the data between the threads.

 

Another approach could make use of a control reference to the waveform display (chart or graph) and use "the "Vlaue" property to write to the display in a manner SIMILAR to just writing to the terminal.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 3
(2,308 Views)
Thanks a lot. Control reference is a greate approch and easier in my case.
0 Kudos
Message 3 of 3
(2,294 Views)