Write Multiple Coils [0Fh] - Hitachi SJ-P1 Series User Manual

Communication option for the ethernet
Table of Contents

Advertisement

Chapter 7
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
through "000Fh" especialy "0007h", "000Ah" and
"000Dh" (input terminal: 3, 6 and 9) to ON.
Output value (Hi)
Remine
Output value (Lo)
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).
Address
Blocks
0
1
2
Modbus TCP
3
header part
4
5
6
7
8
9
10
Modbus
11
data part
12
13
14
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.
number "0001h"
Bit7
Bit6
Bit5
0008h
0007h
0006h
OFF(0)
ON(1)
OFF(0)
000Fh
000Eh
OFF(0)
OFF(0)
OFF(0)
Items
Transaction ID (Hi)
Transaction ID (Lo)
Protocol ID (Hi)
Protocol ID (Lo)
Data size (Hi)
Data size (Lo)
Unit ID
Function code
Starting address (Hi)
Starting address (Lo)
Quanttity (Hi)
Quanttity (Lo)
Byte Count *1)
Outputs value (Hi) *2)
Outputs value (Lo) *2)
About the Modbus TCP
By convention, bits within a byte are shown with
the MSB to the left, and the LSB to the right.
Bit4
Bit3
0005h
0004h
OFF(0)
OFF(0)
000Dh
000Ch
ON(1)
OFF(0)
Output value (Hi) = 01000000b = 40h
(coil number: 0008h through 0001h)
Output value (Lo) = 00010010b = 12h
(coil number: 000Fh through 0009h)
Code
15h
01h
00h
00h
00h
09h
FFh
0Fh
00h
00h
00h
0Fh
02h
40h
12h
7-12
Bit2
Bit1
0003h
0002h
0001h
OFF(0)
OFF(0)
OFF(0)
000Bh
000Ah
0009h
OFF(0)
ON(1)
OFF(0)
In the case, 10 byte lengths
(address 6 through 15).
Bit0

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents