Mb_Server (Communicate Via Profinet As Modbus Tcp Server) Instruction - Siemens S7-1200 System Manual

Hide thumbs Also See for S7-1200:
Table of Contents

Advertisement

Communication processor and Modbus TCP
12.5 Modbus communication
STATUS
MB_CLIENT parameter errors
(W#16#)
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.
In addition to the MB_CLIENT errors listed above, errors can be returned from the underlying T block communication
1
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
Table 12- 56 Data types for the parameters
Parameter and type
DISCONNECT
IN
CONNECT_ID
IN
736
SCL
"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_);
Data type Description
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.
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.
Description
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.
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG

Advertisement

Table of Contents
loading

Table of Contents