Professional Documents
Culture Documents
S7-1200 Programmable Controller - MB - COMM - LOAD (Configure Port On The PTP Module For Modbus RTU)
S7-1200 Programmable Controller - MB - COMM - LOAD (Configure Port On The PTP Module For Modbus RTU)
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
MB_COMM_LOAD (Configure port on the PtP module for Modbus RTU)
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 terminated
with an error. The error code value at the STATUS parameter is valid only
during the single scan where ERROR = TRUE.
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 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.
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
MB_COMM_LOAD (Configure port on the PtP module for Modbus RTU)
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.
ICHAR_GAP UInt Delay for Inter-character gap between characters. This parameter is specified in
milliseconds and is used to increase the expected amount of time between
received characters. The corresponding number of bit times for this parameter is
added to the Modbus default of 35 bit times (3.5 character times).
RETRIES UInt Number of retries that the master will attempt before returning the no response
error code 0x80C8.
STOP_BITS USInt Number of stop bits used in framing each character. Valid values are 1 and 2.
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)
8185 MB_DB parameter is not an instance data block of a MB_MASTER or MB_SLAVE instruction.
1 In addition to the MB_COMM_LOAD errors listed above, errors can be returned from the underlying PtP communication
instructions.
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