Modbus tools that run entirely in your browser. 完全跑在浏览器里的 Modbus 工具。

Build a frame, check its CRC, decode a reply, convert a float register — no install, no account, no data leaving your machine. The frame builder can also talk to a real device over Web Serial in Chrome or Edge.

构建报文、校验 CRC、解析应答、转换浮点寄存器——不用装软件,不用注册,数据不出你的电脑。帧构建页还可以通过 Web Serial 在 Chrome / Edge 里直接连真实设备。

01

Frame Builder & Decoder报文构建与解析

Pick a function code, fill in start address and quantity, get the exact bytes with CRC or MBAP header. Paste any reply to decode it field by field.

选功能码、填起始地址与数量,直接得到带 CRC / MBAP 头的完整字节;粘贴任意应答即可逐字段解析。

CRC

CRC-16 / LRC CalculatorCRC-16 / LRC 计算

Checksum for RTU and ASCII frames, with validation of frames that already carry one and a byte-by-byte trace of the calculation.

计算 RTU 与 ASCII 帧的校验码,可校验已有帧,并能逐字节查看计算过程。

f32

Register Value Converter寄存器数值转换

Float32, int32, uint32, int16 and float64 in every byte order — see all four interpretations of the same two registers at once.

Float32、int32、uint32、int16、float64 全字节序互转,一屏对比同一组寄存器的四种解释。

FC

Function & Exception Codes功能码与异常码

Every function code with its maximum quantity per request, all exception codes, addressing conventions and serial line defaults.

全部功能码与单次数量上限、异常码含义、地址习惯与串口默认参数。

?

Troubleshooting Checklist排错清单

No response, CRC errors, exception 02, byte-order surprises, RS-485 wiring and TCP connection failures — cause and fix for each.

无应答、CRC 错误、异常码 02、字节序错位、RS-485 接线与 TCP 连不上——逐条给原因和解决办法。

3

RTU vs TCP vs ASCII三种帧格式对比

The three Modbus framings side by side, with annotated example frames and the timing rules that only RTU has.

三种封装方式逐项对比,附带注解的示例报文,以及只有 RTU 才有的时间规则。

A request and a response, byte by byte一次请求与应答,逐字节拆开

Read 3 holding registers at 0x006B, unit 0x11读 3 个保持寄存器,起始 0x006B,从站 0x11

11 03 00 6B 00 03 76 87
│  │  └──┬─┘ └──┬─┘ └──┬─┘
│  │     │      │      └── CRC-16 (low byte first)
│  │     │      └───────── quantity: 3 registers
│  │     └──────────────── start address 0x006B
│  └────────────────────── function 03 = read holding registers
└───────────────────────── unit / slave ID 0x11

The reply: 6 data bytes + CRC应答:6 个数据字节 + CRC

11 03 06 AE 41 56 52 43 40 49 AD
      │  └──────┬──────┘ └──┬─┘
      │         │           └── CRC-16
      │         └────────────── 3 × 16-bit registers
      └──────────────────────── byte count = 6

Values: 0xAE41, 0x5652, 0x4340. Interpreted as int16 they are negative; as float32 pairs they are meaningless — which is why the converter exists.数值为 0xAE41、0x5652、0x4340。按 int16 解释是负数,按 float32 配对则毫无意义——这正是需要数值转换器的原因。

What this site does and does not do这个站点做什么、不做什么

Everything is local全部在本地

All parsing and arithmetic happen in your browser. No request carries your frames anywhere, and there is no account to create.

解析与计算都在浏览器里完成,报文不会发往任何服务器,也不需要注册账号。

Real hardware, where the browser allows it能连真机,但受浏览器限制

Web Serial needs Chrome or Edge on desktop, and the page must be served over HTTPS. Firefox, Safari and phones cannot open a serial port — the rest of the site still works.

Web Serial 需要桌面版 Chrome 或 Edge,且页面必须是 HTTPS。Firefox、Safari 和手机无法打开串口,但站内其它功能照常可用。

No device templates不内置厂商模板

This is a protocol tool, not a product configurator. It knows Modbus, not your register map — bring the map from your device manual.

这是协议工具,不是产品配置器。它只懂 Modbus,不懂你的寄存器表——请对照设备手册使用。

Common questions常见问题

Why does my frame end with two bytes that look random?为什么我的报文末尾有两个"随机"字节?

That is the CRC-16, appended low byte first. It is computed over every preceding byte of the frame (not including itself). Change one bit anywhere and both bytes change. The CRC calculator shows both the value and the order to append it in.

那是 CRC-16,低字节在前。它对帧内前面所有字节计算(不含自身),改动任意一位这两个字节都会变。CRC 计算页会同时给出数值和追加顺序。

Why are my float values wildly wrong but the bytes look right?字节看着没错,为什么浮点值差得离谱?

Almost always word order. A float32 spans two 16-bit registers, and devices disagree on whether the high word comes first. Try CDAB or BADC in the converter before suspecting the device.

几乎总是字序问题。float32 占两个 16 位寄存器,设备对高字在前还是在后并不统一。先用转换页试 CDAB 或 BADC,再去怀疑设备。

Can I use this to talk to a PLC from a web page?能用网页直接跟 PLC 通讯吗?

Only over serial (RTU/ASCII) via Web Serial. Browsers cannot open raw TCP sockets, so Modbus TCP from a page needs a local bridge or an HTTP-to-Modbus gateway — the builder still generates the exact TCP bytes for you to send through it.

只能通过 Web Serial 走串口(RTU / ASCII)。浏览器无法直接开 TCP socket,网页要发 Modbus TCP 必须配本地桥接或 HTTP 转 Modbus 网关——构建页仍会生成准确的 TCP 字节供你转发。