Table of Contents

Namespace Hi.NcParsers.Dependencys.Fanuc

Classes

FanucParameterTable

Fanuc controller parameter table. Stores system parameters (single value) and axis parameters (per-axis value) following real Fanuc parameter numbering.

FanucPositionVariableLookup

Fanuc-style position system variables read from the previous block's runtime-state JSON sections:

  • #5001-#5003Block-end position X/Y/Z (workpiece) → previous block's ProgramXyz.
  • #5021-#5023Current machine position X/Y/Z → previous block's MachineCoordinateState.
  • #5041-#5043Current absolute position X/Y/Z → previous block's ProgramXyz.

Stateless. Configured on VariableEvaluatorSyntax.RuntimeVariableLookups rather than NcDependencyList because the read needs the block node for Previous access — there is no long-lived dependency object that owns this data.

FanucToolOffsetVariableLookup

Fanuc-side adapter that exposes a wrapped ToolOffsetTable as an IVariableLookup following Fanuc Memory C tool offset addressing: #2001+N → effective height of offset N (geometry − wear).

The underlying ToolOffsetTable stays brand-neutral — Heidenhain / Siemens can use the same storage with different addressing by registering their own adapter alongside the table. Holds a reference to the table rather than owning data so writes through the table show up immediately in lookups via this adapter.

RetainedCommonVariableTable

Fanuc-style ISO controller common variable table for the retained range #500-#999. These variables survive a power cycle (in real hardware they live in NV-RAM) and are serialised into the project file.

Excluded by design:

  • Local #1-#33Call-frame scoped (Fanuc local variables); lives in the SyntaxPiece JSON dataflow, not here.
  • Non-retained common #100-#499Cleared by program-end / power reset; lives in the SyntaxPiece JSON dataflow as well, not in this table.
  • System #1000+Read-only or computed from runtime state; resolved by dedicated reading syntaxes against other dependencies (e.g. FanucParameterTable, tool offset / WCS tables).

Vacant (Fanuc <vacant>) is represented by null: either the dictionary has no entry for the key, or the entry maps to null. Both are treated identically by GetVariable(int).

Naming rationale: Fanuc official documentation calls #500-#999 "retained common variables" (and #100-#499 "non-retained common variables"). The umbrella term "macro variable" was avoided because it conflicts with Custom Macro B's call-frame concept (G65/G66 push a frame containing the local #1-#33); using RetainedCommonVariableTable reserves "macro" for the call-frame topic.

Enums

CutterCompensationType

Fanuc #5003: Cutter compensation startup/cancellation type.