9.4.6 Preset Single Register (06)
(1) Writing single word of output area
In case of writing single word to output area, request and response frame is as follows.
Detail of frame is applied in case of ASCII mode.
a) Request frame
Classification
Tail (CRLF)
Size (byte) 1 1 1 2
(2) Details of frame
(a) Station no.: indicates the station no. of slave to write single word of output area.
(b) Function code: ‘06’ indicating Preset Single Register
(c) Address: start address of data to write and it consists of 2 byte. At this time, start address conforms to
modbus address regulation.
(d) Output: data value to write in the address set in the Address.
(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) Error code: error code is expressed by adding 80(Hex) to function code and in case of writing single word
of output area, it is expressed as 86(Hex).
(i) Exceptional code: indicates detail of error and consists of 1 byte
(3) Frame example
Example writing 0003(Hex) to 9
th
word of station number 1 server acting as modbus RTU mode
(a) Request frame
Classificatio
n
Statio
n no.
Function
code
Address Output
Error check
Upper byte Lower byte Upper byte Lower byte
Frame 01 06 00 08 00 03 CRC
(b) Response frame (In case receiving normal frame)
Classificatio
n
Statio
n no.
Function
code
Address Output
Error check
Upper byte Lower byte Upper byte Lower byte
Frame 01 06 00 08 00 03 CRC
(c) Response frame (In case of receiving abnormal frame)
Classification Station no. Function code Exceptional code Error check