KROHNE ALTOSONIC V Modbus EN User Manual

Page 15

Advertising
background image

ALTOSONIC V

ModBus Manual 0300 rev07 E

7.30855.35.00

Page 15 of 64

5.10 Exception Responses
Except for broadcast messages, a master device expects a normal response, when it sends a query to

a slave device.

One of the four possible events can occur from the master’s query:

1.

If the slave device receives the query without a communication error and can handle the query

normally, it returns a normal response.

2.

If the slave does not receive the query due to a communication error, no response is returned. The

master program will eventually process a timeout condition for the query.

3.

If the slave receives the query, but detects a communication error (parity, CRC, LRC), no response

is returned. The master program will eventually process a timeout condition for the query.

4.

If the slave receives the query without a communication error, but cannot handle it, the slave will

return an exception response informing the master of the nature of the error.

The exception response message has two fields that differentiate it from a normal response:

1

the function code field; and

2

the data field.


Ad 1

Function Code Field

In a normal response the slave echoes the function code of the original query in the function code field

of the response. All function codes have a most significant bit of 0.

In an exception response the slave sets the most significant bit of the function code to 1.

The master recognises the exception response by means of this bit and can examine the data field for

the exception code.


Ad 2

Data field

In an exception response the slave returns an exception code in the data field.

This defines the slave condition that caused the exception.

The exception response message:

Header

Slave address

Function

Exception code

Error check

Trailer


Exception codes

Code

Name

Meaning

01

Illegal function

The function code in the query is not an allowable action for the slave.

02

Illegal data address

The data address received in the query is not an allowable address for the slave.

Advertising