ICP DAS, ZT-2017 and ZT-2017C AI Series User Manual, Version 1.0.1
Page 113
Copyright © 2012 by ICP DAS Co., Ltd. All Rights Reserved.
6.3.7
05 (0x05) Writing a Single Coil
Description
This function code is used to write the digital output value for the ZT-2000 I/O
module.
Request
Byte Description
Length Value
00
Address
1
1 to 247
01
Function Code
1
0x05
02
~
03
Starting Channel
Number
2
See Section 6.3.1 for details
04
~
05 Output Value
2
A value of 0xFF00 sets the output to ON.
A value of 0x0000 sets the output to OFF.
Response
Byte Description
Length Value
00
Address
1
1 to 247
01
Function Code
1
0x05
02
~
03
Output Channel
Number
2
This value is the same as bytes 02 and 03 of
the Request
04
~
05 Output Value
2
This value is the same as bytes 04 and 05 of
the Request
Error Response
Byte Description
Length Value
00
Address
1
1 to 247
01
Function Code
1
0x85
02
Exception Code
1
Refer to the Modbus standard for more details