PACSystems™ RX3i and RSTi-EP CPU Reference Manual Section 6
GFK-2222AK October 2019
Serial I/O, SNP & RTU Protocols 165
6.3.1.6.5 Timeout Usage
Timeouts are used on the serial link for error detection, error recovery, and to prevent the
missing of the end of messages and message sequences. Note that although the module
allows up to three character transmission times between each character in a message
that it receives, there is no more than half a character time between each character in a
message that the module transmits. After sending a query message, the master should
wait an appropriate amount of time for slave turnaround before assuming that the slave
did not respond to the request. Slave turnaround time is affected by the Controller
Communications Window time and the CPU sweep time, as described in RTU Slave
Turnaround Time.
6.3.1.6.6 End-of-Frame Timeout
The End-of-frame timeout is a feature that compensates for message gaps that can occur
due to the use of radio modems. The timeout is added to the amount of time allowed for
receiving a message from the master. The timeout should be sized according to the
maximum gap time that could be introduced by the master’s transmitting equipment.
Starting with Release 6.70 for the RX3i, the end-of-frame timeout can be configured with
the Serial Port Setup COMMREQ function 65520. The timeout is specified in units of 100
µs. If the specified time is less than 3.5 character times, then the RTU driver sets the
timeout to 3.5 character times.
6.3.2 Cyclic Redundancy Check (CRC)
The CRC is one of the most effective systems for checking errors. The CRC consists of two
check characters generated at the transmitter and added at the end of the transmitted
data characters. Using the same method, the receiver generates its own CRC for the
incoming data and compares it to the CRC sent by the transmitter to ensure proper
transmission. A complete mathematic derivation for the CRC is not given in this section.
This information can be found in a number of texts on data communications. The
essential steps that should be understood in calculating the CRC are as follows:
▪ The number of bits in the CRC multiplies the data bits that make up the message.
▪ The resulting product is then divided by the generating polynomial (using modulo 2
with no carries). The CRC is the remainder of this division.
▪ Disregard the quotient and add the remainder (CRC) to the data bits and transmit
the message with CRC.
▪ The receiver then divides the message plus CRC by the generating polynomial and if
the remainder is 0, the transmission was transmitted without error.
A generating polynomial is expressed algebraically as a string of terms in powers of X such
as
X
3
+ X
2
+ X
0
(or 1)
which, in turn, can be expressed as the binary number 1101.
A generating polynomial could be any length and contain any pattern of 1s and 0s as long
as both the transmitter and receiver use the same value. For optimum error detection,
however, certain standard generating polynomials have been developed. RTU protocol
uses the polynomial