User`s manual
XP8600 Software Reference s 31
Address Target Board
int plcXP86Init( int Addr )
Initializes and turns on XP8600. Call this function before calling
plcXP86Out.
PARAMETERS: Addr is the logical address of the board set by
jumpers, and ranges from 07. With special PALs, the address can
range from 063.
RETURN VALUE: 1 if the board cannot be found, 0 if the initializa-
tion is completed.
LIBRARY: EZIOPBDV.LIB
Operate Target Board
int plcXP86Out( int Addr, unsigned int oValue )
Sends the 12-bit oValue to the proper D/A converter channel. Call
plcXP86Init before calling plcXP86Out.
PARAMETERS: Addr, the logical address of the D/A converter
channel, is 2*board_number + channel_number. Note that
board_number and channel_number start from zero. Without a
special PAL, board_number ranges from 0 to 7 as set by the address
jumpers. With the special PAL, board_number can range from 0 to
63. channel_number ranges from 0 to 1.
oValue is the 12-bit value to send to the D/A converter.
RETURN VALUE: -1 if the D/A converter cannot be found, 0 if the
operation is successful.
LIBRARY: EZIOPBDV.LIB
Sample Program
The sample program XP86_1.C in the Dynamic C SAMPLES\PLCBUS
subdirectory demonstrates higher level function calls for the D/A converter
outputs. The program is used to detect XP8600 boards attached to the
PLCBus, and maximizes the D/A converter outputs.