Hardware manual

12 Modbus
2-249
Chap.2
FC1 Read coils
Reading of Coil (C) consecutively
(Request)
Byte 7 FC (Function code) = 01
Byte 8-9 Reference No.
Byte 10-11 Number of read bits (1 to 2000 bits)
(Normal response)
Byte 7 FC (Function code) = 01
Byte 8 Number of bytes for the response ((number of read bits +7)/8)
From Byte 9 Read data
(Abnormal response)
Byte 7 FC (Function code) = 81 (HEX)
Byte 8 Exception code 01 or 02
(Example)
Reading of C1. 1 bit. The read value is 1.
01 00 00 00 01 => 01 01 01
(Data sequence of read value)
When two or more data are read out, the read data are arranged starting from the lowest
address by 8 bits (1 byte). Within any 1 byte, data in the lower address is set to the lower bit.
The data in the unread bit becomes “0”.
For example, when reading an 11-bit data as shown below, the read value becomes 21 03.
Address Data Remarks
C 1 1
C 2 0
C 3 0
C 4 0
C 5 0
C 6 1
C 7 0
C 8 0
Data for the 1
st
byte
Bit pattern= 00100001 = 21
(HEX)
C 9 1
C 10 1
C11 0
Data for 2
nd
byte
Bit pattern 00000011 = 03
(HEX)