Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Acquiring analog input from only selected channels in DAQmx with CVI

I'd like to know if there is a way to acquire analog inputs only from certain channel in the task, in which more input channels are created.
 
Here is what I'd like to do.
 
1. User selects Analog input channels to be read.
2. Create a task with selected analog input channels (let's say ADC0, 1, 2)
3. Start a task
4. Read only from ADC1 (for example) in the loop
 
I may read from all the channels and discard unwanted data. 
I'm wondering if there is more efficient way.
 
Thank you in advance.
 
 
0 Kudos
Message 1 of 2
(2,599 Views)

Hello slumber,

You can specify what channels you want to read by including multiple channels in the channel string.  If you want to specify channels 0, 1 and 2 for device 1 you would use channel string Dev1/ai0:2 or Dev1/ai0, Dev1/ai1, Dev1/ai2.

Now, if you wanted to only use channels 0 and 2 you would use Dev1/ai0, Dev1/ai2.  You can specify whatever channels you want to read in this format for a single device.  You just need to separate the channels by commas.

Regards,

Jesse O.
Applications Engineering
National Instruments

Jesse O. | National Instruments R&D
0 Kudos
Message 2 of 2
(2,590 Views)