User`s manual
XP8300/XP8400/SE1100 Advanced Programming s 87
int Poll
_
PBus
_
Node( int addr )
Returns 1 if there is a board at addr on the PLCBus, and 0 if not. The
first and third nibbles of addr must be interchanged: if the bus address
is 0x125, addr must be 0x521.
int Relay
_
Board
_
Addr( int board )
Returns the (nibble-interchanged) bus address for a relay board
identified by a logical address (0-63).
void Reset
_
Pbus()
void Reset
_
Pbus_Wait()
The function Reset
_
PBus resets the PLCBus. The function
Reset
_
PBus
_
Wait provides the necessary delay (~450 ms) for the
bus to reset.
void Set
_
PBus
_
Relay( int board, int relay,
int state )
Switches a relay on an XP8300 or XP8400 board. relay must be
from 07. state must be 1 (on) or 0 (off). board must be specified
by a logical board address (063).
DRIVERS.LIB
The functions set12adr, read12data, and write12data in
DRIVERS.LIB use 12-bit bus addresses. When using the functions in the
drivers library, swap the first and third nibbles of the address before pass-
ing the address to the function. For example, if the address is 0x125, pass
0x521.