Device address
RTU mode address field of a message frame contains eight
bits. The possible address from the device is 0...247 (decimal),
and the address range of a single device is 1...247. When a
response message is sent from a device, it puts its address
into the address field of the response so that the master device
knows which device is responding.
Function code
RTU mode functional code field in the message frame contains
8 bits. The possible code range is decimal 1...255. When a
message is sent from the master device to the slave device, the
functional code field tells the slave device what behavior it
needs to perform. For example, to read the switching state of
the input, to read the data content of a set of registers, to read
the diagnostic status of the slave device, to allow the input,
record, verify the program in the slave device, etc.
Data field
Data field is composed of two sets of hexadecimal numbers, with
a range of 00...FF. A pair of an RTU character sent from the
master to the slave devices contain additional information: the
slave devices must be used to perform what is defined by the
functional code. This includes things like discontinuous register
addresses, the number of items to process, and the actual
number of bytes of data in the field.
CRC check
The RTU mode is selected as the character frame, and the error
detection field contains a 16 bits value (implemented with two
8-bit characters).The content of the error detection domain is
obtained by looping verbose detection of the message content.
The CRC is appended to the end of the message and is added
first in low bytes and then in high bytes, therefore, the high byte
of CRC is the last byte to send a message.
20
LSCM-D User Manual
4-Modbus Protocol