Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

PCI-6225 analog inputs... err -200077 for differential inputs

Hello,
 
Using a PCI-6225 card with two SCB-68 terminal boxes I wish to connect 40 differential inputs.  Here is my LabWindows CVI code:
 
// Create tasks.
DAQmxCreateTask (NULL, &AI_upper_handle_0);
DAQmxCreateTask (NULL, &AI_upper_handle_1);
DAQmxCreateTask (NULL, &AI_upper_handle_2);
DAQmxCreateTask (NULL, &AI_upper_handle_3);
DAQmxCreateTask (NULL, &AI_upper_handle_4);
DAQmxCreateTask (NULL, &AI_upper_handle_5);

// Create analong input channels.
(1)  DAQmxCreateAIVoltageChan (AI_upper_handle_0, "Dev1/ai0:39", NULL, DAQmx_Val_Diff, -5.0, 5.0,
       DAQmx_Val_Volts, NULL);
       
(2)  DAQmxCreateAIVoltageChan (AI_upper_handle_1, "Dev1/ai0:7", NULL, DAQmx_Val_Diff, -5.0, 5.0,
       DAQmx_Val_Volts, NULL);
(3)  DAQmxCreateAIVoltageChan (AI_upper_handle_2, "Dev1/ai8:15", NULL, DAQmx_Val_Diff, -5.0, 5.0,
       DAQmx_Val_Volts, NULL);
(4)  DAQmxCreateAIVoltageChan (AI_upper_handle_3, "Dev1/ai16:23", NULL, DAQmx_Val_Diff, -5.0, 5.0,
       DAQmx_Val_Volts, NULL);
(5)  DAQmxCreateAIVoltageChan (AI_upper_handle_4, "Dev1/ai24:31", NULL, DAQmx_Val_Diff, -5.0, 5.0,
       DAQmx_Val_Volts, NULL);
(6)  DAQmxCreateAIVoltageChan (AI_upper_handle_5, "Dev1/ai32:39", NULL, DAQmx_Val_Diff, -5.0, 5.0,
       DAQmx_Val_Volts, NULL); 
 
Ideally I would use (1) to create an analog input voltage channel for all 40 channels.  However this function returns error -200077 which says "requested value is not supported value of this property" in regard to the differential parameter.  See attached image of error message.
 
So onto plan B.... using (2) does not produce any errors and I am able to go on and read analog values.  However (3) produces the same error as previously mentioned.  (4) is okay, (5) produces the error and (6) is okay. 
 
It seems as though the analog inputs on ports 1, 3, 5 are unhappy.  I tried to configure just a single channel within these ports, such as "Dev1/ai8" and receive the same error.
 
Why is CVI unhappy about differential inputs on the odd numbered ports?
 
Thanks,
Aaron
0 Kudos
Message 1 of 3
(4,288 Views)
When you use differential mode, channels 0 through 7 are paired with channels 8 through 15. Channels 16 through 23 are paired with channels 24 through 31, etc. Try Dev1ai0:7, Dev1ai16:23, Dev1ai32:39,Dev1ai48:55,Dev1ai64:71.
Message 2 of 3
(4,279 Views)
Thank you for the quick reply Dennis!  I implemented the source code as you proposed and all is well.
 
- Aaron
0 Kudos
Message 3 of 3
(4,213 Views)