0

I am using NI USB-6289 to measure two channels (A and B) analog input voltage at the same time with PyDAQmx. The range of Channel A's input is (-0.1, 0.1). While Channel B is (-5.0, 5.0). We found the value of channel A is not accurate. BTW, the voltage channels set as below, is there someone meet the similar issue? Thanks!

DAQmxCreateAIVoltageChan(taskHandle,"Dev1/ai16","",DAQmx_Val_Cfg_Default,-0.1,0.1,DAQmx_Val_Volts,NULL)
DAQmxCreateAIVoltageChan(taskHandle,"Dev1/ai24","",DAQmx_Val_Cfg_Default,-5.0,5.0,DAQmx_Val_Volts,NULL)
Soner Gönül
  • 97,193
  • 102
  • 206
  • 364
limin
  • 1
  • 1

1 Answers1

1

What you describe sounds a little like ghosting [1], where one channel affects another. Typically, this happens when two or more channels have very different electrical signals connected to them, but it can also happen when two or more channels have very different gains, which is closer to your problem.

To eliminate ghosting, read a grounded channel before each desired channel. In your example, you're reading from ai16 and ai24, so you can read from _aignd_vs_aignd [2] before each channel to dissipate the residual charge from the previous channel.

DAQmxCreateAIVoltageChan(taskHandle,"Dev1/_aignd_vs_aignd","",DAQmx_Val_Cfg_Default,-0.1,0.1,DAQmx_Val_Volts,NULL)
DAQmxCreateAIVoltageChan(taskHandle,"Dev1/ai16","",DAQmx_Val_Cfg_Default,-0.1,0.1,DAQmx_Val_Volts,NULL)
DAQmxCreateAIVoltageChan(taskHandle,"Dev1/_aignd_vs_aignd","",DAQmx_Val_Cfg_Default,-5.0,5.0,DAQmx_Val_Volts,NULL)
DAQmxCreateAIVoltageChan(taskHandle,"Dev1/ai24","",DAQmx_Val_Cfg_Default,-5.0,5.0,DAQmx_Val_Volts,NULL)

If you're not affected by ghosting, there are several other causes for unexpected data [3], and perhaps a cabling change or fix will help.

References

[1] How Do I Eliminate Ghosting from My Measurements?
http://digital.ni.com/public.nsf/allkb/73CB0FB296814E2286256FFD00028DDF

[2] NI-DAQmx Internal Channels for Self-Diagnostics and Self-Calibration
http://digital.ni.com/public.nsf/allkb/5826DD1B3709DBCA86256E2B00805C3D

[3] Troubleshooting Unexpected Voltages, Floating, or Crosstalk on Analog Input Channels
http://digital.ni.com/public.nsf/allkb/B9BCDFD960C06B9186256A37007490CD

Joe Friedrichsen
  • 1,976
  • 14
  • 14