Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

data manipulation with multiple readings

Solved!
Go to solution

Hi again,

 

So I can read voltages off the terminals from NI USB-6009. Now let A be the reading from analog1 and B be the reading from analog2. Say I want to calculate something like 2*A-B. I can't figure out how to do that.

 

I can read the values together and show them on the same chart but I can't process them. I'm attaching the file in which I read the values, put them through some filters and then display. But "data" is only a single variable although there are two readings in it. I don't know how to separate one from the other.

 

Thanks for the help.

Download All
0 Kudos
Message 1 of 3
(2,830 Views)

It looks like you are using express vi's. These use a dynamic data type. Try using the split signals function under express>>signal manipulation on the functions palette. Then you will probably need to use the From DDT to get to your actual waveform components.

Now Using LabVIEW 2019SP1 and TestStand 2019
0 Kudos
Message 2 of 3
(2,814 Views)
Solution
Accepted by topic author cartonn30gel

cartonn30gel,

 

The DAQmx read is returning an array of waveforms, each element of the array represents one channel of data.

 

To split the individual channels out, use the Index Array primitive found in the Array Palette:

 

18305i3B7B74E536528765

 

You can then use the regular numeric operations on the waveform, or if all you care about is the actual readings you can get the array of measured voltages from the waveform by using the Get Waveform Components primitive found in the Waveform Palette.

 

18307iBA58D190C27E0EEB

 

Thicker wires in LabVIEW represent arrays which contain multiple similar elements.  The Waveform data type is a convenient way to handle measurement data since it combines a time information (t0 and dt) with the array of measured data (Y).

 

Hope this helps.

 

Simon 

0 Kudos
Message 3 of 3
(2,791 Views)