Communication protocols
Modbus > Modbus Slave - Function codes
6.4.8.6
FC 06 - Preset Single Register
Request message
ADDR
Reply message
ADDR
start_register
15
14
13
12
start_register-offset_DB_no.
Calculation
Data_value
86
This function enables the Modbus master to write one data word in a data block of the
CPU.
Please consider as soon as you want to access an area by writing, you
have to write enable the corresponding area by the protocol parameters
with the dialog "Limits".
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".
n
Data block DB = Base-DB-Number + start_register-offset_DB_no.
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
Any 16bit value is allowed as Data_value.
–
This is the register value to be written.
start_register
start_register
start_register
8
7
6
Data_value
(High, Low)
Data_value
(High, Low)
5
4
3
start_register-word_no.
HB130 | CP | 341-1CH01 | en | 18-40
VIPA System 300S
CRC
CRC
2
1
0