EasyManua.ls Logo

Siemens SIMATIC S7-1200 - Page 1206

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.5 Modbus communication
S7-1200 Programmable controller
1206 System Manual, V4.2, 09/2016, A5E02486680-AK
Modbus_Slave (Communicate using SIPLUS I/O or the PtP port as Modbus RTU slave) instruction
Table 13- 80 Modbus_Slave instruction
LAD / FBD
SCL
Description
"Modbus_Slave_DB"(
MB_ADDR:=_uint_in_,
NDR=>_bool_out_,
DR=>_bool_out_,
ERROR=>_bool_out_,
STATUS=>_word_out_,
MB_HOLD_REG:=_variant_inout_);
The Modbus_Slave instruction allows your
program to communicate in one of two ways:
As a Modbus RTU slave through a PtP
port on the CM (RS485 or RS232) and CB
(RS485)
As a Modbus RTU slave through Modbus
RTU SIPLUS I/O options:
Install ET 200MP S7-1500CM PtP
(RS485 / 422 or RS232).
Install ET 200SP S7-1500 CM PtP
(RS485 / 422 or RS232).
When a remote Modbus RTU master issues a
request, your user program responds to the
request by Modbus_Slave execution. STEP 7
automatically creates an instance DB when
you insert the instruction. Use this Mod-
bus_Slave_DB name when you specify the
MB_DB parameter for the Mod-
bus_Comm_Load instruction.
Table 13- 81 Data types for the parameters
Parameter and type
Data type
Description
MB_ADDR IN V1.0: USInt
V2.0: UInt
The station address of the Modbus slave:
Standard addressing range (1 to 247)
Extended addressing range (0 to 65535)
MB_HOLD_REG IN Variant Pointer to the Modbus Holding Register DB: The Modbus holding
register can be M memory or a data block.
NDR OUT Bool New Data Ready:
0 No new data
1 Indicates that new data has been written by the Modbus
master
DR OUT Bool Data Read:
0 No data read
1 Indicates that data has been read by the Modbus master
ERROR OUT Bool The ERROR bit is TRUE for one scan, after the last request was
terminated with an error. If execution is terminated with an error,
then the error code value at the STATUS parameter is valid only
during the single scan where ERROR = TRUE.
STATUS
OUT
Word
Execution error code

Table of Contents

Other manuals for Siemens SIMATIC S7-1200

Related product manuals