Modbus Tcp; Mb_Client (Modbus Tcp) - Siemens SIMATIC S7 System Manual

Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

105BCommunication processor
12.5 Modbus communication
12.5.2

Modbus TCP

12.5.2.1

MB_CLIENT (Modbus TCP)

Table 12- 49 MB_CLIENT instruction
LAD / FBD
Table 12- 50 Data types for the parameters
Parameter and type
REQ
In
DISCONNECT
IN
CONNECT_ID
IN
IP_OCTET_1
IN
IP_OCTET_2
IN
IP_OCTET_3
IN
IP_OCTET_4
IN
IP_PORT
IN
584
SCL
"MB_CLIENT_DB"(
REQ:=_bool_in_,
DISCONNECT:=_bool_in_,
CONNECT_ID=_uint_in_,
IP_OCTET_1:=_byte_in_,
IP_OCTET_2:=_byte_in_,
IP_OCTET_3:=_byte_in_,
IP_OCTET_4:=_byte_in_,
IP_PORT:=_uint_in_,
MB_MODE:=_usint_in_,
MB_DATA_ADDR:=_udint_in_,
MB_DATA_LEN:=_uint_in_,
DONE=>_bool_out_,
BUSY=>_bool_out_,
ERROR=>_bool_out_,
STATUS=>_word_out_,
MB_DATA_PTR:=_variant_inout_);
Data type Description
Bool
FALSE = No Modbus communication request
TRUE = Request to communicate with a Modbus TCP server
Bool
The DISCONNECT parameter allows your program to control connection
and disconnection with a Modbus server device.
If DISCONNECT = 0 and a connection does not exist, then MB_CLIENT
attempts to make a connection to the assigned IP address and port number.
If DISCONNECT = 1 and a connection exists, then a disconnect operation is
attempted. Whenever this input is enabled, no other operation will be
attempted.
UInt
The CONNECT_ID parameter must uniquely identify each connection within
the PLC. Each unique instance of the MB_CLIENT or MB_SERVER
instruction must contain a unique CONNECT_ID parameter.
USInt
Modbus TCP server IP address: Octet 1
8-bit part of the 32-bit IPv4 IP address of the Modbus TCPserver to which
the client will connect and communicate using the Modbus TCP protocol.
USInt
Modbus TCP server IP address: Octet 2
USInt
Modbus TCP server IP address: Octet 3
USInt
Modbus TCP server IP address: Octet 4
UInt
Default value = 502: The IP port number of the server to which the client will
attempt to connect and ultimately communicate using the TCP/IP protocol.
Description
MB_CLIENT communicates as a
Modbus TCP client through the
PROFINET connector on the S7-
1200 CPU. No additional
communication hardware module
is required.
MB_CLIENT can make a client-
server connection, send a
Modbus function request, receive
a response, and control the
disconnection from a Modbus
TCP server.
S7-1200 Programmable controller
System Manual, 11/2011, A5E02486680-05

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the SIMATIC S7 and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Simatic s7-1200

Table of Contents

Save PDF