12: M
ODBUS
ASCII/RTU C
OMMUNICATION
FC5A M
ICRO
S
MART
U
SER
’
S
M
ANUAL
FC9Y-B1268
12-19
Function Code 05 (Force Single Coil)
Function code 05 changes a bit device status of Q (output), R (shift register), or M (internal relay).
Communication Frame
Request from Modbus Master
Slave No.
Function Code
Address
OFF: 0000H
ON: FF00H
xxh
05h
xxxxh
xxxxh
ACK Reply from Modbus Slave
Slave No.
Function Code
Address
OFF: 0000H
ON: FF00H
xxh
05h
xxxxh
xxxxh
NAK Reply from Modbus Slave
Slave No.
Function Code
Error Code
xxh
85h
xxh
Communication Example
Purpose
Force internal relay M1320 on.
M1320
(132 – 0)
8 + 0 + 1001 = 2057
Modbus address: 2057
2057 – 1 = 2056 = 808h
Communication frame address: 0808h
Condition
Slave No. 8
ASCII Mode
Request from Modbus Master
‘:’ 3038 3035 30383038 46463030 (LRC) CRLF
ACK Reply from Modbus Slave
‘:’ 3038 3035 30383038 46463030 (LRC) CRLF
NAK Reply from Modbus Slave
‘:’ 3038 3835 xxxx (LRC) CRLF
RTU Mode
Request from Modbus Master
08 05 0808 FF00 (CRC)
ACK Reply from Modbus Slave
08 05 0808 FF00 (CRC)
NAK Reply from Modbus Slave
08 85 xx (CRC)
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: [email protected]