The format of an exception response is – Despatch Protocol 3 Modbus Communications User Manual
Page 11

Modbus Programming Manual
A
BOUT
T
HIS
M
ANUAL
Version 2
11
Copyright © 2012 by Despatch Industries.
All rights reserved. No part of the contents of this manual may be reproduced, copied or transmitted in any form or by any
means including graphic, electronic, or mechanical methods or photocopying, recording, or information storage and
retrieval systems without the written permission of Despatch Industries, unless for purchaser's personal use.
Function 23 Hex - Read / Write Multiple Registers (0x17 hex)
Reads and writes the requested number of consecutive words (two-bytes) starting at the specified
addresses.
QUERY
Function
1
st
Read
Address
Number of
Words to
Read
1
st
Write
Address
Number of
Words to Write
Values to Write
1
st
Word
2
nd
Word
etc
Last Word
17
HI
LO
HI
LO
HI
LO
HI
LO
HI
LO
HI
LO
→
HI
LO
RESPONSE
Function
Number of Bytes
Read Data
1
st
Word
2
nd
Word
etc
Last Word
17
HI
LO
HI
LO
→
HI
LO
Note:
The number of data bytes that can be read and written in one message is 253 bytes.
Exception Responses
When a QUERY is sent that the instrument cannot interpret, an Exception RESPONSE is
returned. Possible exception responses are:
Exception Code
Error Condition
Interpretation
00
Unused
None.
01
Illegal function
Function number out of range.
02
Illegal Data Address
Write functions: Parameter number out of range or not
supported. (for write functions only).
Read Functions: Start parameter does not exist or end
parameter greater than 65536.
03
Illegal Data Value
Attempt to write invalid data / required action not executed.
The format of an exception response is:
RESPONSE
Function
Exception Code
Original Function code with its Most
Significant Bit (MSB) set.
as detailed above
Note:
In the case of multiple exception codes for a single QUERY the Exception code returned is
the one corresponding to the first parameter in error.