08-23-2016 09:42 PM
Hi,
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.
Thanks
08-24-2016 07:08 AM
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?
08-24-2016 11:06 AM
Thanks.
I got all zeros with length of 100 - although in the DAQmx setting I have set to collect 50K data points.
08-24-2016 11:22 AM
Hello,
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.
Best,
Shamik C
Applications Engineer
National Instruments
08-24-2016 07:21 PM
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 🙂