EasyManua.ls Logo

Siemens S7-1200 - Page 756

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
756 System Manual, 03/2014, A5E02486680-AG
Parameter and type
Data type
Description
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
Modbus communication function codes (1, 2, 4, 5, and 15) can read and write bits and words
directly in the input process image and output process image of the CPU. For these function
codes, the MB_HOLD_REG parameter must be defined as a data type larger than a byte.
The following table shows the example mapping of Modbus addresses to the process image
in the CPU.
Table 12- 75 Mapping of Modbus addresses to the process image
Modbus functions
S7-1200
Codes
Function
Data area
Address range
Data area
CPU address
01
Read bits
Output
1
to
8192
Output Process Image
Q0.0 to Q1023.7
02
Read bits
Input
10001
to
18192
Input Process Image
I0.0 to I1023.7
04
Read words
Input
30001
to
30512
Input Process Image
IW0 to IW1022
05
Write bit
Output
1
to
8192
Output Process Image
Q0.0 to Q1023.7
15
Write bits
Output
1
to
8192
Output Process Image
Q0.0 to Q1023.7
Modbus communication function codes (3, 6, 16) use a Modbus holding register which can
be an M memory address range or a data block. The type of holding register is specified by
the MB_HOLD_REG parameter on the MB_SLAVE instruction.
Note
MB_HOLD_REG data block type
A Modbus holding register data block must allow both direct (absolute) and symbolic
addressing. When you create the data block the "Standard" access attribute must be
sel
ected.

Table of Contents

Other manuals for Siemens S7-1200

Related product manuals