beautypg.com

Modbus protocol description and set-up, 5 supported functions – KROHNE ALTOSONIC V12 EN User Manual

Page 115

background image

MODBUS PROTOCOL DESCRIPTION AND SET-UP

10

115

ALTOSONIC V12

www.krohne.com

04/2013 - 4002643502 - MA ALTOSONIC V12 R02 en

The contents of the error checking field for the entire message depend on the transmission
mode.

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.

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.

10.4.5 Transmission gaps

Gaps that exceed a specific value during the transmission of a message will be qualified as a
transmission error.

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.

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.

10.4.6 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.
The time out interval is set by a parameter in the master system: request_to_response_timeout

request_to_response_timeout

request_to_response_timeout

request_to_response_timeout.

10.5 Supported functions

A number of functions is available to perform operations on variables in the slave.

An operation can be a “read” operation to obtain the value of a variable or a “write” operation to
assign a value to a variable. Variables are identified by means of their register number (address).

Typically in a Modbus slave, data can be stored in multiple areas that can be seen as different
memories:

• Discrete Inputs: data from logical (also called binary, Boolean, or ON/OFF) inputs. By nature

the data in this area is "read-only": the master has only access to read this data.

• Coils: logical (also called binary, Boolean, or ON/OFF) outputs. The master device may read

the current state of an output, but may also set or change the state of an output.