07-24-2013 02:54 AM
Dear all,
i wrote a program in VC++ which acquires some analog voltage channels using NIDAQmx. By means of the "DAQmxCreateAIVoltageChan()" function it works properly, but I've faced a question:
When I measure a sine wave as a input channel whith diffrential terminals (pins) on NI-Device, there is no problem but if I connect the input signal in single ended form (connect input signal to each single terminal and connect GND of NI-Device and Signal generator together), there is a irrigular and alternative offset (DC value) in aqcuiered data that shows there is an error in connection of GND's. (I'm sure about function generators)
Is there any specific function to assign exactly that input data should be measured in differential or single ended form? I mean, should I write seperate codes in C++, if I want to measure input signal in both forms of differential and single ended or does the mentioned function satisfy both needs (when the answer is positive wherefrom does this fault emerge)?
Thanks a lot for your helpfully replies in advance,
sincerely yours,
Mohammad Harati
07-31-2013 03:24 AM
Hi Harati,
I'm not sure what your question is, but I have some questions too:
1) Which device are you using?
2) Did you connect the AI GND pin (in single ended)?
3) As you called DAQmxCreateAIVoltageChan(), what parameter did you set for terminalConfig in eiter cases?
Here is the documentation for DAQmxCreateAIVoltageChan()
http://zone.ni.com/reference/en-XX/help/370471W-01/daqmxcfunc/daqmxcreateaivoltagechan/
This whitepaper may also help you:
http://www.ni.com/white-paper/7113/en/
Kind regards
Heinz