User manual
IEC61131 User and Reference Manual
April 22, 2008
313
master
Send Modbus master command
Description
The master function block exchanges data with another controller using either Modbus
communication protocol or DF1 protocols. Note that only one master function block may be
active on each serial communication port at any one time.
enable
comX
function
slaveStn
sAddress
mAddress
length
timeOut
error
done
statusMasterCmd
master
Arguments
Inputs
Type
Description
enable
Boolean
Set to TRUE to send one master message. Enable
must then be set to FALSE and back to TRUE to send
another master message. Each master message is
complete when either the done or error output is
TRUE.
comX
Integer
Communication port to send Modbus master
message. Valid values are 1 to 4.
function
Integer
Function code for the Modbus message. Valid
function codes are shown in the Modbus Function
Codes table below. Modbus functions 5, 6, 15, and 16
support broadcast messages. Enron Modbus
functions 129, 130, 132, 133, 135, 136, 138, and 139
may be broadcast, but some Enron Modbus slave
devices may not support broadcast messages. See
the TeleBUS Protocols Modbus Compatible Protocols
User Manual for details on each function code.
slaveStn
Integer
Modbus or DF1 station address of the slave station.
For the Modbus ASCII and Modbus RTU protocols,
the valid range is 1 to 255 if standard addressing is
used, and 1 to 65534 if extended addressing is used.
For DF1 protocol the slave station address must be in
the range 0 to 254.
sAddress
Integer
Modbus slave register address. The first register
where data will be read from or written to in the slave
controller.