05-09-2018 03:53 PM
Good afternoon,
I am trying to write multiple output tasks on a single (or two different) waveform graphs using DAQmx read. However, DAQmx read can only read one task. I need both tasks to be read and output to a waveform graph (in future, I will also need to write the measurements to a file).
I have attached the current vi (vi4 - modMD) below along with a picture of the error message (DAQmx Error1) that I keep receiving.
Any assistance would be appreciated.
Best,
Mike
Solved! Go to Solution.
05-09-2018 04:42 PM
First Check what device you are reading from to make sure it can do what you're asking.
Some C Series Devices , for example, could do this while others can't
Next, try reformatting your code to look more like that Here I think that this code might avoid your error.
I'm not 100% familiar with DaqMX, but that should get you started
05-09-2018 05:09 PM
Thanks ACTE-AGNE!
I am using NI PXIe-6124 (a 4 channel, 16-bit, 4 MS/s, Multi-channel DAQ device) with a NI PXIe-1082 (DAQ chassis) and BNC-2110 (terminal block). The link you mentioned does not say anything about S series devices. I did not find the help specific to S series devices (I saw this but I do not know where to find the help.). I will try to learn the code you suggested. I replied here before studying it so that others reading my question will get information about the hardware I am using.
Thanks for your help.
Best,
Mike.
05-09-2018 06:36 PM
The vi and the block diagram pic you posted don't match.
The extra AI task you added in the pic is where the trouble is. Revert back to the posted vi, and simply add the additional AI channel 3 to the existing AI task. Use the drop-down channel menu, select "Browse...", then you can use CTRL-click to select multiple channels at once.
You'll then need to change the DAQmx Read drop-down menu to choose Multiple Channels, Multiple Samples, & 1D Waveform. The array of waveforms will go cleanly into the Waveform Graph, I don't know if you might need further work to feed them to the Spectral Measurements express vi.
-Kevin P
05-10-2018 11:38 AM
Good morning,
I was able to implement the changes you suggested. It works perfectly.
Thank you very much,
Mike