9.4.4 Read Input Registers (04)
(1) Reading word of input area
In case of reading word of input area, request and response frame is as follows.
Tail of frame is applied in case of ASCII mode.
(a) Request frame
Classification
No. of byte Data Frame error check Tail (CRLF)
Size (byte) 1 1 2 N*2 2 2
(c) In case of response frame (In case of receiving abnormal frame)
Classification Station no. Error code
Tail (CRLF)
Size (byte) 1 1 1 2
(2) Details of frame
(a) Station no.: indicates the station no. of slave to read word of input area.
(b) Function code: ‘04’ indicating Read Input Registers
(c) Address: start address of data to read and it consists of 2 byte. At this time, start address conforms to
modbus address regulation.
(d) Data size: size of data to read and it consists of 2 byte.
(e) Frame error check: in case of ASCII mode, it uses LRC and in case of STU mode, it uses CRC. It
consists of 2 byte.
(f) Tail: it is applies in case of ASCII mode, CRLF is added after LRC.
(g) No. of byte: no. of byte of response data
(h) Data: makes address of request frame as start address and transmits data with byte unit. At this time,
since data is word type, it is double of no. of byte.
(i) Error code: error code is expressed by adding 80(Hex) to function code and in case of reading word of
input area, it is expressed as 84(Hex).
(j) Exceptional code: indicates detail of error and consists of 1 byte
(3) Frame example
Example that requests reading word of 9 to station number 1 server acting as modbus RTU mode
(a) Request frame
Classificatio
n
Statio
n no.
Function
code
Address Data size
Error check
Upper byte Lower byte Upper byte Lower byte
Frame 01 04 00 08 00 01 CRC
(b) Response frame (In case receiving normal frame)
Classificatio
n
Statio
n no.
Function
code
No. of byte Data Error check
Frame 01 04 02 00 0A CRC
(c) Response frame (In case of receiving abnormal frame)