VIPA System 300S
6.4.8.5
FC 05 - Force Single Coil
Request message
ADDR
Reply message
ADDR
coil_addr
Calculation
Data_on/off
Example
Address calculation:
start_addr
hex
decimal
0000h
0
0001h
1
01F1h
497
0400h
1024
0401h
1025
07DAh
2010
HB130 | CP | 341-1CH01 | en | 18-40
FUNC
FUNC
n
The Modbus bit address coil_addr contains the start of the area of the CPU, which is
be accessed.
n
The corresponding address allocation of the CPU memory area are established by
the properties of "FC 01, 05, 15" in the parameterization of the CP.
–
Here the "Modbus address in transmission message" briefly Param-start-address
may be assigned to a "SIMATIC memory area" briefly PLC-area.
n
Byte address = ((coil_addr - Param-start-address) / 8) + PLC-area
n
When accessing bit memories respectively inputs of the CPU, the remaining Rest-bit-
number is calculated and used to address the relevant bit within the bit memory area
respectively the input area.
–
Rest-bit-number = (coil_addr - Param-start-address) % 8 [Modulo 8]
n
The following values are valid for Data_on/off:
–
FF00h: set bit
–
0000h: delete bit
Conversion Modbus addressing for FC 01, 05, 15
"Modbus address in the transmission message"
Param-start-address
from 0 ... 1023
from 1024 ... 2047
Access
Memory
(0 - 0)
Memory
(1 - 0)
Memory
(497 - 0)
Output
(1024 - 1024)
Output
(1025 - 1024)
Output
(2010 - 1024)
oil_addr
coil addr
Calculation
/ 8
/ 8
/ 8
/ 8
/ 8
/ 8
Communication protocols
Modbus > Modbus Slave - Function codes
Data_on/off
Data_on/off
"SIMATIC memory area"
PLC-area
Memory commence at M 1000.0
Outputs commence at Q 100.0
+1000
+1000
+1000
+100
+100
+100
CRC
CRC
Area in
PLC
→
M 1000.0
→
M 1000.1
→
M 1062.1
→
Q 100.0
→
Q 100.1
→
Q 223.2
85