Hello All:
I'm trying to read a current channel and voltage channel on Analog channels of the 6023E card using VB.
'Code to read the current channel.
DAQmxErrChk DAQmxCreateAICurrentChan(taskHandleCH0, "Dev1/ai0", "", _
DAQmx_Val_InputTermCfg_RSE, dblCH0_Min, dblCH0_Max / dblCH0_Multiplier, DAQmx_Val_CurrentUnits1_Amps, _
DAQmx_Val_CurrentShuntResistorLocation1_External, 0.1, "")
'Read in one sample from the analog input channel.
DAQmxErrChk DAQmxReadAnalogScalarF64(taskHandleCH0, 10#, data, ByVal 0&)
'Display the acquired sample on the user interface
txtCH(0).Text = CStr(Math.Round(data * dblCH0_Multiplier + dblCH0_Offset, dblCH0_Precision))
'Code to read the Voltage channel.
DAQmxErrChk DAQmxCreateAIVoltageChan(taskHandleCH3, "Dev1/ai3", "", _
DAQmx_Val_InputTermCfg_RSE, dblCH3_Min, dblCH3_Max / dblCH3_Multiplier, DAQmx_Val_VoltageUnits1_Volts, "")
'Read in one sample from the analog input channel.
DAQmxErrChk DAQmxReadAnalogScalarF64(taskHandleCH3, 10#, data, ByVal 0&)
'Display the acquired sample on the user interface
txtCH(1).Text = CStr(Math.Round(data * dblCH3_Multiplier + dblCH3_Offset, dblCH3_Precision))
I can read the voltage channel correctly but, I get a constant current value back which is not right.
I am trying to read the current in microAmps range. Please let me know what is wrong with the code.
Thanks.