User Manual

ADC-20/ADC-24 User's Guide 32
Copyright © 2005-2010 Pico Technology Ltd. All rights reserved. adc20.en
5.4.15
HRDLSetAnalogInChannel
short HRDLSetAnalogInChannel(
short handle,
short channel,
short enabled,
short range,
short singleEnded )
This function enables or disables the selected analog channel. If you wish to enable
an odd-numbered channel in differential mode, you must first make sure that its
corresponding even-numbered channel is disabled. (For example, to set channel 1 to
differential mode, first ensure that channel 2 is disabled.)
Arguments
handle
Handle returned by HRDLOpenUnit.
channel
The channel that will be enabled or disabled.
ADC-20: 1 to 8
ADC-24: 1 to 16
enabled
Sets the channel active or dormant.
0: dormant
<> 0: active
range
The voltage range to be used during sampling. Applies only to
selected channel. See Voltage ranges below.
singleEnded
Non-zero to measure a single-ended voltage.
Zero for a differential voltage.
Returns
0 if failed
1 if successful
If the function fails, call HRDLGetUnitInfo with info = HRDL_SETTINGS_ERROR (8) to
obtain the specific settings error.
Voltage ranges
range
Voltage range
Availability
HRDL_2500_MV (0)
±2500 mV
ADC-20 and ADC-24
HRDL_1250_MV (1)
±1250 mV
ADC-20 and ADC-24
HRDL_625_MV (2)
±625 mV
ADC-24 only
HRDL_313_MV (3)
±312.5 mV
ADC-24 only
HRDL_156_MV (4)
±156.25 mV
ADC-24 only
HRDL_78_MV (5)
±78.125 mV
ADC-24 only
HRDL_39_MV (6)
±39.0625 mV
ADC-24 only