EasyManua.ls Logo

Siemens SITRANS F Modbus RTU RS 485 - Read Multiple Registers (03 Hex)

Siemens SITRANS F Modbus RTU RS 485
76 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
6.3 Read multiple registers
Command messages
The multiple register read functions (03hex) allows the master to request information from the
slave. The command message of a multiple register read is structured as shown below. Each row
in the table compares to byte in the message – top byte (Slave address) is transmitted 󹪝rst.
The initial slave address is 1. Address 0 (broadcast) and other values between 1 and 255 can be
used.
The function code of this message is 03hex (read multiple registers)
The starting register is the 󹪝rst register to be read.
The quantity indicates how many consecutive 16-bit registers are to be read. The quantity may
range from 1 to 26 registers. If the quantity is greater than 26 an error code of 03 hex is returned
in the exception response message.
A CRC value is generated from a calculation using the values of the slave address, function code,
and data sections of the message. When the slave receives the command message it calculates
a CRC-16 value and compares it to the one in the CRC-16 󹪝eld of the command message. If these
two CRC-16 values are the same the slave has received the proper command message. If the two
CRC-16 values are not the same the slave will not respond.
If the command message has a valid slave address, function code, starting register and quantity
value the slave will respond with a normal response message. If the command message has an
invalid function code, starting register and/or quantity the slave will respond with an exception
response message.
Table 6-5 Read multiple registers command messages
Message byte Example
Slave address xxhex
Function code 03hex
Starting register Upper 00hex
Lower 20hex
Quantity Upper 00hex
Lower 04hex
CRC-16 Lower xxhex
Upper xxhex
Normal response
The normal response message contains the same slave address and function code as the
command message.
The Byte count is the number of data bytes returned in the response message. The number is
actually the quantity (in the command message) times 2, since there are two bytes of data in
each register.
Functions codes
6.3 Read multiple registers
Modbus RTU RS 485
26 Operating Instructions, 03/2021, A5E00753974-AB

Related product manuals