7-12
7.2.10 Write multiple coils [0Fh]
This function code is used to force each coil in a
sequence of coils to either ON or OFF.
[Request]
The request specifies the coil references to be
forced.
(Example)
Configure 15 coils with coil number "0001h"
through "000Fh" especialy "0007h", "000Ah" and
"000Dh" (input terminal: 3, 6 and 9) to ON.
↑
If the returned output quantity is not a multiple of
eight, the remaining bits in the final data byte will
be padded with zeros (toward the high order end
of the byte).
Hi: high order
Lo: low order
*1) Even if the number of bytes that actually need
to be changed is odd, add 1 to the number of
bytes. As a result, "Byte Count" is configured to
the even number at all times.
*2) In the case of note *1), the added "Outputs
value" should be configured to 00h.
By convention, bits within a byte are shown with
the MSB to the left, and the LSB to the right.
Output value (Hi) = 01000000b = 40h
(coil number: 0008h through 0001h)
Output value (Lo) = 00010010b = 12h
(coil number: 000Fh through 0009h)
In the case, 10 byte lengths
(address 6 through 15).