ICP DAS, ZT-2017 and ZT-2017C AI Series User Manual, Version 1.0.1
Page 110
Copyright © 2012 by ICP DAS Co., Ltd. All Rights Reserved.
6.3.4
02 (0x02) Reading the Discrete Inputs
Description
This function code is used to read the current digital input values from the
ZT-2000 I/O module.
Request
Byte Description
Length Value
00
Address
1
1 to 247
01
Function code
1
0x02
02
~
03
Starting Channel
Number or
Address Mapping
2
See Section 6.3.1 for details
04
~
05
Output Channel
Number or Bit
Count
2
0x0001 to 0x0020
Response
Byte Description
Length Value
00
Address
1
1 to 247
01
Function Code
1
0x02
02
Byte Count
1
Byte Count of the Response
(B=(Bit Count + 7)/8)
03
Bit Values
B
(Bit Values)
Error Response
Byte Description
Length Value
00
Address
1
1 to 247
01
Function Code
1
0x82
02
Exception Code
1
Refer to the Modbus standard for more
details