137
ADVANCED USER GUIDE
IP66/Nema 4X variable speed drive
OPERATION WITH MODBUS RTU
CONTROL TECHNIQUES
3854 en - 03.2008 / b
21.4.6 - Example
Drive address = 11.
Reads 3 parameters from
1.08
.
0108 becomes 0107 which is equal to 006B in hexadecimal
(Modbus address = parameter address - 1).
• Request
• Response
21.4.7 - Wait time
In MODBUS RTU, when the master sends a message to a
slave, it imposes a wait time between the end of its request
and the start of the response from the slave, which makes it
possible to detect any missing response.
21.4.8 - Exceptions
If the message is incorrect and the frame is not received, or if
the CRC trips, the slave will not produce an exception, and in
this case the master will not receive a response from the slave
("timeout"). If a write request (function code 16 or 23) exceeds
the maximum size accepted by the slave, then the slave will
reject the message. No exception will be transmitted and the
master will not receive a response.
21.4.9 - CRC
This control word is used to detect transmission errors. It is
calculated on 16 bits from all the bytes in the question and
response frames.
Algorithm:
START
CRC = 0xFFFF
Number of bytes processed = 0
Next byte = first byte
REPEAT
{
Byte to be processed = next byte;
CRC = CRC XOR byte to be processed
REPEAT eight times
{
IF (CRC odd) then
CRC = CRC/2 XOR
0xA001
else
CRC = CRC/2
}
Number of bytes processed = Number of bytes
pro 1
}
WHILE(Number of bytes processed
≤
Number of bytes
to be processed)
END.
Example (hex) RTU (binary)
Slave address
B
0000 1011
Function
03
0000 0011
Start word address (MS byte) 00
0000 0000
Start word address (LS byte) 6B
0110 1011
Number of words (MS byte) 00
0000 0000
Number of words (LS byte)
03
0000 0011
Check
CRC (16 bits)
Total bytes:
8
Example (hex)
RTU (binary)
Slave address
B
0000 1011
Function
03
0000 0011
Number of bytes
06
0000 0110
Word 0 (MS byte)
02
0000 0010
Word 0 (LS byte)
2B
0010 1011
Word 1 (MS byte)
00
0000 0000
Word 1 (LS byte)
00
0000 0000
Word 2 (MS byte)
00
0000 0000
Word 2 (LS byte)
63
0110 0011
Check
CRC (16 bits)
Total bytes:
11