Main Menu 

 Technical Support Home 
 

   

Modbus RTU Protocol and the Honeywell SI FTA

Modbus RTU protocol is used extensively for industrial communications. It is one of the three main variants of Modbus protocol:
  • Modbus ASCII (serial RS232 or RS485)
  • Modbus RTU (serial RS232 or RS485)
  • Modbus TCP
See http://www.modbus.org for more information.

Direct RS232 or RS485 Links
Modbus RTU and Modbus ASCII are designed for use with a direct connection using RS232, RS485, or with suitable short-haul modems or line drivers.

Multiplexed Links
Satellite links, microwave links and the public telephone network are all examples of multiplexed communications links. Given the widespread use of digital telephone exchanges, even an analog leased line is usually a time-division multiplexed link.

Care has to be taken when using Modbus RTU over time-division-multiplexed links, since Modbus RTU protocol uses a time interval to mark the end-of-frame, instead of an end-of-frame character.

Furthermore, the protocol definition (see below) calls for the Modbus message to consist of a more-or-less continuous stream of bytes.

With multiplexed links, the sequence of bytes that form a single Modbus message may actually be sent as two or more groups of bytes, and a problem can arise if there is a significant delay between these groups of bytes when they arrive at the receiving device.

Depending on the logic in the receiver, the bytes may be incorrectly interpreted as two or more packets rather than one. This can result in the Message Framing Errors or Message Timeouts, depending on the logic in the receiver.

Honeywell SI-FTA
The Honeywell SI-IOP and SI-FTA supports Modbus or Allen-Bradley (DF1) communications. In the case of Modbus, the SI-FTA tightly adheres to the Modbus specification, so much so that it appears to implement a more rigorous inter-character time delay constraint than actually required by the Modbus specification.

Analysis of the Problem
The following section is taken from the Modicon Modbus Protocol Reference Guide, PI-MBUS-300 Rev. J. The section in bold describes the inter-character timing interval that is relevant to the problem discussed here.

RTU Framing
In RTU mode, messages start with a silent interval of at least 3.5 character times. This is most easily implemented as a multiple of character times at the baud rate that is being used on the network (shown as T1-T2-T3-T4 in the figure below). The first field then transmitted is the device address.

The allowable characters transmitted for all fields are hexadecimal 0-9, A-F. Networked devices monitor the network bus continuously, including during the 'silent' intervals. When the first field (the address field) is received, each device decodes it to find out if it is the addressed device.

Following the last transmitted character, a similar interval of at least 3.5 character times marks the end of the message. A new message can begin after this interval.

The entire message frame must be transmitted as a continuous stream. If a silent interval of more than 1.5 character times occurs before completion of the frame, the receiving device flushes the incomplete message and assumes that the next byte will be the address field of a new message.

Similarly, if a new message begins earlier than 3.5 character times following a previous message, the receiving device will consider it a continuation of the previous message. This will set an error, as the value in the final CRC field will not be valid for the combined messages. A typical message frame is shown below.
Figure 4 RTU Message Frame


Modbus Framing in Practice
The Modbus specification effectively describes two timing constraints:

  • A maximum inter-character gap of 1.5 characters
  • A 3.5 character end-of-frame interval

In practice, most Modbus communications drivers use only the 3.5 character end-of-frame delay when processing a stream of received data bytes.

Honeywell SI-FTA Intercharacter Delay
In addition to the 3.5 character end-of-frame interval, the Honeywell SI-FTA also implements the check on the inter-character gap. The issue, however, is that it appears to be a misinterpretation of the Modbus specification, since it measures the inter-character gap from the beginning of one character to the beginning of the next one.

This effectively reduces the 1.5 character allowable gap to a 0.5 character gap, and is the cause of many problems when interfacing to the SI-FTA, especially when using Modbus over a multiplexed communications network instead of with a point-to-point link.

Solution
There are a number of solutions to the problem:

  • Reduce the baud rate. This is the simplest approach, and usually perfectly satisfactory.
  • If using a TCP/IP network, use a serial-TCP converter such as the Lantronix CoBox (see http://www.lantronix.com/ ) to transmit the data as Modbus TCP.
  • Use Allen Bradley DF1 or Modbus ASCII instead of Modbus RTU. The Honeywell SI-FTA does not support Modbus ASCII, so a third-party converter is required
  • Use a Modbus RTU line conditioner. This is a small box that buffers the Modbus data and retransmits it in a stream that can be correctly read by the SI-FTA.

Example

Problem
A serial link in Scotland was using a Modbus link over an analog leased line through the public telephone network. There was only a small amount of data being read over the link (less than 100 registers).

The telecommunications specification for the leased line included a group delay of 1200 microseconds, or 1.2 milliseconds.

The link used Westermo modems, with a data rate of 9600 bits/sec. The Honeywell SI FTA was reporting communication errors.

Analysis
Each character in the message will consist of either 10 or 11 bits, depending on whether a parity bit is used:

  • 1 x Start Bit
  • 8 x Data Bits
  • (1 x Parity Bit)
  • 1 x Stop Bit

As the link used parity, we therefore need to allow for 11 bits per character. The following table shows the corresponding character width, along with the width of a 0.5 character gap.

For the link to work satisfactorily, the worst case group delay must be less than the inter-character time permitted by the SI-FTA.

The following table summarises the inter-character delay as a function of baudrate, and also shows the expected performance of the link based on a 1.2 millisecond group delay. The link is deemed acceptable if (0.5 x CharacterWidth) is more than 1.2 milliseconds.

Baud Rate  Character Width (ms)  0.5 * Character Width (ms)  For 1.2 ms Group Delay 
19200 0.573 0.286 Fail 
9600 1.146 0.573 Fail 
4800 2.292 1.146 Marginal Fail 
2400 4.583 2.292 Acceptable 
1200 9.167 4.583 Acceptable 

As there is not a lot of data (less than 100 registers), the most straightforward solution is to decrease the baud rate. In this particular case, reducing the data rate to 1200 bits/sec allowed the link to operate well within specificiation.

Obviously, all active components in the communications link (master and slave devices and the modems) need to be reconfigured for the new baud rate settings, and may require a reset in order to start working at the new baud rate.