Professional Documents
Culture Documents
S7-1200 Programmable Controller - Modbus - Comm - Load (Configure SIPLUS I - O or Port On The PTP Module For Modbus RTU) Instruction
S7-1200 Programmable Controller - Modbus - Comm - Load (Configure SIPLUS I - O or Port On The PTP Module For Modbus RTU) Instruction
S7-1200 Programmable Controller - Modbus - Comm - Load (Configure SIPLUS I - O or Port On The PTP Module For Modbus RTU) Instruction
Modbus_Comm_Load (Configure SIPLUS I/O or port on the PtP module for Modbus RTU) instruction
REQ IN Bool A low to high (positive edge) signal starts the operation.
(Version 2.0 only)
PORT IN Port After you install and configure a CM or CB communication device, the port
identifier appears in the parameter helper drop-list available at the PORT box
connection. The assigned CM or CB port value is the device configuration
property "hardware identifier". The port symbolic name is assigned in the
"System constants" tab of the PLC tag table.
This document constitutes a free excerpt compiled by the user himself/herself from the documentation provided by Siemens for this product. Siemens disclaims all
liability for the completeness of this document. It shall only be used for the user's own internal purposes. It shall not be passed on to third parties.
9/16/2023
S7-1200 Programmable controller
Modbus_Comm_Load (Configure SIPLUS I/O or port on the PtP module for Modbus RTU) instruction
MB_DB IN Variant A reference to the instance data block used by the Modbus_Master or
Modbus_Slave instructions. After Modbus_Master or Modbus_Slave 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 terminated
with an error. The error code value at the STATUS parameter is valid only
during the single scan where ERROR = TRUE.
Modbus_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 Modbus_Master or
Modbus_Slave instructions.
One execution of Modbus_Comm_Load must be used to configure each communication port
that is used for Modbus communication. Assign a unique Modbus_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 Modbus_Comm_Load from a startup
OB and execute it one time or use the first scan system flag to initiate the call to execute it one
time. Only execute Modbus_Comm_Load again if communication parameters like baud rate or
parity must change.
This document constitutes a free excerpt compiled by the user himself/herself from the documentation provided by Siemens for this product. Siemens disclaims all
liability for the completeness of this document. It shall only be used for the user's own internal purposes. It shall not be passed on to third parties.
9/16/2023
S7-1200 Programmable controller
Modbus_Comm_Load (Configure SIPLUS I/O or port on the PtP module for Modbus RTU) instruction
If you use the Modbus library with a module in a distributed rack, the Modbus_Comm_Load
instruction must be executed in a cyclical interrupt routine (for example, once per second or
once every 10 seconds). If power is lost to the distributed rack or the module is pulled, upon
restoration of module operation, only the HWConfig parameter set is sent to the PtP module.
All requests initiated by the Modbus_Master timeout, and the Modbus_Slave goes silent (no
response to any message). Cyclic execution of the Modbus_Comm_Load instruction resolves
these issues.
An instance data block is assigned for Modbus_Master or Modbus_Slave when you place these
instructions in your program. This instance data block is referenced when you specify the MB_DB
parameter for the Modbus_Comm_Load instruction.
ICHAR_GAP Word 0 Maximum character delay time between characters. This parameter is
specified in milliseconds and increases the anticipated period between
the received characters. The corresponding number of bit times for this
parameter is added to the Modbus default value of 35 bit times (3.5
character times).
RETRIES Word 2 Number of retries that the master executes before the error code 0x80C8
for "No response" is returned.
This document constitutes a free excerpt compiled by the user himself/herself from the documentation provided by Siemens for this product. Siemens disclaims all
liability for the completeness of this document. It shall only be used for the user's own internal purposes. It shall not be passed on to third parties.
9/16/2023
S7-1200 Programmable controller
Modbus_Comm_Load (Configure SIPLUS I/O or port on the PtP module for Modbus RTU) instruction
Note
Required setting for the use of PROFIBUS cables with CM 1241 for RS485
0000 No error
8180 Invalid port ID value (wrong port/hardware identifier for communication module)
8184 Invalid response timeout value (response timeout less than the 5 ms minimum)
This document constitutes a free excerpt compiled by the user himself/herself from the documentation provided by Siemens for this product. Siemens disclaims all
liability for the completeness of this document. It shall only be used for the user's own internal purposes. It shall not be passed on to third parties.
9/16/2023
S7-1200 Programmable controller
Modbus_Comm_Load (Configure SIPLUS I/O or port on the PtP module for Modbus RTU) instruction
See also
→ CPU memory
This document constitutes a free excerpt compiled by the user himself/herself from the documentation provided by Siemens for this product. Siemens disclaims all
liability for the completeness of this document. It shall only be used for the user's own internal purposes. It shall not be passed on to third parties.
9/16/2023