[focas] FOCAS — Tool number + work coordinate offsets #328

Merged
dohertj2 merged 1 commits from auto/focas/F1-d into auto/driver-gaps 2026-04-25 14:40:19 -04:00
Owner

Summary

Adds Tool number and standard G54..G59 work-coordinate offsets to the FOCAS fixed-tree, following the f1a/f1b/f1c pattern.

  • Tooling/CurrentTool (Int16) read via cnc_rdtnum.
  • Offsets/G54..G59/{X,Y,Z} (Float64) read via cnc_rdzofs(n) for n=1..6. OFSB decoder applies the data / 10^dec rule like the macro reads.
  • New FocasToolingInfo, FocasWorkOffset, FocasWorkOffsetsInfo records + GetToolingAsync/GetWorkOffsetsAsync (default-null).
  • FwlibNative.cs — new P/Invokes for cnc_rdtnum/cnc_rdzofs + IODBTNUM/IODBZOFS structs.
  • FocasCapabilityMatrix.cs — permissive SupportsTooling/SupportsWorkOffsets hooks.
  • Cache + probe-tick refresh + ReadAsync dispatch follow established f1a/b/c pattern.

Deferred per the plan/issue (effort:L):

  • Tool life (cnc_rdtlinfo/cnc_rdtlsts) — heavy ODBTLIFE union variation.
  • CurrentOffset slot — needs cnc_rdtofs against the active offset.
  • Extended G54.1 P1..P48 — uses cnc_rdzofsr.
  • Axis count fixed at 3 (X/Y/Z) per scope guidance.

Test plan

  • dotnet build src/ZB.MOM.WW.OtOpcUa.Driver.FOCAS — clean (0 / 0)
  • dotnet test tests/ZB.MOM.WW.OtOpcUa.Driver.FOCAS.Tests223 / 223 passed (6 new in FocasToolingOffsetsFixedTreeTests)
  • Integration tests — skipped (live CNC required)

🤖 Auto-generated by the Mode-B execution loop. Closes #260.

Closes #260

## Summary Adds Tool number and standard G54..G59 work-coordinate offsets to the FOCAS fixed-tree, following the f1a/f1b/f1c pattern. - **`Tooling/CurrentTool`** (Int16) read via `cnc_rdtnum`. - **`Offsets/G54..G59/{X,Y,Z}`** (Float64) read via `cnc_rdzofs(n)` for n=1..6. OFSB decoder applies the `data / 10^dec` rule like the macro reads. - New `FocasToolingInfo`, `FocasWorkOffset`, `FocasWorkOffsetsInfo` records + `GetToolingAsync`/`GetWorkOffsetsAsync` (default-null). - `FwlibNative.cs` — new P/Invokes for `cnc_rdtnum`/`cnc_rdzofs` + `IODBTNUM`/`IODBZOFS` structs. - `FocasCapabilityMatrix.cs` — permissive `SupportsTooling`/`SupportsWorkOffsets` hooks. - Cache + probe-tick refresh + `ReadAsync` dispatch follow established f1a/b/c pattern. > **Deferred per the plan/issue (effort:L)**: > - Tool life (`cnc_rdtlinfo`/`cnc_rdtlsts`) — heavy `ODBTLIFE` union variation. > - `CurrentOffset` slot — needs `cnc_rdtofs` against the active offset. > - Extended G54.1 P1..P48 — uses `cnc_rdzofsr`. > - Axis count fixed at 3 (X/Y/Z) per scope guidance. ## Test plan - [x] `dotnet build src/ZB.MOM.WW.OtOpcUa.Driver.FOCAS` — clean (0 / 0) - [x] `dotnet test tests/ZB.MOM.WW.OtOpcUa.Driver.FOCAS.Tests` — **223 / 223 passed** (6 new in `FocasToolingOffsetsFixedTreeTests`) - [ ] Integration tests — skipped (live CNC required) 🤖 Auto-generated by the Mode-B execution loop. Closes #260. Closes #260
dohertj2 added 1 commit 2026-04-25 14:40:15 -04:00
dohertj2 merged commit 84913638b1 into auto/driver-gaps 2026-04-25 14:40:19 -04:00
dohertj2 deleted branch auto/focas/F1-d 2026-04-25 14:40:20 -04:00
Sign in to join this conversation.