12: M
ODBUS
ASCII/RTU C
OMMUNICATION
12-20
FC5A M
ICRO
S
MART
U
SER
’
S
M
ANUAL
FC9Y-B1268
Function Code 06 (Preset Single Register)
Function code 06 changes word device data of D (data register).
Communication Frame
Request from Modbus Master
Slave No.
Function Code
Address
New Data
xxh
06h
xxxxh
xxxxh
ACK Reply from Modbus Slave
Slave No.
Function Code
Address
Acknowledge
Data
xxh
06h
xxxxh
xxxxh
NAK Reply from Modbus Slave
Slave No.
Function Code
Error Code
xxh
86h
xxh
Communication Example
Purpose
Write 8000 to data register D1708.
D1708
(1708 – 0) + 400001 = 401709
Modbus address: 401709
Extract lower 5 digits
1709
1709 – 1 = 1708 = 6ACh
Communication frame address: 06ACh
Condition
Slave No. 8
ASCII Mode
Request from Modbus Master
‘:’ 3038 3036 30364143 31463430 (LRC) CRLF
ACK Reply from Modbus Slave
‘:’ 3038 3036 30364143 31463430 (LRC) CRLF
NAK Reply from Modbus Slave
‘:’ 3038 3836 xxxx (LRC) CRLF
RTU Mode
Request from Modbus Master
08 06 06AC 1F40 (CRC)
ACK Reply from Modbus Slave
08 06 06AC 1F40 (CRC)
NAK Reply from Modbus Slave
08 86 xx (CRC)
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: [email protected]