Returns, Function usage – Measurement Computing Data Acquisition Systems rev.10.4 User Manual
Page 145

Returns
DerrZCInvParam
Invalid parameter value
DerrNoError
No error
For more details on error messages refer to the Daq Error Table.
Function Usage
The daqCalSetup function configures the calibration of acquisition data. It requires that all data to be
calibrated comes from consecutive channels, each configured for the same gain, polarity, and channel type.
The calibration itself can be configured to use only the gain calibration constant and not the offset constant--
this allows the offset to be removed at runtime using the zero compensation functions. The following list
describes how daqCalSetup’s parameters configure a data calibration in more detail:
The nscan parameter indicates the number of channels in the scan. (See daqAdcSetScan function for
complete details on channel scan group configuration settings).
The
readingPos parameter indicates the position within the channel scan to begin calibrating--this is
different that the startChan parameter, which indicates the beginning channel within the channel scan
group (see the daqAdcSetScan function for complete details on channel scan group configuration settings).
The
nReadings parameter indicates the number of readings to calibrate in the channel scan, starting from
the readingPos position.
The chanType parameter is a pointer to an array of length nscan; the value of each element in the array is
the channel type for the corresponding channel in the scan configuration.
The chanGain parameter is a pointer to an array of length equal to nscan; the value of each element in the
array is the channel gain for the corresponding channel in the scan configuration.
The startChan parameter indicates the channel number within the channel scan to begin calibrating—this is
different that the readingPos parameter, which indicates the beginning position within the channel scan
group (see the daqAdcSetScan function for complete details on channel scan group configuration settings).
The bipolar parameter should be true if the device whose data is being calibrated was set to bipolar mode
during the acquisition. If the device was set to unipolar mode when the data being calibrated was acquired, this
value should be false.
The noOffset parameter should be true if it is desirable to perform a gain constant calibration only. If this
value is true, the offset calibration constant will not be used and the calibration will not attempt to adjust for
offset errors. If this value is false, then the offset constant calibration will be performed and the calibration
process will attempt to adjust the data to reduce offset error.
The daqCalSetup function only configures a data calibration—the actual calibration is performed by the
daqCalConvert
function. For convenience, daqCalSetupConvert can perform both setup and
conversion.
Programmer’s Manual
908494
Daq API Command Reference 4.3-19