Modbus CRC / LRC & Register Addressing
Compute Modbus RTU CRC-16 and ASCII LRC, build complete frames, and map 1-based references like 40001 to 0-based PDU addresses.
Sample input is pre-filled and editable. Everything runs locally in your browser — nothing is uploaded.
FAQ
Modbus uses CRC-16/MODBUS: reflected poly 0x8005, init 0xFFFF, check 0x4B37 for 123456789. CRC-16/ARC (init 0x0000) must not be used for RTU.
Modbus RTU appends the CRC little-endian. For 01 03 00 00 00 0A the word is 0xCDC5 and the wire bytes are C5 CD; the tool shows both.
40001 is a 1-based human reference; the wire address is 0x0000. 40010 maps to 0x0009 — this off-by-one is a common field debugging mistake.
How to use
The article body below is currently available in full only in Chinese; the interface, titles, descriptions and FAQ follow your selected language.
- 输入 RTU 报文 hex(不含 CRC),得到 CRC 低/高字节、RTU 完整帧、LRC 与 ASCII 帧。
- 在地址换算区选择寄存器类型并输入人机地址,得到 PDU 地址、读取功能码与带 CRC 的读请求。
本工具用 LRC 计算 ASCII 帧、用 CRC-16/MODBUS 计算 RTU 帧,两者不能混用。读请求的数量按规范限制 0x01/0x02 最多 2000 个位、0x03/0x04 最多 125 个寄存器。
地址与功能码
| 类型 | 起始人机地址 | 报文起始地址 | 读功能码 |
|---|---|---|---|
| Coil | 00001 | 0x0000 | 0x01 |
| Discrete Input | 10001 | 0x0000 | 0x02 |
| Holding Register | 40001 | 0x0000 | 0x03 |
| Input Register | 30001 | 0x0000 | 0x04 |
RTU 帧间隔必须大于等于 3.5 个字符时间,ASCII 帧以
:开头、CRLF 结尾并用 LRC 校验。