User Manual

61 MODBUS Programmable I/O NA-9379 FnIO S-Series
Copyright(C) CREVIS Co.,Ltd Support +82-31-899-4599 URL : www.crevis.co.kr
A.3.2. 2 (0x02) Read Discrete Inputs
This function code is used to read from 1 to 2000 contiguous status of discrete inputs in a remote device. The
Request PDU specifies the starting address, i.e. the address of the first input specified, and the number of inputs. In
the PDU Discrete Inputs are addressed starting at zero. Therefore Discrete inputs numbered 1-16 are addressed as
0-15. The discrete inputs in the response message are packed as one input per bit of the data field.
Status is indicated as 1= ON; 0= OFF.
Request
Field name
Example
RTU
ASCII
ASCII (bus line)
Start of Frame
-
t1-t2-t3
,
0x3A
Slave Address
0x07
0x07
07
0x30, 0x37
Function Code
0x02
0x02
02
0x30, 0x32
Starting Address Hi
0x00
0x00
00
0x30, 0x30
Starting Address Lo
0x00
0x00
00
0x30, 0x30
Quantity of Inputs Hi
0x00
0x00
00
0x30, 0x30
Quantity of Inputs Lo
0x0A
0x0A
0A
0x30, 0x41
Error Check (CRC/LRC)
-
0xF8, 0x6B
ED
0x45, 0x44
End of Frame
-
t1-t2-t3
CR, LF
0x0D, 0xA
Response
Field name
Example
RTU
ASCII
ASCII (bus line)
Start of Frame
-
t1-t2-t3
,
0x3A
Slave Address
0x07
0x07
07
0x30, 0x37
Function Code
0x02
0x02
02
0x30, 0x32
Byte Count
0x02
0x02
02
0x30, 0x32
Input Status
0x80
0x80
80
0x38, 0x30
Input Status
0x00
0x00
00
0x30, 0x30
Error Check (CRC/LRC)
-
0x50, 0x78
75
0x37, 0x35
End of Frame
-
t1-t2-t3
CR, LF
0x0D, 0xA
- In case of address 0x0015~0x0000 output bit value: 00000000_10000000.