User`s manual

XP8900 Software Reference s 57
long int eioErrorCode
Represents a global bit-mapped variable whose flags reflect error
occurrences.
This register for this variable is initially set to 0. If the application tries
to access an invalid channel, the flag EIO_NODEV (the first bit flag) is
set in this register. Note that the other bits in EIO_NODEV deal with
networked controllers.
Address Target Board
int plcXP89Init( int Addr )
Initializes XP8900 Series board. Call this function before using the
other plcXP89 functions. This function also initializes the XP8900
Series D/A converters to tristate their outputs. Call plcXP89Sw to turn
the voltage reference on. The first plcXP89Out call enables the output
of the corresponding D/A converter channel. Both the voltage refer-
ence and the D/A converter channel must be set up correctly to get the
proper output.
PARAMETER: Addr is the logical address, 07, of the board set by
jumpers.
RETURN VALUE: 1 if the board cannot be found, 0 if the initializa-
tion is completed.
LIBRARY: EZIOPBDV.LIB
void main(void){
plcBusReset(); // reset the PLCBus
if(plcXP89Init(4)){
...
} else {
...
}
}