This widget could not be displayed.
This widget could not be displayed.

LabVIEW

This widget could not be displayed.
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?

This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
0 Kudos
Message 1 of 3
(2,835 Views)

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
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
0 Kudos
Message 2 of 3
(2,829 Views)
Thanks a lot. Control reference is a greate approch and easier in my case.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
0 Kudos
Message 3 of 3
(2,815 Views)