Sei sulla pagina 1di 1

Modbus serial transmission modes: Modbus/ASCII and Modbus/RTU

Serial Modbus connections can use two basic transmission modes, ASCII or RTU, remote terminal unit. The transmission mode
in serial communications defines the way the Modbus messages are coded. With Modbus/ASCII, the messages are in a readable
ASCII format. The Modbus/RTU format uses binary coding which makes the message unreadable when monitoring, but reduces
the size of each message which allows for more data exchange in the same time span. All nodes on one Modbus network
segment must use the same serial transmission mode. A device configured to use Modbus/ASCII cannot understand messages
in Modbus/RTU and vice versa.

When using Modbus/ASCII, all messages are coded in hexadecimal values, represented with readable ASCII characters. Only
the characters 0...9 and A...F are used for coding. For every byte of information, two communication-bytes are needed,
because every communication-byte can only define 4 bits in the hexadecimal system. With Modbus/RTU the data is exchanged
in a binary format, where each byte of information is coded in one communication-byte.

Modbus messages on serial connections are not sent in a plain format. They are framed to give receivers an easy way to detect
the beginning and end of a message. When using Modbus/ASCII, characters are used to start and end a frame. The colon ':' is
used to flag the start of a message and each message is ended with a CR/LF combination. Modbus/RTU on the other hand uses
time gaps of silence on the communication line for the framing. Each message must be preceded by a time gap with a minimum
length of 3.5 characters. If a receiver detects a gap of at least 1.5 characters, it assumes that a new message is comming and
the receive buffer is cleared. The main advantage of Modbus/ASCII is, that it allowes gaps between the bytes of a message with
a maximum length of 1 second. With Modbus/RTU it is necessary to send each message as a continuous stream.

Potrebbero piacerti anche