Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Plotting data1 from LabVIEW RT and data2 from a VI running in Host PC (my comp.)

Hi,

 

I want to plot a data collected in LabVIEW RT with another data collected that is ruuning in a VI in MY Computer section in the same project. I would like to plot these two datas in a single plot. I would also suffice if I can somehow read the data generated in the VI in My Computer (Host PC) section and read it it into RT part of the code.

 

Thanks.

0 Kudos
Message 1 of 5
(4,159 Views)

Marvin,

 

Plotting two sets of data on the same plot is a simple process, so what you need to figure out is how to get the data from your RT VI over to your host VI. If you don't want to lose any data, I would suggest using network streams to transfer the data between the two VIs. Network streams are explained in detail in this White Paper:

 

http://www.ni.com/white-paper/12267/en/

 

As for plotting the data, do you know if the two data sets are going to be the same size? Are you going to plot on a chart or a graph?

 

J. Calvert

Applications Engineer

National Instruments

Message 2 of 5
(4,143 Views)

Hi Elcalverado,

 

The sampling rate of the data on the Host PC vi is slower than the sampling rate on the Real-Time data. I am plotting charts on Host VI nad graphs on RT VI. Plotting both data in charts would be ok.

 

Thanks

0 Kudos
Message 3 of 5
(4,129 Views)

Marvin,

 

In order to plot two sets of data on a waveform graph or chart, the sets need to have the same dT and the same number of elements. Otherwise, your plots will not accurately reflect your data. You would need to scale down the larger set of data to match the smaller set, in which case you would be losing data. By using an XY graph, you should be able to plot two sets with a different number of samples in each.

0 Kudos
Message 4 of 5
(4,115 Views)

Hi Elcalverado,

 

I have got the data from RT side to the Host PC side using the Network stream. Trying to plot two datas in one plot. Will update soon.

 

Thanks

0 Kudos
Message 5 of 5
(4,108 Views)