Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading differential analog input in .NET DAQmx

I'm not an EE, but I have to write a program in DAQmx for a PCI-6052E. One of the things I must do is acquire analog signals. I'm learning the concepts as I go, but translating them into the DAQms API is giving me a little trouble.
 
I can read individual analog inputs just fine, but I was told that two of the lines are differential to each other, i.e I am supposed to read one value that represents ai3 - ai11.
 
I saw the option for CreateVoltageChannel to use AITerminalConfiguration.Differential, but when I verify the task, I get an error that says I can't use differential mode. I didn't see any samples for how to encode the lines to read in a special way, so I used "/Dev1/ai3,/Dev1/ai11".
 
So, do I:
1- Just pass (AITerminalConfiguration)(-1), which lets DAQmx decide the right mode, and subtract the values I get?
2- Use an explicit mode (not -1) and do the same?
3- Something else?
 
Thanks much!
 
John Duddy
0 Kudos
Message 1 of 5
(3,671 Views)
Hi John,
 
When you set the terminal configuration to differential, DAQmx will automatically know what channels to read.
The way it works in differential measurement is that channels are separated by eight. For example if you are setting a measurement on ai0 , and the terminal configuration is differential, then the device will read ai0 and ai8.
In your case, only ai3 should be selected in software.
 
Please let me know if you have any further questions.
 
Regards,
Faris
Bueller
0 Kudos
Message 2 of 5
(3,648 Views)
Thanks - that will help greatly. The next complication is that I need to acquire 2 differential and one non-differential signals at the same time. Is there a way to do this in a single task? Or a way to make sure that the measurements are all from the same period?
0 Kudos
Message 3 of 5
(3,645 Views)
Nevermind - I just added another input channel. Working like a dream now.
0 Kudos
Message 4 of 5
(3,640 Views)
Glad that it worked
 
 
Best regards,
Faris
Bueller
0 Kudos
Message 5 of 5
(3,621 Views)