
Chapter 8 Modbus Communication
8-4
(4) Error check area
It determines if frame is normal or not by using CRC check of 2 byte.
(5) Modbus address regulation
Address in the data starts from 0 and it is same with value that is minus 1 from modbus memory, Modbus
address 2 is same with address 1 of data.
8.3.3 Data and expression of address
To express data and address of modbus protocol, the characteristic is as follows.
(1) It used hexadecimal as basic form.
(2) In the ASCII mode, Hex data is converted into ASCII code.
(3) RTU mode uses Hex data.
(4) Each function code has following meaning.
Code(Hex)
Purpose
Used area
address
Max. response data
01
Read Coil Status
Bit output
0XXXX
2000bit
02
Read Input Status
Bit input
1XXXX
2000bit
03
Read Holding Registers
Word output
4XXXX
125word
04
Read Input Registers
Word input
3XXXX
125word
05
Force Single Coil
Bit output
0XXXX
1bit
06
Preset Single Register
Word output
4XXXX
1word
0F
Force Multiple Coils
Bit output
0XXXX
1968bit
10
Preset Multiple Registers
Word output
4XXXX
120word
8.3.4 Reading data of bit type at the bit output (01)
(1) Reading bit of output area (function code: 01)
In case of reading data of bit type, request and response frame is as follows.
Detail of frame is applied in case of ASCII mode.
(a) Request frame
Frame
Station
no.
Function code
(01)
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)
Frame
Station
no.
Function code
(01)
No. of byte
Data
Frame error check
Tail (CRLF)
Size (byte)
1
1
2
N
2
2
Содержание 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 ...