Modbus protocol, 1 rtu frame format – KROHNE UFC 400 Modbus EN User Manual
Page 8
5
MODBUS PROTOCOL
8
UFC 400
www.krohne.com
05/2013 - 4002744801 - AD Modbus UFC 400 R01 en
5.1 RTU frame format
Using RTU (Remote Terminal Unit) format, data is transmitted as 8 bit binary characters. There
are no special characters to determine the start and end of a message frame. Synchronization is
achieved by a minimum silent period of at least 3.5 character times before the start of each
frame transmission and a maximum silent period of 1.5 character times between characters in
the same frame.
The format of the query and response frames vary slightly depending upon the function code.
The basic form is outlined below.
Command function
Frame format
Description
Silent period
3.5 x T
All transmissions must be preceded by a minimum silent
period of 3.5 x T, where T is the transmission time of a
single character. This can be calculated from the baud
rate, e.g. T = 572 µs at 19.2 kbps.
Slave address
8 bits
This is a single byte slave address which is transmitted
first and must be in the range of 1...247. Address 0 is
reserved for a broadcast address which all slaves should
recognise, and therefore requires no response.
Function code
8 bits
This is an eight bit code in the range of 1...255 although
only 126 functions exist as the codes 129...255 represent
an error condition. An error condition occurs when the
addressed slave does not accept the command, in which
case it responds with the function code + 128, i.e. with its
msb set to 1.
Register start address or
byte count when required
8 bit byte count
16 bit address
Register start address:
Register start address:
Register start address:
Register start address: for a query command that requires
data to be returned, this field will contain the 16 bit start
address of the register (or data) to be returned.
Note that the signal converter uses protocol addresses.
Therefore the register address listed is the actual number
required in the Modbus command.
E.g:
E.g:
E.g:
E.g: to access input register 30006, the register start
address is 30006 = 0x7536.
Byte count:
Byte count:
Byte count:
Byte count: In general this is only present in frames that
are transferring data, and has a value equal to the number
of bytes contained in the data field. The data field is limited
to a maximum of 250 bytes.
Number of points or data
bytes when required
n × 8 bits
Number of points:
Number of points:
Number of points:
Number of points: for a query command that requires data
to be returned, this field will contain the number of
registers to be returned regardless of their bit size.
Data bytes:
Data bytes:
Data bytes:
Data bytes: contains the data requested. The signal
converter can use Big Endian format (MSB first) or Little
Endian format (LSB first).
CRC
16 bits
This field contains a 16 bit CRC which is calculated on all
the data bits of the message bytes.