KROHNE OPTISONIC V6 Modbus User Manual
Page 7
2011-07-19
OPTISONIC_V6_Modbus_6.doc
7/29
K
R
O
H
N
E
C
T
P
ro
d
u
c
ts
4.4
Error Checking Methods
Two error checking methods are defined for the Modbus protocol:
•
Optional: an additional bit (parity bit) is appended to each character (or byte) for detecting errors
during the transmission of individual characters (or bytes)
•
Obligatory: two bytes (or characters) are appended to the message for detecting errors during the
transmission of the message
As an even number of bit errors in one character (or byte) will not be detected using a parity bit, the second
method is used to check the contents of the entire message.
Both character check and message check are generated in the transmitting device and appended to the
message before transmission. The slave checks each character and the entire message frame during
receipt.
The contents of the error checking field for the entire message depend on the transmission mode.
4.4.1
Error check in ASCII mode transmission
For detecting errors in the entire message the error-checking field contains two ASCII characters. The error
check characters are the result of a Longitudinal Redundancy Check (LRC) calculation. This is performed on
the message contents with exception of the beginning colon, the carriage return and line feed characters.
The LRC characters are appended to the message as the last field preceding the CR-LF characters.
4.4.2
Error check in RTU mode transmission
For detecting errors in the entire message the error-checking field contains a 16-bit value implemented as
two bytes. The error check value is the result of a Cyclic Redundancy Check (CRC) calculation performed on
the message contents. The CRC field is appended to the message as the last field.
4.5
Transmission gaps
Gaps that exceed a specific value during the transmission of a message will be qualified as a transmission
error.
4.5.1
ASCII mode
In ASCII mode the maximum time between 2 characters is one second. If a longer interval occurs, the
message will be ignored and the search for a starting character (colon) is resumed.
4.5.2
RTU mode
In RTU mode the entire message frame must be transmitted as a continuous stream. If a silent interval of
more than 3.5 character times occurs before completion of the frame, the receiving device ignores the
message and assumes the next byte will be the device-address field of a new message.
4.6
Response time out
The master device has a predetermined time-out interval before aborting a transaction.
This interval shall be set long enough for any slave to respond normally.