Daqcalsetconstants – Measurement Computing Data Acquisition Systems rev.10.4 User Manual
Page 142

daqCalSetConstants
Also See: daqCalGetConstants, daqCalSelectCalTable,
daqCalSelectInputSignal, daqCalSaveConstants
Format
daqCalSetConstants(handle, channel, gain, range, gainConstant,
offsetConstant)
Purpose
daqCalSetConstants
sets the user-accessible calibration constants.
Parameter Summary
Parameter Type
Description
handle DaqHandleT
Handle to the device from which ADC transfer status will be
retrieved
channel
DWORD
Channel number for which to apply the calibration settings
gain
DaqAdcGain
Gain range for which to apply the calibration settings
range
DaqAdcRangeT A/D input range for which to apply the calibration settings
gainConstant
WORD
Gain value to apply
offsetConstant SHORT
Offset value to apply
Parameter Values
handle:
obtained from the daqOpen function
channel:
a valid channel for the device
gain: s
ee ADC Gain Definition table for gain parameter definitions
range:
see table below
gainConstant:
valid values range from 0 to 65,535
offsetConstant:
valid values range from –32,768 to 32,767
Parameter Type Definitions
range-(DaqAdcRangeT)
Definition
Description
DarUni0to10V
Sets acquisition range as unipolar from 0 to +10 Volt range
DarBiMinus5to5V
Sets acquisition range as bipolar from -5 to +5 Volt range
DarUniPolarDE
Sets acquisition range as unipolar differential
DarBiPolarDE
Sets acquisition range as bipolar differential
DarUniPolarSE
Sets acquisition range as unipolar single-ended
DarBiPolarSE
Sets acquisition range as bipolar single-ended
Returns
DerrNoError
No error
Function Usage
Selecting the Calibration Constants to Retrieve
Before calling this function, the daqOpen function should be used to open the device from which the
calibration constants will be retrieved, and the daqCalSelectCalTable functions should be used to select
the calibration table from which the calibration constants will be retrieved. The internal tables are organized
into gain and calibration entries according to the channel, gain range and A/D range capabilities of the device.
The following need to be selected for each calibration gain and offset constant entries to be retrieved:
• The channel parameter should be set to the desired channel.
• The gain parameter should be set to the desired gain setting for the selected channel.
• The range parameter should be set to the desired range for the gain and channel selection.
4.3-16 Daq API Command Reference
908494
Programmer’s
Manual