Page 34 of 40
BGX701-014-R03, User Manual for PT3 Transducers
Public
The following table shows the Read Holding Registers request and response packet formats, and an example
transaction.
Read Register Request Packet
(Controller to Transducer)
Read Register Response Packet
(Transducer to Controller)
Unit ID/Slave Address (1 byte)
Unit ID/Slave Address (1 byte)
03 -Function code (1 byte)
03 (Function Code) (1 byte)
Start Register (SR) (2 bytes)
Byte Count (2 x nr) (1 byte)
Number of Registers to Read (NR) (2 bytes)
First Register in range (2 bytes)
CRC Checksum (2 bytes)
Second Register in range (2 bytes)
.........
Up to register ‘n’ in range (2 bytes)
CRC Checksum (2 bytes)
Example: Reading holding registers
The transducer is configured as a Modbus slave device, with a slave address of 15. The Master requests to
read holding registers 43001 to read the configured “Modbus Slave ID” (parameter is stored in an Unsigned 16
bit format, hence requires 1 registers or 2 bytes).
Request Packet
Slave
address
Function Start Register Hi Start Register Lo Count Hi Count Lo CRC
0F
03
0B
B9
00
01
High Low
Response Packet
Slave
address
Function
Byte
Count
Reg. 1 Hi
Reg. 1 Lo
CRC
0F
03
02
00
0F
High
Low
Exceptions
Exception codes help identify possible causes for unsuccessful data response against requested queries. If a
MODBUS master device sends an invalid command to the transducer, or attempts to read an invalid holding
register, an exception response is generated. An exception may also be generated for other errors such as an
attempt to set floating point variable to an invalid value. The exception response follows the standard packet
format. The high-order bit of the function code in an exception response is set to 1.
The data field of an exception response contains the exception error code. The table below describes the
exception codes supported by the PT3 and their possible causes.