
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
Summary of Contents for XGL-C22A
Page 172: ...Chapter 8 Modbus Communication 8 23 ...
Page 246: ...Chapter 10 Program Examples 10 40 XG 5000 program Sequence Program 1 2 3 4 ...
Page 247: ...Chapter 10 Program Examples 10 41 Sequence Program 5 6 ...
Page 289: ...Appendix A 23 Sub procedure module When port open event occurs perform the next module ...
Page 291: ...Appendix A 25 The lower code shows BCC check setting ...