Pitfall Log: Fixing Modbus Multithread Deadlocks

A field note on shutdown deadlocks and timeout misjudgment in a Qt multithreaded Modbus workflow, with practical fixes.

2026-03-07 · 2 min · 341 words · Intent

Modbus RTT Jitter at 30–80 ms: Gateway Measured 1–4 ms — the Root Cause Was the Test Bench

An industrial gateway (TI AM64x, Linux PREEMPT_RT) measured 30–60 ms Modbus-TCP RTT and 50–80 ms RTU jitter against a Windows simulator. After correcting the measurement semantics and running a three-step orthogonal isolation loopback (localhost → dual-NIC netns direct link → dual RS-485 crossover), the jitter is attributed to the test peer under these test conditions: board-side pure software stack 0.69 ms, physical NIC 1.02 ms, serial 4.15 ms (wire time about 70%); peer-side interventions such as the FTDI Latency Timer pinned the Windows bench’s measured lower bound at 45–50 ms, from which a reference timeout baseline is derived; a single gateway transaction consumes roughly 1%–15% of the end-to-end link budget — not a blocker.

2026-09-21 · 19 min · 3979 words · Intent

TrafficMonitor CPU Optimization Postmortem: An Engineering Simplification from 4% to 0.6%

A postmortem on CPU optimization under a high-frequency polling workload: by shrinking the UI logging path, removing high-frequency state machines, and fixing the wait model, CPU usage dropped from 3.6%~4.2% to 0.1%~0.6%.

2026-04-26 · 5 min · 974 words · Intent

Modbus-Tools Deep Dive: A Practical Modbus Workflow for Daily Debugging

A practical guide to a lightweight Modbus tool for embedded development and field commissioning: fast frame building, log viewing, Frame Analyzer with scaling/register annotations/JSON-CSV persistence, Link to Analyzer live linkage, and Force Parse.

2026-02-28 · 7 min · 1292 words · Intent