LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to plot one curve per graph ?

I use the AI Read VI to read data simultaneously from 4 analog inputs.
I don't want the 4 corresponding curves to be plotted on the same graph. I want to display the curves each on a different graph. How can I do it? Thank you
0 Kudos
Message 1 of 5
(2,380 Views)
Philippe,

The easiest thing to do would be to take the 2D array of data from the AI Read VI and use the "Index Array" function to extract each column of data from the 2D array. You could then send each resulting 1D column of data to separate graphs. You can read the on-line help in LabVIEW on the Index Array function for more information.

I hope this helps...good luck and have a nice day.

Darren N.
Message 2 of 5
(2,380 Views)
Your solution works great! Thank you very much for your help. Philippe
0 Kudos
Message 4 of 5
(2,380 Views)
You don't mention which version of LabVIEW that you're using but the process for both is similar. AI Read returns a 1D array of waveform data types. Just use the index array function four times with the constants 0,1,2,3 wired to the index input and you'll get four separate arrays that you wire to four separate graphs. In LabVIEW, the only difference is that AI Read returns a 2D array. In that case, you use an index array function two index inputs. Disable indexing on the first input (row/scan#) and wire your constant to the second index input (column/channel).
Message 3 of 5
(2,380 Views)
I use LabView 6.1. The Index Array VI works perfectly.
Thank you very much. Philippe
0 Kudos
Message 5 of 5
(2,380 Views)