EasyManua.ls Logo

Siemens SIMATIC S7-1200 - Page 1251

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.8 Legacy Modbus TCP communication
S7-1200 Programmable controller
System Manual, V4.2, 09/2016, A5E02486680-AK
1251
Parameter and type
Data type
Description
MB_MODE IN USInt Mode Selection: Assigns the type of request (read, write, or diagnostic). See
the Modbus functions table below for details.
MB_DATA_ADDR IN UDInt Modbus starting Address: Assigns the starting address of the data to be
accessed by MB_CLIENT. See the Modbus functions table below for valid
addresses.
MB_DATA_LEN IN UInt
Modbus data Length: Assigns the number of bits or words to be accessed in
this request. See the Modbus functions table below for valid lengths
MB_DATA_PTR IN_OUT Variant Pointer to the Modbus data register: The register buffers data going to or
coming from a Modbus server. The pointer must assign a non-optimized
global DB or a M memory address.
DONE OUT Bool The DONE bit is TRUE for one scan, after the last request was completed
with no error.
BUSY OUT Bool
0 - No MB_CLIENT operation in progress
1 - MB_CLIENT operation in progress
ERROR OUT Bool The ERROR bit is TRUE for one scan, after the MB_CLIENT execution was
terminated with an error. The error code value at the STATUS parameter is
valid only during the single cycle where ERROR = TRUE.
STATUS
OUT
Word
Execution condition code
REQ parameter
FALSE = No Modbus communication request
TRUE = Request to communicate with a Modbus TCP server
If no instance of MB_CLIENT is active and parameter DISCONNECT=0, when REQ=1 a new
Modbus request will start. If the connection is not already established then a new connection
will be made.
If the same instance of MB_CLIENT is executed again with DISCONNECT=0 and REQ=1,
before the completion of the current request, then no subsequent Modbus transmission will
be made. However, as soon as the current request is completed, a new request can be
processed if MB_CLIENT is executed with REQ=1.
When the current MB_CLIENT communication request is complete, the DONE bit is TRUE
for one cycle. The DONE bit can be used as a time gate to sequence multiple MB_CLIENT
requests.
Note
Input data consistency during MB_CLIENT processing
Once a Modbus client initiates a Modbus operation, all the input states are saved internally
and are then compared on each successive call. The comparis
on is used to determine if this
particular call was the originator of the active client request. More than one MB_CLIENT call
can be performed using a common instance DB.
As a result, it is important that the inputs are not changed during the period of tim
e that a
MB_CLIENT operation is actively being processed. If this rule is not followed, then a
MB_CLIENT cannot determine that it is the active instance.

Table of Contents

Other manuals for Siemens SIMATIC S7-1200

Related product manuals