EasyManua.ls Logo

Siemens SIMATIC S7-1200

Siemens SIMATIC S7-1200
1614 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Communication processor and Modbus TCP
13.9 Legacy Modbus RTU communication (CM/CB 1241 only)
S7-1200 Programmable controller
1278 System Manual, V4.2, 09/2016, A5E02486680-AK
Table 13- 152 MB_MASTER execution condition codes (Modbus protocol errors)
1
STATUS (W#16#)
Response code from
slave
Modbus protocol errors
8380
-
CRC error
8381 01 Function code not supported
8382
03
Data length error
8383 02 Data address error or address outside the valid range of the
DATA_PTR area
8384
Greater than 03
Data value error
8385
03
Data diagnostic code value not supported (function code 08)
8386
-
Function code in the response does not match the code in the request.
8387
-
Wrong slave responded
8388 - The slave response to a write request is incorrect. The write request
returned by the slave does not match what the master actually sent.
1
In addition to the MB_MASTER errors listed above, errors can be returned from the underlying PtP communication
instructions.
13.9.3.3
MB_SLAVE (Communicate using the PtP port as Modbus RTU slave)
Table 13- 153 MB_SLAVE instruction
LAD / FBD
SCL
Description
"MB_SLAVE_DB"(
MB_ADDR:=_uint_in_,
NDR=>_bool_out_,
DR=>_bool_out_,
ERROR=>_bool_out_,
STATUS=>_word_out_,
MB_HOLD_REG:=_variant_inout_);
The MB_SLAVE instruction allows your pro-
gram to communicate as a Modbus slave
through a PtP port on the CM (RS485 or
RS232) and CB (RS485). When a remote
Modbus RTU master issues a request, your
user program responds to the request by
MB_SLAVE execution. STEP 7 automatically
creates an instance DB when you insert the
instruction. Use this MB_SLAVE_DB name
when you specify the MB_DB parameter for
the MB_COMM_LOAD instruction.

Table of Contents

Other manuals for Siemens SIMATIC S7-1200

Related product manuals