0X02) Read Discrete Inputs - ICP DAS USA I-7021 User Manual

I-7000/7022/7024 series, m-7022/7024/7028 series
Table of Contents

Advertisement

M-7024R, M-7024U

3.2 02 (0x02) Read Discrete Inputs

This function code is used to read the digital input status of a
module.
Request
00
Address
01
Function code
02 ~ 03 Starting channel
04 ~ 05 Number of input
channels
Note: This function is only available to the M-7024R and M-7024U.
Response
00
Address
01
Function code
02
Byte count
03
Data of input
channels
Error Response
00
Address
01
Function code
02
Exception code
I-7021/22/24, M-7022/24/28 User Manual, Rev: B2.3
1 Byte
1 to 247
1 Byte
0x02
2 Bytes 0x20 to 0x24 for M-7024R
0x20 to 0x23 for M-7024U
where 0x20 corresponds to
channel 0, 0x21 corresponds to
channel 1, etc
2 Bytes 1 to 5 for M-7024R
1 to 4 for M-7024U
1 Byte
1 to 247
1 Byte
0x02
1 Byte
1
1 Byte
A bit corresponds to a channel.
When the bit is 1 it denotes that
the channel is on. If the bit is 0 it
denotes that the channel is off.
1 Byte
1 to 247
1 Byte
0x82
1 Byte
02: starting channel out of range
03: (starting channel + number of
input channels) out of range,
incorrect number of bytes
received
155

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents