Table of Contents

Namespace Hi.NcParsers.Dependencys.Siemens

Classes

SiemensFrameTable

Sinumerik settable work coordinate frames ($P_UIFR[n]). Models G54–G57 (ISO-compatible), G505–G599 (extended Siemens), and G500 (cancel — always zero).

On real Sinumerik, $P_UIFR is a frame array containing translation, rotation, scale and mirror per entry. HiNC currently consumes only the translation component, so this table stores Vec3d per id. $P_UIFR is NOT in the machine data table — therefore this is a separate dependency from SiemensMachineDataTable (which holds MD-prefixed OEM machine data such as MD30300 axis type, MD34010 reference position, etc.).

SiemensFrameTableProxy

Get-or-create INcDependencyProxy for SiemensFrameTable: a placeholder in the shared PipelineNcDependencyList that resolves the host project's own per-case settable work frames ($P_UIFR, G54–G57…).

SiemensGotoIterationDependency

Watchdog for Siemens GOTOF/GOTOB jumps — the label-keyed sibling of the Fanuc FanucGotoIterationDependency, with the same “soft-cap + runtime counter + session-init ISessionResettable” shape. Kept per-brand (rather than widening the Fanuc dep's int-keyed bucket) for diagnostic clarity and because Siemens targets are named labels, not N-numbers.

The counter key is (FileName, Label) where FileName is the source-level file path of the jump host (the relative form carried on FilePath). Source-level keying means multiple inline invocations of the same subprogram pool their counts, while two files each jumping to their own LBL1 stay isolated. Forward and backward jumps to the same label share one bucket — only the backward direction can loop, but a shared bucket keeps the accounting simple and the cap generous.

The consuming syntax (SiemensGotoSyntax) counts after the condition gate and before the label scan; above MaxIterationsPerLabel the jump warns SiemensGoto--IterationLimitExceeded and falls through. A missing dependency disables the cap (Fanuc parity) — the brand preset wires one by default.

SiemensLoopIterationDependency

Watchdog shared by all four Siemens loop constructs (WHILE/ENDWHILE, FOR/ENDFOR, REPEAT/UNTIL, LOOP/ENDLOOP) — construct-neutral by design, unlike the Fanuc sibling (FanucWhileDoIterationDependency) which only has WHILE to guard. Same “soft-cap + runtime counter + session-init ISessionResettable” shape.

Siemens loop constructs carry no LoopId, so the counter key is (FileName, BeginLineNo) — the loop-entry line recorded in the active frame identifies the construct uniquely within its file, and the file path isolates identically-numbered lines across files (and across inlined subprograms).

The consuming syntax (SiemensLoopSyntax) counts at the back-jump step (the loop terminator / falsy UNTIL), so a loop whose condition is false from the outset consumes zero iterations. Above MaxIterationsPerLoop the terminator warns SiemensLoop--IterationLimitExceeded, pops the frame and falls through. A missing dependency disables the cap for the condition-bearing constructs (Fanuc parity) but hard-blocks the ENDLOOP back-jump — LOOP has no exit condition, so an uncapped back-jump would hang the pipeline deterministically.

SiemensMachineDataTable

Siemens Sinumerik machine data table. Stores machine data (MD numbers) as system and per-axis parameters.

MD10000–MD19999: General machine data. MD20000–MD29999: Axis-specific machine data. MD30000–MD39999: Axis-specific machine data (extended).

SiemensRParameterTable

Sinumerik R-parameter table (R0-R999). R parameters are the Siemens arithmetic-variable surface (R63=100.5, C=R61, R26=(558.5+14)/2); on real hardware they live in retentive memory (sized by MD28050) and survive program end and power cycles, so — like the Fanuc sibling RetainedCommonVariableTable — this table is not session-reset and is serialised into the project file.

Reads flow through Get(string) (registered automatically because the table sits on the runner's effective NcDependencyList); writes flow through SiemensRParameterReadingSyntax, which consumes literal Parsing.Assignments.Rn entries after VariableEvaluatorSyntax has normalized expression RHS to literals.

Vacant is represented by null: either the dictionary has no entry for the key, or the entry maps to null — both read identically. Real Sinumerik default-initialises every allocated R to 0, but a vacant read failing loud (Variable--Vacant via the evaluator) surfaces missing setup data instead of silently machining with 0.

SiemensRParameterTableProxy

Get-or-create INcDependencyProxy for SiemensRParameterTable: a placeholder in the shared PipelineNcDependencyList that resolves the host project's own per-case R parameters (R0–R999).

SiemensToolEdgeOffset

One Siemens cutting-edge offset row ($TC_DP fields for a (T, D) pair): geometry lengths L1/L2/L3 ($TC_DP3/4/5), radius ($TC_DP6) and the corresponding wear values ($TC_DP12/13/14/15). All mm.

SiemensToolOffsetTable

Per-case Siemens tool offset table — the first concrete ISiemensToolOffsetConfig ($TC_DP model): one SiemensToolEdgeOffset row per (tool number T, cutting edge D), each carrying the three length components + radius with their wear counterparts. Effective values are geometry + wear — Sinumerik wear ($TC_DP12..15) is additive; a worn-down tool carries a negative wear value. Unconfigured (T, D) pairs return 0 per the interface contract.

Also carries the ToolNames map ($TC_TP2 analog, case-insensitive) so Siemens string tool calls (T="D8R1") can resolve to the int-keyed act chain — consumed by ToolChangeSemantic.

Per-case editable data — reaches the pipeline through SiemensToolOffsetTableProxy on the host's PerCaseNcDependencyList, never as a concrete instance baked into the shared runner. Deliberately separate from SiemensMachineDataTable (MD-prefixed machine-fixed OEM data) — same split rationale as SiemensFrameTable.

SiemensToolOffsetTableProxy

Get-or-create INcDependencyProxy for SiemensToolOffsetTable: a placeholder in the shared PipelineNcDependencyList that resolves the host project's own per-case Siemens ($TC_DP) tool offset table.

Interfaces

ISiemensToolOffsetConfig

Siemens (840D/Sinumerik) tool offset configuration. Offsets are addressed by (tool number T, cutting edge D number), unlike IToolOffsetConfig where a single integer selects the row.

Siemens stores up to 25 data fields per cutting edge ($TC_DP1..$TC_DP25), including three independent length components (L1/L2/L3 for Z/X/Y directions), radius, and corresponding wear values.