Communication processor and Modbus TCP
13.9 Legacy Modbus RTU communication (CM/CB 1241 only)
S7-1200 Programmable controller
System Manual, V4.2, 09/2016, A5E02486680-AK
1271
RTS_ON_DLY
1
IN UInt RTS ON delay selection:
• 0 – (default) No delay from RTS active until the first character of the
message is transmitted
• 1 to 65535 – Delay in milliseconds from RTS active until the first char-
acter of the message is transmitted (does not apply to RS485 ports).
RTS delays shall be applied independent of the FLOW_CTRL selec-
tion.
RTS_OFF_DLY
1
IN UInt RTS OFF delay selection:
• 0 – (default) No delay from the last character transmitted until RTS
goes inactive
• 1 to 65535 – Delay in milliseconds from the last character transmitted
until RTS goes inactive (does not apply to RS485 ports). RTS delays
shall be applied independent of the FLOW_CTRL selection.
RESP_TO
1
IN UInt Response timeout:
Time in milliseconds allowed by MB_MASTER for the slave to respond. If
the slave does not respond in this time period, MB_MASTER will retry the
request or terminate the request with an error when the specified number
of retries has been sent.
5 ms to 65535 ms (default value = 1000 ms).
MB_DB IN Variant A reference to the instance data block used by the MB_MASTER or
MB_SLAVE instructions. After MB_SLAVE or MB_MASTER is placed in
your program, the DB identifier appears in the parameter helper drop-list
available at the MB_DB box connection.
DONE OUT Bool The DONE bit is TRUE for one scan, after the last request was completed
with no error. (Version 2.0 only)
ERROR OUT Bool The ERROR bit is TRUE for one scan, after the last request was termi-
nated with an error. The error code value at the STATUS parameter is
valid only during the single scan where ERROR = TRUE.
Optional parameters for MB_COMM_LOAD (V 2.x or later). Click the arrow at the bottom of a LAD/FBD box to expand
the box and include these parameters.
MB_COMM_LOAD is executed to configure a port for the Modbus RTU protocol. Once a port
is configured for the Modbus RTU protocol, it can only be used by either the MB_MASTER or
MB_SLAVE instructions.
One execution of MB_COMM_LOAD must be used to configure each communication port
that is used for Modbus communication. Assign a unique MB_COMM_LOAD instance DB for
each port that you use. You can install up to three communication modules (RS232 or
RS485) and one communication board (RS485) in the CPU. Call MB_COMM_LOAD from a
startup OB and execute it one time or use the first scan system flag (Page 110) to initiate the
call to execute it one time. Only execute MB_COMM_LOAD again if communication
parameters like baud rate or parity must change.
An instance data block is assigned for MB_MASTER or MB_SLAVE when you place these
instructions in your program. This instance data block is referenced when you specify the
MB_DB parameter for the MB_COMM_LOAD instruction.