VIPA System 300S
6.4.8.3
FC 03 - Read Output Registers
Request message
ADDR
Reply message
ADDR
start_register
15
14
13
12
start_register-offset_DB_no.
Calculation
register_number
Example
HB130 | CP | 341-1CH01 | en | 18-40
This function enables the Modbus master to read data words from a data block.
FUNC
FUNC
The Modbus register address start_register is interpreted by the driver as follows:
11
10
9
n
The DB of the CPU to be accessed, is defined by start_register.
n
The corresponding address allocation of the CPU memory area are established by
the properties of "FC 03, 06, 16" in the parameterization of the CP.
–
Here the fixed "Modbus address in transmission message" 0 may be assigned to
a Base-DB-Number in the "SIMATIC memory area".
Data block DB = Base-DB-Number + start_register-offset_DB_no.
n
n
Data word DBW = start_register-word_no. x 2
Providing the resulting DB and the corresponding DBW to be read from is known
start_register may be calculated with the following formula:
n
start_register = (DB - Base-DB-Number) x 512) + (DBW / 2)
Please regard for DBW it is only allowed to use even numbered data
word numbers.
n
Values between 1 and 127 are permitted as register_number.
–
This number of registers are read.
n
It is valid: Maximum register_number = 512 - start_register
Conversion Modbus addressing for FC 03, 06, 16
"Modbus address in the transmission message"
Param-start-address
from 0
start_register
byte_count n
start_register
8
7
6
Communication protocols
Modbus > Modbus Slave - Function codes
register_number
n/2-register data
(High, Low)
5
4
3
start_register-word_no.
"SIMATIC memory area"
PLC-area
Data blocks commence at DB 800
CRC
CRC
2
1
0
83