
LeveLine
®
Instruction Manual
10401-01026 Rev D
6.12. MODBUS Data Frame Format
Each data frame transferred via the RS-485 interface represents one byte of data. A data
frame has the following format:
1. 1 start bit (space/0)
2. 8 (RTU mode) or 7 (ASCII mode) data bits (least significant bit first)
3. 1 parity bit (default: even)
4. 1 stop bit (mark/1)
6.13. MODBUS Communication Sequence
All Modbus communication transactions are initiated by the master. The master initiates a
transaction by transmitting a command packet. Commands fall into two categories:
broadcast and unicast.
Unicast commands are used for addressing slave devices individually. An addressed slave
device processes the command and sends an appropriate response packet back to the
master.
Broadcast commands are used for addressing all slave devices at once. All slaves devices
process broadcast commands, but do not send anything back to the master in response
(because this would cause bus contention).
6.14. MODBUS Data Packet Format
All Modbus data packets have the format:
Field
Size
Content
<a>
1 byte
Slave address (valid values 0x01-0xF7 when a single
slave is addressed, 0x00 for commands broadcast to
all slaves)
<function-
code>
1 byte
Function code that identifies the function of the data
packet (valid values 0x01-0x7F for commands &
successful responses, 0x81-0xFF for exception
responses)
<data>
0-252
bytes
Function dependent data
<crc>
2 bytes
16-bit cyclic redundancy check
In broadcast commands sent by the master, the address byte will contain 0. In unicast
commands, the address byte will contain the address of the slave device to which the
command is being sent.
In responses from slaves, the address byte will contain the address of the slave which
generated the response.
If the LeveLine
®
successfully handles a command, its response will contain the same
function code as the command. If it cannot successfully handle a command, the LeveLine
®
will generate an exception response with the function code set to 0x80 + the command's
function code.
In the <data> field, numerical values of size greater than 8 bits are transmitted most
significant byte first. In the <crc> field, the CRC is transmitted least significant byte first.
The maximum packet size is 256 bytes.
© 2019 Aquaread
®
Ltd.
www.aquaread.com
Page 77 of 90