Query ( from master )
Response ( from slave )
Slave address (0-255)
Function code (16)
Starting address of register Hi (0)
Starting address of register Lo (0-61,
128-143)
No. of words Hi (0)
No. of words Lo (1-18)
Byte count (2-36)
Data 1 Hi
Data 1 Lo
Data 2 Hi
Data 2 Lo
CRC16 Hi
CRC16 Lo
CRC16 Hi
CRC16 Lo
Function 16: Preset Multiple Registers
53
UM0L911C
Exception Code
Name
Cause
1
Bad function code
Function code is not supported
by the controller
Illegal data address
Illegal data value
Register address out of range
Data value out of range or
attempt to write a read-only or
protected data
2
3
7-2 Exception Responses
If the controller receives a message which contains a corrupted
character (parity check error, framing error etc.), or if the CRC16 check
fails, the controller ignores the message.
However, if the controller receives a syntactically correct message
which contains an illegal value, it will send an exception response,
consisting of five bytes as follows:
slave aoffset function code + exception code + CRC16 Hi +
CRC16 Lo
Where the offset function code is obtained by adding the function
code with 128 (ie. function 3 becomes H'83), and the exception code
is equal to the value contained in the following table: