User`s guide
188
CHAPTER 8 - CFW-08 OPTIONS AND ACCESSORIES
8.25
MODBUS-RTU
Modbusprotocol has been developed 1979 firstly. Currentlyit
isa wide diffusedopen protocol, used byseveral manufacturers
in different equipment. The Modbus-RTU communication of
the do CFW-08 has been developed by considering two
documents:
1.
MODBUS Protocol Reference Guide Rev. J, MODICON,
June 1996.
2.
MODBUS Application Protocol Specification,
MODBUS.ORG, may 8th 2002.
In these documents are defined the format of the messages
usedby the elements that are part of the Modbus network, the
services (orfunctions) that can be made available vianetwork,
and also how these elements exchange the data on the
network.
8.25.1.1
Transmission
Modes
Two transmissionmodes aredefinedin the protocoldefinition:
ASCII andRTU. The transmission modes define theform how
the message bytes are transmitted. It is not permitted to use
the two transmission modes on the same network.
IntheRTU modeeach transmitted word hasonestart bit, eight
data bits, 1 paritybit (optional) and 1 stop bit (2 stop bits, if no
parity bit is used). Thus the bit sequence for the transmission
of 1 byte is as follows:
8.25.1
Introduction to
Modbus-RTU Protocol
Master Query Message
Address (1 byte)
Function Code (1 byte)
Data (n bytes)
CRC (2 bytes)
Address (1 byte)
Function Code (1 byte)
Data (n bytes)
CRC (2 bytes)
SlaveAnswer Message
8.25.1.2
Message Structure in
RTU Mode
The Modbus RTU network operates in Master-Slave system
andit can consist of up to 247slaves butonly one Master. The
master always initiates the communication with a question to
a slave and the slave answers the question. Both messages
(question and answer) have the same structure: Address,
Function Code, Data and CRC. Depending on what is being
requested, only the data field has variable length.
Figure 8.34
- Message structure
Start
B0
B1
B2
B3
B4
B5
B6
B7
Parity or Stop
Stop
In the RTU mode, each data byte is transmitted as being a
single wordwith its valuedirectlyin hexadecimal. TheCFW-08
uses only this transmission mode, not having therefore,
communication in ASCII mode.










