Communication processor and Modbus TCP
13.5 Modbus communication
Tag
EN_DIAG_ALARM
STOP_BITS
Note
Required setting for the use of PROFIBUS cables with CM 1241 for RS485
Table 13- 73 Modbus_Comm_Load execution condition codes
STATUS (W#16#)
0000
8180
8181
8182
8183
8184
8185
In addition to the Modbus_Comm_Load errors listed above, errors can be returned from the underlying PtP communica-
1
tion instructions.
Modbus_Master (Communicate using SIPLUS I/O or the PtP port as Modbus RTU master) instruction
Table 13- 74 Modbus_Master instruction
LAD / FBD
1198
Data type
Default
Bool
0
USInt
1
Description
No error
Invalid port ID value (wrong port/hardware identifier for communication module)
Invalid baud rate value
Invalid parity value
Invalid flow control value
Invalid response timeout value (response timeout less than the 5 ms minimum)
MB_DB parameter is not an instance data block of a Modbus_Master or Modbus_Slave
instruction.
SCL
"Modbus_Master_DB"(
REQ:=_bool_in_,
MB_ADDR:=_uint_in_,
MODE:=_usint_in_,
DATA_ADDR:=_udint_in_,
DATA_LEN:=_uint_in_,
DONE=>_bool_out_,
BUSY=>_bool_out_,
ERROR=>_bool_out_,
STATUS=>_word_out_,
DATA_PTR:=_variant_inout_);
Description
Activate diagnostics interrupt:
0 = not activated
•
1 = activated
•
Number of stop bits:
1 = 1 stop bit
•
2 = 2 stop bits
•
0, 3 to 255 = reserved
•
1
Description
The Modbus_Master instruction communicates as
a Modbus master using a port that was configured
by a previous execution of the Mod-
bus_Comm_Load instruction. An instance data
block is assigned automatically when you place the
Modbus_Master instruction in your program. This
Modbus_Master instance data block is used when
you specify the MB_DB parameter for the Mod-
bus_Comm_Load instruction.
S7-1200 Programmable controller
System Manual, V4.2, 09/2016, A5E02486680-AK