ROOTCASTLE / LABORATORI KEJURUTERAAN
Pengesel Protokol
Pecahkan kerangka Modbus RTU, UART dan CAN.
LOCAL CALCULATION · NO DEVICE CONNECTION
Modbus RTU decoder
✓ Valid frame · Request
| Field | Bytes | Value |
|---|---|---|
| slave | 01 | 1 |
| function | 03 | 3 Read Holding Registers |
| start | 00 00 | 0 (0x0000) |
| quantity | 00 0A | 10 |
| crc | C5 CD | 0xCDC5 = 0xCDC5 |
Model and assumptions
RTU frame: address, function, data, CRC-16 (reflected polynomial 0xA001, initial 0xFFFF, low byte first). The same function code has different lengths in request and response; automatic direction can be wrong for ambiguous frames. Addresses are zero-based; the 40001 notation is a device convention. Word order of 32-bit values depends on the device.
CRC: c=0xFFFF; c^=byte; 8×{ c = c&1 ? (c>>1)^0xA001 : c>>1 }
Untuk apa
Kesilapan komunikasi medan yang paling biasa adalah CRC yang salah, alamat salah, urutan kata yang campur-campur dan tempoh habis. Tempelkan kerangka yang disalin dari pengenal atau log serial untuk melihat kerangka mana yang salah, kod pengecualian peranti dan Tafsiran yang kemungkinan tinggi nilai rekod.
Had-had
Alat ini tidak menyambung kepada peranti atau mengirim data; setiap penghitungan berjalan di talian anda. Interpretasi payload Modbus ASCII, Modbus TCP, CAN FD dan J1939/CANopen di luar jangkauan. Arah automatik boleh salah untuk kerangka ambigu; pilih secara manual.
Rujukan
Modbus over Serial Line V1.02 · Modbus Application Protocol V1.1b3 · ISO 11898-1:2015 (CAN data link layer) · Senarai CRC
Model pendidikan. Keputusan tidak mencukupi untuk mengesan mesin atau menetapkan had operasi selamat.