6.4.4.11
FC 15 - Force Multiple Coils
This function code serves to change up to 2040 (ASCII: 1976) bits in the slave.
DB SEND source
Address
Name
Type
Comment
+0.0
ADDR
BYTE
Slave address
+1.0
FUNC
BYTE
Function code
+2.0
start_addr
WORD
Bit start address
+4.0
bit_number
INT
Number of bits
+6.0
coil_state[1]
WORD
State Coil
n
start_addr
–
start_addr
is not checked by the driver and is sent unchanged.
n
bit_number
–
Any value between 1...2040 (ASCII: 1...1976) is permitted as
bit_number
.
This indicates how many bits in the slave should be overwritten.
n
coil_state[1]
–
State Coil:
5Fh...58h
57h...50h
6.4.4.12
FC 16 - Preset Multiple Registers
This function code serves to overwrite up to 127 (ASCII: 123) registers in the slave with
one request message.
DB SEND source
Address
Name
Type
Comment
+0.0
ADDR
BYTE
Slave address
+1.0
FUNC
BYTE
Function code
+2.0
start_register
WORD
Register bit start address
+4.0
register_number
INT
Register amount of bits
+6.0
data[1]
WORD
Register data
+8.0
data[2]
WORD
Register data
+10.0
data[3]
WORD
Register data
...
...
...
...
n
start_register
–
start_register
is not checked by the driver and is sent unchanged.
n
register_number
–
Any value between 1...127 (ASCII: 1...123) is permitted as
register_number
.
This indicates the number of registers (1 register = 2bytes) to be read.
VIPA System 300S
Communication protocols
Modbus > Modbus Master - Function codes
HB130 | CP | 341-1CH01 | en | 18-40
65