105BCommunication processor
12.5 Modbus communication
For example, after MB_SERVER is placed in a LAD network, you can go to a previous
network and assign the HR_Start_Offset value. The value must be assigned prior to
execution of MB_SERVER.
Table 12- 62 MB_SERVER execution condition codes
STATUS
Response code to
(W#16#)
Modbus server
(B#16#)
7001
7002
7003
8187
818C
8381
01
8382
03
8383
02
8384
03
8385
03
In addition to the MB_SERVER errors listed above, errors can be returned from the
1
underlying T block communication instructions (TCON, TDISCON, TSEND, and TRCV).
594
1
Modbus protocol errors
MB_SERVER is waiting for a Modbus client to connect to the assigned TCP port. This
code is reported on the first execution of a connect or disconnect operation.
MB_SERVER is waiting for a Modbus client to connect to the assigned TCP port. This
code is reported for any subsequent executions, while waiting for completion of a
connect or disconnect operation.
A disconnect operation has successfully completed (Only valid for one PLC scan).
Invalid pointer to MB_HOLD_REG: area is too small
Pointer to a optimized MB_HOLD_REG area (must be a standard DB area or M
memory area) or Blocked process timeout exceeds the limit of 55 seconds. (S7-1200
specific)
Function code not supported
Data length error
Data address error or access outside the bounds of the MB_HOLD_REG address area
Data value error
Data diagnostic code value not supported (function code 08)
Entering a Modbus server
variable using the default DB name:
1. Set the cursor in the parameter field and
type an m character.
2. Select "MB_SERVER_DB" from the drop-
list of DB names.
3. Select
"MB_SERVER_DB.HR_Start_Offset" from
the drop-list of DB variables.
S7-1200 Programmable controller
System Manual, 11/2011, A5E02486680-05