Modbus RTU CRC calculator
When a drive, meter or PLC does not answer on Modbus RTU, you have to read the frames. Paste a frame in hexadecimal: the tool computes the CRC to append, checks the one in a received frame and explains the function and any error code.
- CRC to append (low byte, then high)
- C5 CD
- Complete frame to send
- 01 03 00 00 00 0A C5 CD
- Slave address
- 1
- Function
- 03 – Read holding registers
Indicative result: always verify against the standards and the installation method on site.
Publicité
Formula
Good to know
- Example: 01 03 00 00 00 0A → CRC C5 CD (read 10 registers from address 0 of slave 1).
- Paste a whole received frame: if its last 2 bytes are a correct CRC, the tool says so.
- Modbus TCP has no CRC: TCP checks the data.
A Modbus RTU frame, byte by byte
Slave address (1 to 247), function code (03 = read registers, 06 = write one register, 10 = write several registers…), data (start address, quantity or values), then 2 CRC bytes, low byte first.
The CRC is a signature computed over all previous bytes. The slave computes the same one and ignores the frame if it differs: a frame damaged by noise simply gets no answer.
Reading an exception response
When the slave refuses a request, it returns the function code + 0x80 (03 becomes 83) followed by an exception code. 01: function not supported. 02: address does not exist, often an offset of 1 between the manual (40001) and the real address (0). 03: invalid value or quantity. 04: internal slave failure.
An exception is good news when troubleshooting: wiring and baud rate are fine, only the content of the request needs fixing.
No answer: the RS485 checklist
Same settings everywhere: baud rate (9,600, 19,200…), parity (none, even, odd), stop bits, slave address. A single difference and nothing gets through.
Wires A and B: makers do not all name them the same (A/B, D+/D−, + / −). If nothing answers, swapping the two wires is a quick, safe test.
Bus: shielded twisted pair, a 120 Ω resistor at each end (not in the middle), a line topology without star, and a common (GND) between devices that do not share the same reference.
Only one master on the bus, and a long enough timeout: some drives answer in more than 100 ms.
Frequently asked questions
+In which order are the 2 CRC bytes sent?
Low byte first, then high byte. For 01 03 00 00 00 0A the CRC is 0xCDC5 and you send C5 then CD.
+Why does the slave answer 83 02?
Exception 02 on function 03: the requested register address does not exist. Check the maker’s table and the offset of 1 between 40001 and address 0.
+Why no answer when the wiring is fine?
Check in order: same address, baud rate and parity, A/B swapped, end-of-line resistors, a single master, and a long enough timeout.
