LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

waveform data

I've got a vi which gets data with "ai buffer read". I only want the Y
component in an array. How can I do that?
0 Kudos
Message 1 of 5
(3,284 Views)
As long as i can see, you want to extract data (1D array of Y values) from a 2D array, so you can input the array into index array function, wire the row index input as the value of the row in which your data is, and set the other input right clicking on it and selecting disable indexing, or if your data is in columns, just change the two entries.
Hope this helps
0 Kudos
Message 2 of 5
(3,284 Views)
You're only partially correct. LabVIEW 6 has a new datatype called Waveform. In the case of AI Read, index the array of waveforms returned and then wire the output to the Get Waveform Components function and then use Select Item to specify the Y array.
0 Kudos
Message 3 of 5
(3,284 Views)
There are two ways that you can get the Y component from the output of the AI Buffer Read VI.

One, you can right click on the AI Buffer Read VI and go to "Select Type". From here you can select scaled array. Now the output of AI Buffer Read will be a 2-D array each column will represent a single channel. Then you can use the array functions to get the data set of interest.

Second, you can use the Get Waveform Components found in the Functions palette under the Waveform palette. You will first need to use the Index Array function in the Array palette to select the waveform of interest. Then you can use the waveform of interest as the input to the Get Waveform Components and select the Y value for an output.

Good Luck.
0 Kudos
Message 4 of 5
(3,284 Views)
What about Get Y Value.vi? Can that be used in this case? I'm interested in both the Y and time value to send to a data file, and was looking at the Get Y Value.vi and Get Waveform Time Array.vi.

Is there a better way to get the time and Y data extracted from the AI Read to save to a file?

Thanks.
0 Kudos
Message 5 of 5
(3,284 Views)