User`s manual

XP8500
38 s Software Reference
int eioAdcMakeCoeff( struct
_
eioAdcCalib *cnvrsn,
unsigned d1, unsigned d2, float f1, float f2 )
Takes raw values and actual values of two data points, and computes the
calibration coefficients. The function assumes the data points are linear.
PARAMETERS: cnvrsn is a pointer to a calibration structure that
stores the coefficients.
d1 is the raw value for the first data point. d1 should be a whole
number from 0 to 4095.
d2 is the raw value for the second data point. d2 should be a whole
number from 0 to 4095.
f1 is the actual value for the first data point. f1 is a floating-point
number.
f2 is the actual value for the second data point. f2 is a floating-point
number.
RETURN VALUE: 0 if the operation is successful, 1 if the calibra-
tion coefficients cannot be computed.
LIBRARY: EZIOCMMN.LIB
int plcXP85RdCalib( int Addr,
struct _eioAdcCalib *pCalib )
Reads the calibration structure of an A/D converter channel on an
XP8500.
PARAMETERS: Addr is 16*board
_
address +
channel
_
number
. board
_
address ranges from 03, depending on
the address jumpers, and channel
_
number ranges from 010,
depending on the A/D channel number.
pCalib points to a calibration structure used to compute the actual
output for a given value.
RETURN VALUE: 0 if the operation is successful, otherwise a
negative number.
LIBRARY: EZIOPBDV.LIB