<Writing Into Multiple Coils [0Fh]>
Rewrites consecutive multiple coils.
(Example)
Change the status of multi-function input terminals 1 to 6 on the Inverter with slave address 5.
Set the multi-function input terminals as shown in the following table.
Multi-function
input terminals
Coil No.
Terminal status
Query
No.
Field name
*1
1
Slave address
2
Function code
3
Coil start number (MSB)
4
Coil start number (LSB)
5
Number of coils (MSB)
6
Number of coils (LSB)
*3
7
Number of bytes
8
Change data (MSB)
*3
9
Change data (LSB)
10
CRC-16 (MSB)
11
CRC-16 (LSB)
*1. There is no response for broadcasting.
*2. Note that the start number is reduced by 1.
*3. Since the change data comprises of both MSB and LSB as a set, make the byte to be an even
number by adding 1, even if the byte that actually needs to be changed is an odd number.
If writing into multiple coils cannot be performed normally, refer to the "Exception Response" section.
1
2
3
7
8
9
ON
ON
ON
Example
(HEX)
05
0F
*2
00
*2
06
00
06
02
*3
17
00
DB
3E
4-4 Communication Function
4
5
6
10
11
12
OFF
ON
OFF
Response
No.
Field name
1
Slave address
2
Function code
3
Coil start number (MSB)
4
Coil start number (LSB)
5
Number of coils (MSB)
6
Number of coils (LSB)
7
CRC-16 (MSB)
8
CRC-16 (LSB)
4
Example
(HEX)
05
0F
00
06
00
06
34
4C
4-166