Strict width+kind eligibility for sum-batched scalars (others read singly); latch only on ADS 1793/1794, split 1792/1797/1798 without latching; 32 KiB per-command budget and 500-item ceiling; short sum response handled per item. Diagnostics: opt-in diagnosticsEnabled (default off), reuse the probe's ReadState, sample after the host-state transition, JitterMs renamed HeadroomMs, compact per-device line so many devices fit the 16-entry cap, unavailable-symbol latch cleared on reconnect. AdminUI: min/max on sum-read max, diagnostics checkbox. Pure planner extracted and unit-tested. Claude-Session: https://claude.ai/code/session_01Ef2ozxS7QPanGT8uoATbTe
4.3 KiB
TwinCAT driver — v3 backlog
The v2 TwinCAT driver is considered solid: 28 integration tests (14 [TwinCATFact] +
16-case [TwinCATTheory]) running live against the TCBSD fixture, 110 unit tests,
three latent driver bugs shaken out (notification cycle units, STRING(N) mapper,
bit-indexed BOOL path). Further work is deferred.
Archived from docs/drivers/TwinCAT-Test-Fixture.md § Follow-up candidates. Refreshed 2026-10-08
(Gitea #612 / #645); live-validation results live in docs/drivers/TwinCAT.md § "Live validation".
Hardware available (as of 2026-10-08)
The Elma cleaner fleet (25 presses, 23 live) is the only real TwinCAT hardware in reach, and it is production — strictly read-only:
| Press | Runtime | AMS | Notes |
|---|---|---|---|
22 presses (e.g. Z33856 10.201.45.236.1.1, Z33733 5.25.53.46.1.1) |
TC2 2.11 on WinCE 6.0 | port 801 | read-validated 2026-10-07 |
Z35474 (5.118.56.93.1.1, 10.201.23.227) |
TC3 3.1.4024 (Win NT 10) | port 851 | the only TC3 press; "Plc30 App" |
TCBSD fixture 10.100.0.128 (41.169.163.43.1.1:851) |
TC3 | 851 | not a press; unreachable from the Mac |
Access facts: ADS is TCP 48898. The driver sends no AddRoute (routes are provisioned out of band) and has
no IP field, so a host needs a local AMS router — TwinCAT XAR, or Beckhoff.TwinCAT.Ads.TcpRouter hosted
in-process (the driver csproj does not reference TcpRouter; the 2026-10-07 run used a scratch harness).
The Mac reaches the presses directly over the VPN. The PLC routes left by earlier tooling are STALE:
they name the Mac's old VPN IP (10.181.198.189), and the Mac is now 10.181.207.140, so a source NetId of
10.181.207.140.1.1 has no route on any press. We must not AddRoute on production, so the live gate for
this backlog is deferred pending a user-approved route (owner refreshes the route, or the user approves
reusing the old source NetId). Nothing below that says "live" has been run against TC3.
Status of the original items
-
TC2 coverage — DONE (read side). No longer "blocked on hardware": the 2026-10-07 Elma run (TwinCAT 2.11) verified browse, scalar/array/string reads and native notifications on TC2. What is still unverified there: sum-read support (see item 6) and anything that writes.
-
Notification coalescing under load — run the subscribe test while the PLC cycle is saturated. Needs the TCBSD fixture (loading a production press is out of the question) and the
GVL_Perf/FB_PerfChurnfixture project from the strandedauto/driver-gapsbranch. Fixture-gated. -
Multi-hop AMS route — a test behind an IPC gateway with a chained route entry. No hardware.
-
License-rotation automation — XAR's 7-day trial expires on schedule. Ops item, not code.
-
Lab rig — cheapest IPC on a dedicated network; the only route that covers real EtherCAT I/O timing and cycle jitter under CPU load. Blocked on hardware + budget.
Added by #612 / #645
-
ADS sum-read (#310) — code DONE, live gate pending. Opt-in
useSumRead/sumReadMaxItems(strict width+kind eligibility; latch only on ADS 1793/1794; seedocs/drivers/TwinCAT.md§ "Sum-read"). Unit-tested against the fake client only. Live gate (read-only, valid on a press): enable on Z33856 / Z33733 (TC2) and Z35474 (TC3), compare a batched poll to individual reads value-for-value, and record whether TC2 CE 2.11 answers or refuses the sum command (either outcome is a result — a refusal must fall back cleanly). Needs the route above. -
Driver diagnostics (#314) — code DONE (opt-in
diagnosticsEnabled, default off), live gate pending. ADS state, app name, online-change count, task cycle time, last exec time and headroom on the/hostsdiagnostics bag. Live gate: confirmTwinCAT_SystemInfoVarList._TaskInfo[1]resolves on TC2 2.11 (the driver tolerates its absence). -
Flat vs VirtualTree browse on TC3 (#612) — open. Only Z35474 is TC3; read-only symbol-table upload in both modes, compare leaf sets. Add a
SymbolsLoadModeoption only if Flat drops struct members. Needs the route. (Flat on TC2 already proved fine: 45,083 / 42,666 variables.) -
Discovered struct/FB member writes (#612) — deferred: writes, never on a press; fixture-only. Likewise sum-write was deliberately NOT ported from the stranded branch.