ICP DAS, ZT-257x DIO Data Concentrator Quick Start Guide, v1.0
Page 43
Copyright © 2016, by ICP DAS Co., LTD. All Rights Reserved
5.3.3.
05 (0x05) Write Single Coil
This function code is used to set the temporary Digital Output value for a specific
channel on the ZT-257x module.
Request
Byte Description
Length Value
00
Address
1
0x01 to 0xF7 (1 to 247)
01
Function Code
1
0x01
02-03
Starting Channel
Number
2
DO
(
Temporary Output) 0x0000 to 0x0117
Safe Value
0x0400 to 0x0517
04-05 Output Value
2
A value of 0xFF00 sets the Digital Output value to
ON
A value of 0x0000 sets the Digital Output value to
OFF
Response
Byte
Description
Length Value
00
Address
1
0x01 to 0xF7 (1 to 247)
01
Function Code
1
0x05
02-03 Address
2
This value is the same as bytes 02 and 03 of the
Request
04-05
Output Channel
Number
2
This value is the same as bytes 04 and 05 of the
Request
Error Response
Byte Description
Length Value
00
Address
1
0x01 to 0xF7 (1 to 247)
01
Function Code
1
0x85
02
Exception Code
1
Refer to the Modbus standard for more details