User`s manual

XP8300/XP8400/SE1100 Advanced Programming s 85
PLC_EXP.LIB
The PLC
_
EXP.LIB library supports PLCBus controllers when operating
PLCBus expansion boards. This library provides general bus functions
and specific functions for the XP8300, XP8400, XP8600, and Exp-A/D12
expansion boards.
There are four groups of functions in this library. Table D-2 lists the two
groups used by relay boards. Analogous functions exist in other libraries.
int plc
_
poll
_
node( int board )
Returns 1 if the board identified by physical address board can be
found on the PLCBus and 0 if not.
void plc
_
set
_
relay( int board, int relay,
byte state )
Switches a relay on an XP8300 or XP8400 board.
PARAMETERS: relay must be from 07 (05 on an XP8300 board).
state must be 1 (on) or 0 (off).
board must be a logical board address (063).
void Reset
_
PBus()
void rset
_
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.
int plcrel
_
addr( int board )
Returns the (nibble-interchanged) bus address for a relay board
identified by a logical address (063).
Table D-2.
PLC_EXP.LIB
Groups
Group Functions
General plc_poll_node, Reset_PBus, Reset_PBus_Wait
Relay plc_set_relay