2 Protocol description
2.9
Error processing
Error codes
Response in
the
event of an
error
Example
Special cases
18
The following error codes exist:
1
invalid function
2
invalid parameter address or too many words
are to be read or written
8
write access to parameter denied
Slave
Function
address
XX OR 80h
1 byte
1 byte
0x80 is used to set the function code to its OR status, i.e. the MSB (most
significant bit) is set to 1.
Data request:
01
03
40
00
Response (with error code 2):
01
83
02
CRC16
The slave not responding can have the following causes:
- the baud rate and/or data format of Master and Slave are not compatible
- the device address used does not coincide with that of the slave address
- the checksum (CRC16) is not correct
- the instruction from the Master is incomplete or over-defined
- The number of words to be read is zero.
In these cases the data request should be transmitted again once the timeout
time (2 s) has elapsed.
Error code
1 byte
00
04
CRC16
Checksum
CRC16
2 bytes