07-06-2010 04:28 PM
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.
Solved! Go to Solution.
07-06-2010 06:39 PM - edited 07-06-2010 06:42 PM
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.
07-07-2010 01:55 PM
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:
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.
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