LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

graph multiple non-continous data

On my system there are four different data sources with a common timebase, however it ist not known, when data will appear. I want to display all four data in a common graph with time as x-axis. The graph should display a certain timelength and update automatically.  Any ideas?

0 Kudos
Message 1 of 11
(3,578 Views)

Hi

First,  kindly clarify this:  'Are you acquiring data from your four data sources(i assume them to be anlog) using 4 different AI reads?'

If you are doing something like this, then let me tell you that all four sources can be configured in a single task (group) and then, data can be acquired by using  single AI read.

select AI read type as ' Analog -> multiple channels -> multiple samples -> 2D double'.

Data acquired will be in form of a 2d array whose each row corresponding to one data source . This array be directly displayed on a Graph.

Looking at your requirement of "graph should display a certain timelength and update automatically", it seems like 'Chart' Display will suit your purpose better than a 'Graph' display. Select a suitable chart history length to get this effect

Note: Transpose the 2 D array data that comes out of Ai read before displaying it on the Chart.

hope this helps

regards

 

 

 

Message 2 of 11
(3,562 Views)
When a data is available build an array with 4 elements (or a cluster, it depends on which kind of graph you're using)
One element will contain the source value while the other three contain a NaN value (NaN= not a number). NaN value aren't displayed on graph/charts
Hope this helps.
regards,
manga
0 Kudos
Message 3 of 11
(3,557 Views)
I find the multiplot X/Y graph to be a great method of displaying data.  Here the input is an array (each index is a plot) and each index is a cluster of Time, Value arrays.  See the attached (LV 7.0).  It requires some thought but you can do some great stuff with the X/Y graphs.
 
Paul
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 4 of 11
(3,542 Views)
Sorry I forgot the attachment,
 
Paul
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 5 of 11
(3,542 Views)
Hi devchander,

the incoming data is from a CAN-Bus which means that the data comes in as irregular serial burst. From that I extract the signals which a want. I hope that clarifies the situation.

Regards

0 Kudos
Message 6 of 11
(3,530 Views)

Hi RichL,

Thanks for the input.

In this case, whenever you extract  data from one source, use it either to build a cluster of waveforms an plot on XY graph as Falkpl has shown, or to build a 2D array by merging that instant's data from other three sources and plotting on chart/graph.

this you can perform each time you extract data from any of the sources.

regards

Dev

 

Message 7 of 11
(3,522 Views)
Hi Devchander,

I formed a cluster of waveforms and plotted it in a chart. Works fine. Thank you!
The problem that each data is coming at a different time, but all data are displayed together, I solved by displaying the same data as long as there is no new one. Manga had proposed an NaN value while no new data is available, but I have not tried that yet.
0 Kudos
Message 8 of 11
(3,486 Views)
Hi Paul,

thanks for the input! Haven`t tried it yet. I got the graphes working by forming a cluster of the incoming data and plotting it in a chart, as devchander proposed.

Regards
Richard

0 Kudos
Message 9 of 11
(3,485 Views)
Hi Manga,

thanks for the input. I solved my problem by repeating the old value as long as there is now new one, which works fine. However your idea sounds interesting and I have to test it at some time.

Regards
Richard

0 Kudos
Message 10 of 11
(3,483 Views)