EasyManua.ls Logo

Siemens S7-1200 - MB_SERVER (Communicate Via PROFINET as Modbus TCP Server) Instruction

Siemens S7-1200
1028 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
12.5 Modbus communication
S7-1200 Programmable controller
736 System Manual, 03/2014, A5E02486680-AG
STATUS
(W#16#)
MB_CLIENT parameter errors
8387
The assigned Connection ID parameter is different from the ID used for previous requests. There can only
be a single Connection ID used within each MB_CLIENT instance DB.
This is also used as an internal error if the Modbus TCP protocol ID received from a server is not 0.
8388 A Modbus server returned a quantity of data that is different than what was requested. This applies to
Modbus functions 15 or 16 only.
1
In addition to the MB_CLIENT errors listed above, errors can be returned from the underlying T block communication
instructions (TCON, TDISCON, TSEND, and TRCV).
See also
TCON, TDISCON, TSEND, and TRCV (TCP communication) instructions (Page 527)
12.5.2.2
MB_SERVER (Communicate via PROFINET as Modbus TCP server) instruction
Table 12- 55 MB_SERVER instruction
LAD / FBD
SCL
Description
"MB_SERVER_DB"(
DISCONNECT:=_bool_in_,
CONNECT_ID:=_uint_in_,
IP_PORT:=_uint_in_,
NDR=>_bool_out_,
DR=>_bool_out_,
ERROR=>_bool_out_,
STATUS=>_word_out_,
MB_HOLD_REG:=_variant_inout_);
MB_SERVER communicates as a
Modbus TCP server through the
PROFINET connector on the S7-1200
CPU. No additional communication
hardware module is required.
MB_SERVER can accept a request to
connect with Modbus TCP client, receive
a Modbus function request, and send a
response message.
Table 12- 56 Data types for the parameters
Parameter and type
Data type
Description
DISCONNECT IN Bool MB_SERVER attempts to make a "passive" connection with a partner device.
This means that the server is passively listening for a TCP connection request
from any requesting IP address.
If DISCONNECT = 0 and a connection does not exist, then a passive
connection can be initiated.
If DISCONNECT = 1 and a connection exists, then a disconnect operation is
initiated. This allows your program to control when a connection is accepted.
Whenever this input is enabled, no other operation will be attempted.
CONNECT_ID IN UInt CONNECT_ID uniquely identifies each connection within the PLC. Each
unique instance of the MB_CLIENT or MB_SERVER instruction must contain a
unique CONNECT_ID parameter.

Table of Contents

Other manuals for Siemens S7-1200

Related product manuals