I-7088 and M-7088 User Manual, Rev: A1.2 7MH-026-A12
136
3.2. 04 (0x04) Read DI Count
This function code is used to read the count of the analog input
channels.
Request
00 Address
1
Byte
1 to 247
01 Function
code 1
Byte
0x04
02 ~
03
Starting channel
2 Bytes 0x00 to 0x0F, where 0x00
corresponds to the low
word of channel 0, 0x01
corresponds to the high
word of channel 0, etc
04 ~
05
Number of input
channels (N)
2 Bytes N, 1 to 8; (Starting channel
+ N) should be less than or
equal to 0x08
Response
00
Address
1 Byte
1 to 247
01 Function
code 1
Byte
0x04
02
Byte count
1 Byte
2 x N
03 ~
Input channel data 2 x N
Bytes
Data in 2’s complement
hex format.
Error Response
00
Address
1 Byte
1 to 247
01 Function
code 1
Byte
0x84
02
Exception code
1 Byte
02: The starting channel is
out of range
03: (The starting c
number of input channels)
is out of range, or an
incorrect number of bytes
were received