Modbus CRC Errors: Causes and Fixes

Every Modbus RTU frame ends with a 16-bit CRC — a checksum the receiver recomputes and compares. Match: the frame is accepted. Mismatch: the frame is silently discarded, and QModMaster reports a CRC error. A CRC error never means your data was “almost right” — it means the frame was corrupted somewhere between the two devices. Here are the six causes, in roughly the order you should check them.

One scope note: Modbus TCP has no CRC — integrity is handled by TCP itself. If you see checksum errors on a TCP connection, suspect the serial side of a gateway.

The 6 common causes

CauseWhat’s happeningFix
Baud rate mismatchThe receiver samples each bit at the wrong moment, so bytes decode as garbageSet identical baud/parity/stop bits on both ends; drop to 9600 8N1 to test
Electrical noiseVFDs, motors, contactors, and welders inject spikes that flip bitsRoute the cable away from power wiring; use shielded twisted pair; ground the shield at one end only
A/B wiring faultsLoose terminals, a swapped pair, or no common ground referenceRe-seat every terminal; verify A→A, B→B; add a ground wire between devices
Missing terminationSignal reflections on longer runs corrupt bit edgesFit 120 Ω resistors across A/B at both physical ends of the bus
Cable too long — or the wrong cableAttenuation and crosstalk (flat “telephone” cable is a classic offender)RS485 allows ~1200 m at low baud, much less as baud rises; use proper twisted pair and shorten the run
Bus contentionTwo masters transmitting at once, or a slave replying while another device talksExactly one master per bus; stagger polling so scans never overlap

Fix them in this order

  • Drop both ends to 9600 8N1 and retest — this eliminates configuration as a variable in one move.
  • Temporarily test with a short, known-good cable — if errors vanish, the installed cable is the problem.
  • Add the 120 Ω termination resistors at both ends.
  • Physically separate the bus cable from mains and motor wiring.
  • Still failing? Capture the raw frames with a USB logic analyzer and compare them against QModMaster’s bus monitor — corruption visible on the wire but not in software points at the adapter or its driver.

To see corruption with your own eyes, capture the raw frames: USB logic analyzers let you compare what’s electrically on the bus against what QModMaster’s bus monitor shows.

Frequently asked questions

Can I get CRC errors on Modbus TCP?

Not genuine ones — Modbus TCP frames carry no CRC field; TCP’s own checksums guard the data. Checksum errors on a TCP setup almost always mean a serial-to-TCP gateway is mangling frames on its RS485 side. Troubleshoot the gateway’s serial port.

The errors are occasional, not constant. What does that tell me?

Occasional corruption is the signature of electrical noise or a loose connection — something environmental. A constant stream of CRC failures points at configuration: baud rate, parity, or framing mismatch.

Can a cheap USB adapter cause CRC errors?

Yes. Poorly isolated adapters and flaky virtual-COM drivers can mangle bit timing. Before rewiring the plant, try a different USB port, a shorter cable, or a better adapter — it’s the cheapest experiment on this list.

Do CRC errors damage the slave device?

No. A frame that fails its CRC is discarded before anything is executed — the device never acts on it. The real danger is stale data: your master keeps displaying the last good values while fresh ones never arrive, so treat persistent CRC errors as a data-freshness problem.

Related Guides

Similar Posts