5 exception responses – GE Industrial Solutions Entellisys Integrator’s Guide User Manual

Page 15

Advertising
background image

Modbus

®

protocol implementation

15

1.1.5.5 Exception responses

Programming or operation errors usually happen because of illegal data in a packet. These
errors result in an exception response from the slave. The slave detecting one of these errors
sends a response packet to the master with the high order bit of the function code set to 1. The
following table shows the format of the master and slave packets. The example shows a master
device sending the unsupported function code 39h to slave device 11.

Master and Slave Device Packet Transmission Example

SLAVE RESPONSE

PACKET FORMAT

EXAMPLE (HEX)

SLAVE ADDRESS

11

FUNCTION CODE

10

DATA STARTING ADDR - hi

40

DATA STARTING ADDR - lo

51

NUMBER OF SETTINGS - hi

00

NUMBER OF SETTINGS - lo

02

CRC - lo

07

CRC - hi

64

MASTER TRANSMISSION

PACKET FORMAT

EXAMPLE (HEX)

SLAVE ADDRESS

11

FUNCTION CODE

39

CRC - low order byte

CD

CRC - high order byte

F2

SLAVE RESPONSE

PACKET FORMAT

EXAMPLE (HEX)

SLAVE ADDRESS

11

FUNCTION CODE

B9

ERROR CODE

01

CRC - low order byte

93

CRC - high order byte

95

Advertising