Namespace Hi.NcParsers.Dependencys
Classes
- CncBrandDependency
Explicit CNC controller brand identifier carried in PipelineNcDependencyList. Use
ncDependencyList.OfType<CncBrandDependency>().FirstOrDefault()to retrieve the brand.
- ControllerParameterTableBase
Base class for brand-specific controller parameter tables. Provides shared data structures, XML IO, and IHomeMcConfig
- IMachineAxisConfig implementations. Subclasses define brand-specific parameter numbers, XML attribute names, and derived convenience properties.
- HeidenhainDatumTable
Heidenhain datum preset and datum shift tables. CYCL DEF 247 Q339=N reads from DatumPresetTable, CYCL DEF 7 #N reads from DatumShiftTable. Each table maps an integer ID (1–20) to a Vec3d offset.
On real Heidenhain controllers, preset and datum tables are separate disk files (e.g.
TNC:\table\preset.pr,*.d) — distinct from MP-prefixed Machine Parameters (held by HeidenhainParameterTable). HiNC mirrors that separation by keeping this dependency independent ofHeidenhainParameterTable.Implements IIsoCoordinateConfig by mapping the ISO/DIN G54–G59 codes to preset rows 1–6, the conventional Heidenhain compatibility mapping for ISO/DIN programs running on a Heidenhain.
- HeidenhainDatumTableProxy
Get-or-create INcDependencyProxy for HeidenhainDatumTable: a placeholder in the shared PipelineNcDependencyList that resolves the host project's own per-case datum preset / datum shift tables.
- IsoCoordinateAddressMap
Fanuc-style ISO coordinate parameter address mapping. G54–G59 → #5221+ (stride 20, three consecutive numbers per entry for X/Y/Z), G54.1 P1–P48 → #7001+ (stride 20). Shared between FanucParameterTable (which calls these “ParamId”) and SyntecParameterTable (which calls them “PrId”) because both follow the same numeric scheme.
- MCodeEffects
What one machine-declared M-code does. Real-machine OEM M-codes are frequently composite — e.g. an
M13that means “spindle CW + flood coolant on” — so a declaration carries every effect the code performs rather than a single meaning, and additionally an UnmodeledNote for the parts this simulation does not model. Declaring only the known parts and staying loud about the rest keeps a composite code from being half-consumed silently. Stored per machine in MCodeDeclarations and consumed by MCodeExpansionSyntax, which expands the declared code into the canonical ISO flags the regular consumers already understand.
Interfaces
- IBlockSkipConfig
Runtime state of the controller's Block Delete / Block Skip switches. Present in PipelineNcDependencyList exposes this to the runner so that blocks whose head carries
/or/N(parsed by BlockSkipSyntax into BlockSkip) are skipped at semantic time.Layers are 1..9; Layer 1 corresponds to the bare
/prefix. Controllers (Fanuc / Syntec / Mazak / Siemens) let each layer be toggled independently via panel switches or system parameters.When this dependency is absent from PipelineNcDependencyList, no block is skipped (safest default: simulate the full machining). The syntax still consumes the
/prefix so noUnparsedText--Remainingdiagnostic is produced.
- ICannedCycleConfig
Canned cycle configuration parameters. Implemented by brand-specific parameter tables (e.g., FanucParameterTable for Fanuc #4002, SyntecParameterTable for Syntec Pr4002) and by FallbackConfig as a safety net.
Siemens and Heidenhain specify peck clearance per-call (CYCLE83 parameter / CYCL DEF), so their tables do not implement this interface. The FallbackConfig provides the default value in those cases.
- IHomeMcConfig
G28 first reference position (home machine coordinate) per axis.
- IIndexingPositionConfig
Indexing-axis position table: maps 1-based indexing position numbers to axis coordinates for axes that only take up discrete stations (Hirth couplings, indexing rotary tables, turret-style workholders). Consumed by the coded-position coordinate functions (Siemens
CAC()/CIC()/CDC()/CACP()/CACN()— unwrapped by SiemensAcIcSyntax, resolved by McAbcSyntax / IncrementalResolveSyntax via CodedPositionUtil). Implemented by SiemensMachineDataTable using the Siemens machine data (MD30500$MA_INDEX_AX_ASSIGN_POS_TABper axis; global tables MD10910/MD10930; equidistant MD30501–MD30503).Positions are expressed in the axis' native units (degrees for rotary, mm for linear) in the coordinate frame the axis word itself is written in — machine coordinates for rotary words, program coordinates for linear words. Position numbering is 1-based: number 1 is the first table entry (the Siemens machine-data help and alarm texts count this way; the 0-based value range printed in some programming-manual editions describes the machine-data array index, not the programmable number).
- IIsoCoordinateConfig
ISO work coordinate offset provider. Maps a G-code work coordinate id (e.g. “G54”, “G59.2”, “G54.1P1”) to a machine-coordinate offset Vec3d.
Implementations include IsoCoordinateTable (brand-agnostic standalone storage), FanucParameterTable / SyntecParameterTable (parameter-table integration via real Fanuc/Syntec parameter numbers #5221+ for G54–G59 and #7001+ for G54.1 P1–P48), SiemensFrameTable (Sinumerik
$P_UIFRframes), and HeidenhainDatumTable (Heidenhain preset rows).
- IMCodeDeclarationConfig
Machine-declared M-code map: what each machine-specific (OEM/PLC) M-code does, as MCodeEffects — possibly several effects per code (tool change, spindle direction, coolant) plus a note for behavior this simulation does not model. Consumed by MCodeExpansionSyntax, which expands declared codes into the canonical ISO flags ahead of the regular consumers. Machine-level (per-case parameter table) rather than brand vocabulary — implemented by ControllerParameterTableBase, alongside the narrower ISpindleControlConfig face over the same storage.
- IMachineAxisConfig
Machine axis configuration: which axes exist and their types. Compatible with Fanuc, Siemens, Heidenhain, Mazak, Okuma.
- INcDependency
Marker interface for objects that participate in the NC dependency list resolved by the soft-NC runtime.
- INcDependencyListHost
Hosts a per-case INcDependency list that INcDependencyProxy placeholders in a shared SoftNcRunner resolve their data against. Implemented by the object owning both the shared runner and the varied setting data — e.g.
MachiningProject.
- INcDependencyProxy
An INcDependency placeholder that resolves the real dependency lazily at pipeline-build time instead of carrying the data itself. Lets a shared SoftNcRunner hold only the fixed pipeline logic while the frequently-varied data lives on the owning INcDependencyListHost (e.g. a
MachiningProject)."Maker and taker": GetNcDependency() either constructs the dependency on demand (maker) or fetches one from the host wired by InitNcDependencyHost(INcDependencyListHost) (taker). A get-or-create proxy does both — it takes the host's instance when present and otherwise makes one, installing it into the host list so it persists and is editable per case.
A proxy may carry runtime-only state (the wired host, a memoized resolved dependency). That state is host-wired per run and MUST NOT be written by MakeXmlSource(string, string, bool) — same runtime-only posture as ProjectFolderDependency.
- IPowerResettable
Marks an INcDependency that holds volatile state which must be cleared when the controller performs a power reset (power off then on).
Implementers should clear only the volatile subset they own (e.g. Fanuc common volatile macro variables
#100-#499), and leave persistent state untouched (e.g.#500-#999, controller parameters).Call-frame local state (Fanuc
#1-#33, HeidenhainQ200-Q1199) is NOT in scope — that lives in theSyntaxPieceJSON dataflow and is bounded by call activation, not power cycle.
- IRapidFeedrateConfig
Provides per-axis rapid traverse feedrate for motion semantics. Implemented by ControllerParameterTableBase using brand-specific parameter numbers (e.g., Fanuc #1420, Siemens MD32000, Heidenhain MP1010).
- ISpindleControlConfig
Machine-specific spindle control codes: maps custom spindle direction M-codes to SpindleDirection — e.g., an ultrasonic spindle started by
M203(CW) and stopped byM205(STOP) instead of ISO M03/M05. Consulted by SpindleSpeedSyntax in addition to the built-in ISO defaults (M03/M04/M05), which always stay in effect; a configured code wins over its ISO meaning when both match. Machine-level (per-case parameter table) rather than brand vocabulary — implemented by ControllerParameterTableBase as a spindle-direction face over its MCodeDeclarations storage (the multi-effect IMCodeDeclarationConfig map), so one code is never half-recognized by two separate maps.
- IStrokeLimitConfig
Per-axis stroke (travel) limits. Unit is mm for linear axes, deg for rotary axes. Implemented by ControllerParameterTableBase using brand-specific parameter numbers (e.g., Fanuc #1300/#1320, Siemens MD36100/MD36110, Heidenhain MP420/MP430).
- IToolChangeTriggerConfig
Machine-level tool-change trigger mode. Machining centers with a magazine treat a bare
Tword as pre-selection only (the magazine rotates, no feed axis moves) and change the tool on the trigger M-code; lathes/turret machines index the turret — and thereby change the tool — on theTword itself. Real controllers declare this per machine (e.g. Siemens MD22550$MC_TOOL_CHANGE_MODE, where 0 means theTword performs the change). Consulted by ToolChangeSyntax; machine-level (per-case parameter table) rather than brand vocabulary — implemented by ControllerParameterTableBase. Custom trigger M-codes are the separate IMCodeDeclarationConfig concern (IsToolChange).
- IToolOffsetConfig
Tool offset configuration indexed by a single integer offset number. Applies to Fanuc (H/D numbers), Heidenhain (tool number), Mazak, Okuma, and other ISO-compatible controllers where one integer selects the offset row.
For Siemens (840D/Sinumerik) where offsets are addressed by (tool number, cutting edge D number), see ISiemensToolOffsetConfig.
- IToolingMcConfig
Machine position axes move to during tool change (M06).
Enums
- AxisType
Axis type: linear (translation), rotary (rotation), or spindle (speed/positioning dual mode).