User manual
IEC61131 User and Reference Manual
April 22, 2008
314
Inputs
Type
Description
mAddress
Integer
Modbus master register address. The first register
where data will be written to or read from in this, the
master controller. The register type does not have to
match the type of the slave register address. It is
possible to store input registers from a slave into
output registers on the master and vice-versa.
length
Integer
For Modbus protocols the length input specifies how
many registers are to be transferred. The maximum
length for each function code is shown in the table
below. Functions 05 and 06 always transfer 1 register,
regardless of the value of length.
For DF1 protocol the Length parameter specifies how
many 16-bit registers are to be transferred for
functions 00, 01 and 08. For function codes 02 and
05, this field is labeled Bit Mask. Bit Mask selects the
16-bit bitmask specifying which bits in the Master
Register to send. If a bit is set in Bit Mask, the
corresponding bit in the register will be sent.
timeOut
Integer
Time-out is maximum time the function block waits for
a valid response from the slave station, in tenths of
seconds. Valid values are 0 to 65535.
Outputs
Type
Description
done
Boolean
TRUE when the enable input is TRUE and a valid
response has been received from the slave.
FALSE in all other cases.
error
Boolean
TRUE when the enable input is TRUE and an error
occurs. See the statusMasterCmd for a list of possible
error codes.
FALSE in all other cases.