34
P/N 130426 Rev.
D
Banner Engineering Corp.
•
Minneapolis, U.S.A.
www.bannerengineering.com • Tel: 763.544.3164
A-GAGE EZ-ARRAY
Instruction Manual
Appendix
A.1 Modbus Specifications and Message Formats
For the latest Modbus protocol and specifications, please visit
The EZ-ARRAY is compliant with Modbus v1.1a. EZ-ARRAY
utilizes the RTU transmission Mode. The RTU message frame is
depicted below.
Table A–1. RTU Message Frame
Slave
Address
Function
Code
Data
Cyclic
Redundancy
Check (CRC)
1 byte
1 byte
0 up to 252
bytes(s) (High
Byte, Low Byte)
2 bytes (CRC
Low, CRC Hi)
The slave address can be assigned a value in the range 1-247.
Three function codes are supported:
(0x03) Read Holding Registers
(0x04) Read Input Registers
(0x10) Write Multiple Holding Registers
The data in the registers is transmitted in big endian order
(HIGH byte, LOW byte).
A.1.1 Read Holding Registers (0x03)
This function code is used to read the contents of a contiguous
block of EZ-ARRAY holding registers. The command specifies
the starting address and the number of registers. The EZ-
ARRAY employs a direct addressing scheme. For example,
the holding register at address 40001 is accessed by reading
address 40001 (0x9C41) directly (i.e. the starting address is
not an offset). The register data in the response message are
packed as two bytes per register. For each register, the data is
returned in a big endian order (HIGH byte, LOW byte).
Request
Function Code
1 byte
0x03
Starting Address
2 bytes
0x0000 to 0xFFFF
Quantity of
Holding Registers
2 bytes
0x0001 to 0x007D
Response
Function Code
1 byte
0x03
Byte Count
1 byte
2 X N*
Holding Registers
N X 2 Bytes
* “N” is the number of holding registers
Error
Error Code
1 byte
0x83
Exception Code
1 byte
1 to 4
Example A–1. Reading Holding Registers
Request
Response
Field Name
(Hex)
Field Name
(Hex)
Slave Address
41
Slave Address
41
Function
03
Function
03
Starting Address
(HIGH Byte)
9C
Byte Count
06
Starting Address
(LOW Byte)
41
Register 40001
(HIGH Byte)
02
Quantity of Registers
(HIGH Byte)
00
Register 40001
(LOW Byte)
2B
Quantity of Registers
(LOW Byte)
03
Register 40002
(HIGH Byte)
00
CRC (LOW Byte)
75
Register 40002
(LOW Byte)
00
CRC (HIGH Byte)
4F
Register 40003
(HIGH Byte)
00
Register 40003
(LOW Byte)
64
CRC (LOW Byte)
34
CRC (HIGH Byte)
B9
The contents of addresses 40001, 40002, and 40003 are the
two-byte values 0x022B (555 decimal), 0x0000 (0 decimal), and
0x0064 (100 decimal), respectively.
A.1.2 Read Input Registers (0x04)
This function code is used to read from 1 to 125 contiguous
EZ-ARRAY input registers. The command specifies the starting
address and the number of registers. The EZ-ARRAY employs
a direct addressing scheme. For example, the input register at
address 30001 is accessed by reading address 30001 (0x7531)
directly (i.e. the starting address is not an offset). The register
data in the response message are packed as two bytes per
register. For each register, the data is returned in big endian
order (HIGH byte, LOW byte).
Appendix A. Modbus Reference