I was using multiple channels of a DAQ device (NI-6002), and trying to get multiple waveforms from multiple channels.
Following instruction, I can select multiple physical channels in DAQmx, and read by using "Analog 1D Wfm NChan NSamp". After that I used index array to get waveform from different channels out. However, this did not work.
If I select only one channel, then it works perfectly. But it just refused to work with multiple channels.
A screen shot is attached, any suggestion will be very helpful.
What exactly do you mean by "this did not work"? Did you get an error? Did you just not see the data from all of the channels?
Judging from the attached picture, you should connect the task out from the configure timing VI to the task in in your Start Task VI.
It may help a little bit more to use an example code to ensure that your code functions as intended. These can be found by going to Help >> Find Examples.
Then Navigate to Hardware Input & Output >> DAQmx >> Analog Input >> whichever VI seems to work best for you.
I would recommend starting with an example code, and then modifying it as needed.
It turns out to be a data rate issue. I was running the DAQ board at full speed, this works fine for single channel; however, with more channels selected, data rate for each channel should be reduced proportionally. And this is why the code failed for multi channel.
Guess reading error message helps 🙂