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