
Chapter 8 Modbus Communication
8-6
8.3.5
Read Input Status
(02)
(1) Reading bit of input area
In case of reading data of bit type of input area, request and response frame is as follows.
Tail of frame is applied in case of ASCII mode.
(a) Request frame
Classification
Station
no.
Function code
(02)
Address
Data size
Frame error check
Tail (CRLF)
Size (byte)
1
1
2
2
2
2
(b) Response frame (In case of receiving normal frame)
Classification
Station
no.
Function code
(02)
No. of byte
Data
Frame error check
Tail (CRLF)
Size (byte)
1
1
2
N
2
2
(c) Response frame (In case of receiving abnormal frame)
Classification
Station no.
Error code
Exceptional code
Tail (CRLF)
Size (byte)
1
1
1
2
(2) Details of frame
(a) Station no.: indicates station no. of slave to read bit of input area
(b) Function code: ‘02’ indicating Read Input Status
(c) Address: indicating start address of data to read. It consists of 2 byte. At this time, start address conforms to
modbus address regulation.
(d) Data size: size of data to read, consists of 2 byte
(e) Frame error check: in case of ASCII mode, it uses LRC and in case of STU mode, it uses CRC for error check.
It consists of 2 byte.
(f) Tail: it is applied in case of ASCII mode, CRLF is added after LRC.
(g) No. of byte: no. of byte of data responding
(h) Data: address of request frame is start address and transmits data with byte unit.
(i) Error code: Error code is expressed by adding 80(Hex) and in case of reading bit of output area, it is expressed
82(Hex).
(j) Exceptional code: details of error, consists of 1 byte.
(3) Frame example
Example that reads bit (20~38) from station number 1 server acting as modbus RTU
(a) Request frame
Classificatio
n
Statio
n no.
Function
code
Address
Data size
Error check
Upper byte
Lower byte
Upper byte
Lower byte
Frame
01
02
00
13
00
13
CRC
(b) Response frame (When receiving normal frame)
Classificatio
n
Statio
n no.
Function
code
No. of byte
Data
Error check
Frame
01
02
03
12
31
05
CRC
(c) Response frame (When receiving abnormal frame)
Classification
Station no.
Function code
Exceptional code
Error check
Frame
01
82
02
CRC
Содержание XGL-C22A
Страница 74: ...Chapter 6 Communication Parameter 6 22 4 Click I O Sync 6 Read the message If there is no problem click OK ...
Страница 172: ...Chapter 8 Modbus Communication 8 23 ...
Страница 246: ...Chapter 10 Program Examples 10 40 XG 5000 program Sequence Program 1 2 3 4 ...
Страница 247: ...Chapter 10 Program Examples 10 41 Sequence Program 5 6 ...
Страница 289: ...Appendix A 23 Sub procedure module When port open event occurs perform the next module ...
Страница 291: ...Appendix A 25 The lower code shows BCC check setting ...
Страница 296: ...Appendix A 30 4 Example Register monitor X 5 Example execution monitor Y Address of server Monitor result ...
Страница 297: ...Appendix A 31 A 4 Dimension Unit mm XGL C22A CH2A C42A H W version Less than V2 0 H W version V2 0 or Later ...