User`s manual
XP890060 s Software Reference
int plcXP89RdCalib( int chan,
struct
_
eioAdcCalib *pCalib )
Reads the calibration structure of a D/A channel from an XP8900
Series board.
PARAMETERS: chan is the channel number, 063, of the XP8900
Series D/A channel. chan = 8*board_number + channel_number.
_
eioAdcCalib *pCalib
is a pointer to a calibration structure. Use
eioAdcDigitize to compute the actual D/A output of a given analog
value.
RETURN VALUE: 0 if the operation is successful, otherwise returns a
negative number.
LIBRARY: EZIOPBDV.LIB
int eioAdcMakeCoeff( struct _eioAdcCalib *cnvrsn,
unsigned d1, unsigned d2, float f1, float f2 )
Takes the raw values and actual values of two data points, then com-
putes the calibration coefficients (assumes linearity).
PARAMETERS: struct _eioAdcCalib *cnvrsn is a pointer to a
calibration structure that stores the coefficients.
d1 is the raw (quantized) value of the first data point.
d2 is the raw (quantized) value of the second data point.
f1 is the actual (real) value (in volts) of the first data point.
f2 is the actual (real) value (in volts) of the second data point.
RETURN VALUE: 1 if it is not possible to compute the calibration
coefficients, otherwise 0.
LIBRARY: EZIOPBDV.LIB
plcXP89RdCalib(32,&cinfo)
// read calib info of channel 0 of XP8900
// XP8900 Series board 4 into cinfo
eioAdcMakeCoeff(&cinfo,96,4000,9.97,-10.33)
// the actual value at quantized value 96 is 9.97 V
// the actual value at quantized value 4000 is -10.03 V
// compute the coefficients and put into cinfo