HiNC-2025-win-desktop-Deploy/App/wwwroot/HiAPI-docsite/api/Hi.NcParsers.LogicSyntaxs.html

987 lines
66 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Namespace Hi.NcParsers.LogicSyntaxs | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Namespace Hi.NcParsers.LogicSyntaxs | HiAPI-C# 2025 ">
<link rel="icon" href="../img/HiAPI.favicon.ico">
<link rel="stylesheet" href="../public/docfx.min.css">
<link rel="stylesheet" href="../public/main.css">
<meta name="docfx:navrel" content="../toc.html">
<meta name="docfx:tocrel" content="toc.html">
<meta name="docfx:rel" content="../">
<meta name="loc:inThisArticle" content="In this article">
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
<meta name="loc:tocFilter" content="Filter by title">
<meta name="loc:nextArticle" content="Next">
<meta name="loc:prevArticle" content="Previous">
<meta name="loc:themeLight" content="Light">
<meta name="loc:themeDark" content="Dark">
<meta name="loc:themeAuto" content="Auto">
<meta name="loc:changeTheme" content="Change theme">
<meta name="loc:copy" content="Copy">
<meta name="loc:downloadPdf" content="Download PDF">
<script type="module" src="./../public/docfx.min.js"></script>
<script>
const theme = localStorage.getItem('theme') || 'auto'
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
</script>
</head>
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
<header class="bg-body border-bottom">
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
<div class="container-xxl flex-nowrap">
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../img/HiAPI.logo.png" alt="">
</a>
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
<i class="bi bi-three-dots"></i>
</button>
<div class="collapse navbar-collapse" id="navpanel">
<div id="navbar">
<form class="search" role="search" id="search">
<i class="bi bi-search"></i>
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
</form>
</div>
</div>
</div>
</nav>
</header>
<main class="container-xxl">
<div class="toc-offcanvas">
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
</div>
<div class="offcanvas-body">
<nav class="toc" id="toc"></nav>
</div>
</div>
</div>
<div class="content">
<div class="actionbar">
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
<i class="bi bi-list"></i>
</button>
<nav id="breadcrumb"></nav>
</div>
<article data-uid="Hi.NcParsers.LogicSyntaxs">
<h1 id="Hi_NcParsers_LogicSyntaxs" data-uid="Hi.NcParsers.LogicSyntaxs" class="text-break">Namespace Hi.NcParsers.LogicSyntaxs</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>
<div class="markdown level0 remarks"></div>
<h3 id="classes">
Classes
</h3>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.BackBoringSyntax.html">BackBoringSyntax</a></dt>
<dd><p>G87 back boring cycle. Supports modal repetition.
Cuts upward from Z to R — used to bore the back side of a workpiece.</p>
<p>
Cycle sequence:
<ol><li>Oriented spindle stop (OSS) at current position</li><li>Rapid (shifted) to init position, then down to bottom Z
— tool enters pre-drilled hole without contacting bore wall</li><li>Shift back to hole center at bottom</li><li>Spindle start (CW)</li><li>Feed upward from Z to R-point (back boring cut)</li><li>Oriented spindle stop at R</li><li>Tool shift, rapid retract (shifted) to final Z</li><li>Shift back to center, spindle restart</li></ol>
<p>
Q specifies the lateral shift distance (mm).
Shift direction defaults to +X (OSS angle 0°).
</p>
<p>
Reads absolute coordinates from the cycle section, which is
resolved by <a class="xref" href="Hi.NcParsers.LogicSyntaxs.CannedCycleResolveSyntax.html">CannedCycleResolveSyntax</a> before this
syntax runs.
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.BoringCycleSyntax.html">BoringCycleSyntax</a></dt>
<dd><p>G85/G86/G89 boring cycles.</p>
<p>
Cycle sequence:
<ol><li>Rapid to init position (target XY, previous Z)</li><li>Rapid from init to R-point</li><li>Feed from R-point to bottom Z</li><li>[G86 only] Spindle stop at bottom</li><li>[G89 only] Dwell P seconds at bottom</li><li>Retract: G85/G89 → feed retract, G86 → rapid retract</li><li>[G86 only] Spindle restart (CW) after retract</li></ol>
<p>
G85: feed to Z, feed retract — smooth bore finish.
G86: feed to Z, spindle stop (implicit), rapid retract.
G89: feed to Z, dwell P, feed retract — like G85 with bottom dwell.
</p>
<p>
Reads absolute coordinates from the cycle section, which is
resolved by <a class="xref" href="Hi.NcParsers.LogicSyntaxs.CannedCycleResolveSyntax.html">CannedCycleResolveSyntax</a> (modal repetition,
G91 conversion, missing-axis fallback) before this syntax runs.
Must be placed after <a class="xref" href="Hi.NcParsers.LogicSyntaxs.CannedCycleResolveSyntax.html">CannedCycleResolveSyntax</a> and before
<a class="xref" href="Hi.NcParsers.LogicSyntaxs.IncrementalResolveSyntax.html">IncrementalResolveSyntax</a> in the syntax chain.
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.CannedCycleResolveSyntax.html">CannedCycleResolveSyntax</a></dt>
<dd><p>Resolves the canned-cycle Group-09 state for the current block
and writes the result to the <a class="xref" href="Hi.NcParsers.Keywords.CannedCycle.html">CannedCycle</a> section.</p>
<ul><li><b>Active cycle</b> (direct G81..G89 or modal repeat): merges
<code>Parsing</code> overrides with previous-cycle stored params, applies
G91 incremental-to-absolute conversion and missing-axis fallback,
writes <a class="xref" href="Hi.NcParsers.Keywords.CannedCycle.html">CannedCycle</a> with <a class="xref" href="Hi.NcParsers.Keywords.ICannedCycleDef.html#Hi_NcParsers_Keywords_ICannedCycleDef_Term">Term</a>,
<a class="xref" href="Hi.NcParsers.Keywords.ICannedCycleDef.html#Hi_NcParsers_Keywords_ICannedCycleDef_ReturnMode">ReturnMode</a>, and
<a class="xref" href="Hi.NcParsers.Keywords.ICannedCycleDef.html#Hi_NcParsers_Keywords_ICannedCycleDef_Params">Params</a>. The resolved cycle sub-section
is left in <code>Parsing</code> under the cycle code for downstream cycle
syntaxes (<a class="xref" href="Hi.NcParsers.LogicSyntaxs.DrillingCycleSyntax.html">DrillingCycleSyntax</a>, etc.) to read.</li><li><b>Explicit cancel</b> (G80 flag present on a non-cycle block):
consumes the G80 flag and writes
<a class="xref" href="Hi.NcParsers.Keywords.CannedCycle.html">CannedCycle</a> = <code>{ Term: "G80" }</code>, acting as a hard
sentinel for <span class="xref">Hi.NcParsers.LogicSyntaxs.CannedCycleSyntaxUtil</span> modal lookback.</li><li><b>No Group-09 activity</b>: leaves the block untouched.</li></ul>
<p>
Must be placed after <a class="xref" href="Hi.NcParsers.LogicSyntaxs.PositioningSyntax.html">PositioningSyntax</a> and before
the individual cycle syntaxes in the chain.
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.CircularMotionSyntax.html">CircularMotionSyntax</a></dt>
<dd><p>Writes <a class="xref" href="Hi.NcParsers.Keywords.Generic.MotionForm.html#Hi_NcParsers_Keywords_Generic_MotionForm_McArc">McArc</a> motion for circular commands
(ISO G02/G03).
Detects motion mode from <a class="xref" href="Hi.NcParsers.Keywords.IFlagsDef.html#Hi_NcParsers_Keywords_IFlagsDef_Flags">Flags</a>, reads
I/J/K center offsets or R radius from <a class="xref" href="Hi.NcParsers.Keywords.IParsingDef.html#Hi_NcParsers_Keywords_IParsingDef_Parsing">Parsing</a>,
computes arc center in program coordinates, and writes a one-shot
<a class="xref" href="Hi.NcParsers.Keywords.MotionEvent.html">MotionEvent</a> (form + arc params) plus a modal
<a class="xref" href="Hi.NcParsers.Keywords.MotionState.html">MotionState</a> (Term).</p>
<p>
G02/G03 mode is modal (Group 01) — persists across blocks via
<a class="xref" href="Hi.NcParsers.Keywords.MotionState.html#Hi_NcParsers_Keywords_MotionState_Term">Term</a>. Arc parameters (I/J/K/R) are
per-block and must be present in every arc block.
</p>
<p>
Must be placed before <a class="xref" href="Hi.NcParsers.LogicSyntaxs.LinearMotionSyntax.html">LinearMotionSyntax</a> in the
syntax chain. Both share the Group 01 motion slot; whichever
writes a <a class="xref" href="Hi.NcParsers.Keywords.MotionEvent.html">MotionEvent</a> first claims it.
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.CoolantSyntax.html">CoolantSyntax</a></dt>
<dd><p>Consumes M07 (mist ON), M08 (flood ON), and M09 (coolant OFF) from
<a class="xref" href="Hi.NcParsers.Keywords.IFlagsDef.html#Hi_NcParsers_Keywords_IFlagsDef_Flags">Flags</a> and writes the <a class="xref" href="Hi.NcParsers.Keywords.ICoolantDef.html">ICoolantDef</a>
section with both <a class="xref" href="Hi.NcParsers.Keywords.ICoolantDef.html#Hi_NcParsers_Keywords_ICoolantDef_IsOn">IsOn</a> (convenience flag)
and <a class="xref" href="Hi.NcParsers.Keywords.ICoolantDef.html#Hi_NcParsers_Keywords_ICoolantDef_Mode">Mode</a> (abstract mode name:
<a class="xref" href="Hi.NcParsers.Keywords.Coolant.html#Hi_NcParsers_Keywords_Coolant_Flood">Flood</a> / <a class="xref" href="Hi.NcParsers.Keywords.Coolant.html#Hi_NcParsers_Keywords_Coolant_Mist">Mist</a> /
<a class="xref" href="Hi.NcParsers.Keywords.Coolant.html#Hi_NcParsers_Keywords_Coolant_Off">Off</a>).
Modal — persists via backward lookback.</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.CoordinateOffsetUtil.html">CoordinateOffsetUtil</a></dt>
<dd><p>Shared utilities for all coordinate offset syntaxes
(ISO, Siemens, Heidenhain). Handles section IO,
backward lookback, and <a class="xref" href="Hi.NcParsers.Keywords.ITransformationDef.html#Hi_NcParsers_Keywords_ITransformationDef_ProgramToMcTransform">ProgramToMcTransform</a> composition.</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.DrillingCycleSyntax.html">DrillingCycleSyntax</a></dt>
<dd><p>G81/G82 drilling cycle (rapid retract). Supports modal repetition.
G82 covers G81 — the only difference is an optional dwell (P) at the bottom.</p>
<p>
Cycle sequence:
<ol><li>Rapid to init position (target XY, previous Z)</li><li>Rapid from init to R-point</li><li>Feed from R-point to bottom Z</li><li>[G82 only] Dwell P seconds at bottom</li><li>Rapid from bottom to final (G98 → init Z, G99 → R)</li></ol>
<p>
Reads absolute coordinates from the cycle section, which is
resolved by <a class="xref" href="Hi.NcParsers.LogicSyntaxs.CannedCycleResolveSyntax.html">CannedCycleResolveSyntax</a> (modal repetition,
G91 conversion, missing-axis fallback) before this syntax runs.
Must be placed after <a class="xref" href="Hi.NcParsers.LogicSyntaxs.CannedCycleResolveSyntax.html">CannedCycleResolveSyntax</a> and before
<a class="xref" href="Hi.NcParsers.LogicSyntaxs.IncrementalResolveSyntax.html">IncrementalResolveSyntax</a> in the syntax chain.
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.FeedrateSyntax.html">FeedrateSyntax</a></dt>
<dd><p>Consumes F (feedrate) from <a class="xref" href="Hi.NcParsers.Keywords.IParsingDef.html#Hi_NcParsers_Keywords_IParsingDef_Parsing">Parsing</a> and
G94/G95 mode from <a class="xref" href="Hi.NcParsers.Keywords.IFlagsDef.html#Hi_NcParsers_Keywords_IFlagsDef_Flags">Flags</a>.
Both are modal — persist across blocks via backward node lookback.
Writes resolved state to a <a class="xref" href="Hi.NcParsers.Keywords.IFeedrateDef.html">IFeedrateDef</a> section.</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.FineBoringSyntax.html">FineBoringSyntax</a></dt>
<dd><p>G76 fine boring cycle. Supports modal repetition.</p>
<p>
Cycle sequence:
<ol><li>Rapid to init position (target XY, previous Z)</li><li>Rapid from init to R-point</li><li>Feed from R-point to bottom Z</li><li>Oriented spindle stop (OSS)</li><li>Tool shift by Q in +X direction (clear bore wall)</li><li>Rapid retract (shifted) to final Z</li><li>Tool shift back to center</li><li>Spindle restart (CW)</li></ol>
<p>
Q specifies the lateral shift distance (mm) to avoid dragging
the tool across the finished bore surface during retract.
Shift direction defaults to +X (OSS angle 0°).
</p>
<p>
Reads absolute coordinates from the cycle section, which is
resolved by <a class="xref" href="Hi.NcParsers.LogicSyntaxs.CannedCycleResolveSyntax.html">CannedCycleResolveSyntax</a> before this
syntax runs.
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.G43p4RtcpSyntax.html">G43p4RtcpSyntax</a></dt>
<dd><p>Handles G43.4 RTCP (Rotary Tool Center Point) activation. Writes
the <a class="xref" href="Hi.NcParsers.Keywords.IToolHeightCompensationDef.html">IToolHeightCompensationDef</a> section and the
<a class="xref" href="Hi.NcParsers.Syntaxs.TransformationUtil.html#Hi_NcParsers_Syntaxs_TransformationUtil_ToolHeightCompensationSource">ToolHeightCompensationSource</a> entry
in <a class="xref" href="Hi.NcParsers.Keywords.ITransformationDef.html#Hi_NcParsers_Keywords_ITransformationDef_ProgramToMcTransform">ProgramToMcTransform</a> — a
tool-normal · offset_mm translation at the block endpoint ABC. The
chain entry is tagged <a class="xref" href="Hi.NcParsers.Syntaxs.TransformationUtil.html#Hi_NcParsers_Syntaxs_TransformationUtil_KindDynamic">KindDynamic</a>
when RTCP is active and ABC changes across the block, and
<a class="xref" href="Hi.NcParsers.Syntaxs.TransformationUtil.html#Hi_NcParsers_Syntaxs_TransformationUtil_KindStatic">KindStatic</a> otherwise.</p>
<p>
The RTCP kinematic rotary part (Pn→MC rigid transform) is orthogonal
to this syntax and is written by <a class="xref" href="Hi.NcParsers.LogicSyntaxs.PivotTransformationSyntax.html">PivotTransformationSyntax</a>
on <b>every</b> block, because rotary state remains in effect beyond
the RTCP modal (e.g. a non-RTCP <code>G01</code> after <code>G49</code> still
inherits the last ABC from the program).
</p>
<p>
The "rotary dynamic" distinction lives on the chain entry's
<a class="xref" href="Hi.NcParsers.Syntaxs.TransformationUtil.html#Hi_NcParsers_Syntaxs_TransformationUtil_KindKey">KindKey</a> alone and is read via
<a class="xref" href="Hi.NcParsers.Syntaxs.TransformationUtil.html#Hi_NcParsers_Syntaxs_TransformationUtil_HasDynamicEntry_System_Text_Json_Nodes_JsonObject_">HasDynamicEntry(JsonObject)</a> by
<a class="xref" href="Hi.NcParsers.LogicSyntaxs.LinearMotionSyntax.html">LinearMotionSyntax</a> to pick
<a class="xref" href="Hi.NcParsers.Keywords.Generic.MotionForm.html#Hi_NcParsers_Keywords_Generic_MotionForm_ClLinear">ClLinear</a> vs <a class="xref" href="Hi.NcParsers.Keywords.Generic.MotionForm.html#Hi_NcParsers_Keywords_Generic_MotionForm_McLinear">McLinear</a>.
</p>
<p>
G43.4 is used by Fanuc, Mazak, Syntec, and Okuma. Siemens (TRAORI) and
Heidenhain (M128) are handled by separate syntaxes. Must be placed
<b>after</b> <a class="xref" href="Hi.NcParsers.LogicSyntaxs.ToolHeightOffsetSyntax.html">ToolHeightOffsetSyntax</a> (to override the
ToolHeightCompensation entry when RTCP is active) and <b>before</b>
<a class="xref" href="Hi.NcParsers.LogicSyntaxs.PivotTransformationSyntax.html">PivotTransformationSyntax</a> (which runs last in the chain).
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.G53p1RotaryPositionSyntax.html">G53p1RotaryPositionSyntax</a></dt>
<dd><p>G53.1 — non-modal, one-shot rotary axis positioning.
Positions the rotary axes (A/B/C) to align the physical tool axis
with the active tilted work plane defined by G68.2.
XYZ position is unchanged; only rotary axes move via rapid traverse.</p>
<p>
Requires <a class="xref" href="Hi.NcParsers.LogicSyntaxs.IsoG68p2TiltSyntax.html">IsoG68p2TiltSyntax</a> (or equivalent) to have
written the tilt transform. Uses <a class="xref" href="Hi.Numerical.Xyzabc.IMachineKinematics.html">IMachineKinematics</a>
to solve for the target A/B/C via inverse kinematics.
</p>
<p>
Must be placed <b>after</b> <a class="xref" href="Hi.NcParsers.LogicSyntaxs.IsoG68p2TiltSyntax.html">IsoG68p2TiltSyntax</a>
(needs tilt data) and <b>before</b> <a class="xref" href="Hi.NcParsers.LogicSyntaxs.ProgramXyzSyntax.html">ProgramXyzSyntax</a>
in the syntax chain. Writes A/B/C into
<a class="xref" href="Hi.NcParsers.Keywords.IMachineCoordinateStateDef.html#Hi_NcParsers_Keywords_IMachineCoordinateStateDef_MachineCoordinateState">MachineCoordinateState</a>.
Motion is handled by <a class="xref" href="Hi.NcParsers.LogicSyntaxs.LinearMotionSyntax.html">LinearMotionSyntax</a> via modal G00/G01.
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.HighSpeedPeckCycleSyntax.html">HighSpeedPeckCycleSyntax</a></dt>
<dd><p>G73 high-speed peck drilling cycle (chip breaking). Supports modal repetition.
Drills in increments of depth Q, partially retracting by
<a class="xref" href="Hi.NcParsers.Dependencys.ICannedCycleConfig.html#Hi_NcParsers_Dependencys_ICannedCycleConfig_PeckRetractionDistance_mm">PeckRetractionDistance_mm</a> between strokes
(instead of fully back to R like <a class="xref" href="Hi.NcParsers.LogicSyntaxs.PeckDrillingCycleSyntax.html">PeckDrillingCycleSyntax</a>).</p>
<p>
Cycle sequence:
<ol><li>Rapid to init position (target XY, previous Z)</li><li>Rapid from init to R-point</li><li>For each stroke: feed Q deeper, rapid retract by d</li><li>If remainder exists: feed to bottom Z, rapid retract by d</li><li>Rapid to final (G98 → init Z, G99 → R)</li></ol>
<p>
Reads absolute coordinates from the cycle section, which is
resolved by <a class="xref" href="Hi.NcParsers.LogicSyntaxs.CannedCycleResolveSyntax.html">CannedCycleResolveSyntax</a> (modal repetition,
G91 conversion, missing-axis fallback) before this syntax runs.
Must be placed after <a class="xref" href="Hi.NcParsers.LogicSyntaxs.CannedCycleResolveSyntax.html">CannedCycleResolveSyntax</a> and before
<a class="xref" href="Hi.NcParsers.LogicSyntaxs.IncrementalResolveSyntax.html">IncrementalResolveSyntax</a> in the syntax chain.
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.IncrementalResolveSyntax.html">IncrementalResolveSyntax</a></dt>
<dd><p>Resolves G91 incremental axis values to absolute in-place
within <a class="xref" href="Hi.NcParsers.Keywords.IParsingDef.html#Hi_NcParsers_Keywords_IParsingDef_Parsing">Parsing</a> and its sub-sections.
Reads <a class="xref" href="Hi.NcParsers.Keywords.IPositioningDef.html#Hi_NcParsers_Keywords_IPositioningDef_Term">Term</a> written
by <a class="xref" href="Hi.NcParsers.LogicSyntaxs.PositioningSyntax.html">PositioningSyntax</a>.</p>
<p>
<a class="xref" href="Hi.NcParsers.LogicSyntaxs.IncrementalResolveSyntax.html#Hi_NcParsers_LogicSyntaxs_IncrementalResolveSyntax_WorkingPathList">WorkingPathList</a> specifies which JSON paths
contain axis values that need incremental-to-absolute conversion.
Default: <code>[["Parsing"], ["Parsing", "G28"]]</code>.
All matching paths are converted.
</p>
<p>
Canned cycle paths (Parsing.G81, G82, G83, …) are intentionally
excluded — their Z/R incremental semantics differ from normal axes
(R is relative to init level, Z is relative to R-point).
Resolution is handled by
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonobject">ResolveCycleCoordinates(JsonObject, Vec3d, double?, double?, double, double)</a>
inside each cycle syntax class, which runs before this syntax.
</p>
<p>
Uses <a class="xref" href="Hi.NcParsers.Dependencys.IMachineAxisConfig.html#Hi_NcParsers_Dependencys_IMachineAxisConfig_AxisNames">AxisNames</a> to determine
which tags are motion axes. Traces backward nodes for last known
<a class="xref" href="Hi.NcParsers.Keywords.IProgramXyzDef.html#Hi_NcParsers_Keywords_IProgramXyzDef_ProgramXyz">ProgramXyz</a> to resolve incremental values.
After this syntax, all axis values in the working paths are absolute —
<a class="xref" href="Hi.NcParsers.LogicSyntaxs.ProgramXyzSyntax.html">ProgramXyzSyntax</a> can consume them without
incremental logic.
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.IsoCoordinateOffsetSyntax.html">IsoCoordinateOffsetSyntax</a></dt>
<dd><p>ISO/Fanuc/Mazak/Okuma/Syntec: resolves G54G59.9 work coordinate offset.
Reads G54/G55/.../G59.9 from <a class="xref" href="Hi.NcParsers.Keywords.IFlagsDef.html#Hi_NcParsers_Keywords_IFlagsDef_Flags">Flags</a>,
looks up offset Vec3d via <a class="xref" href="Hi.NcParsers.Dependencys.IIsoCoordinateConfig.html">IIsoCoordinateConfig</a> dependencies
(e.g. brand parameter table or <a class="xref" href="Hi.NcParsers.Dependencys.Generic.IsoCoordinateTable.html">IsoCoordinateTable</a>),
composes into <a class="xref" href="Hi.NcParsers.Keywords.ITransformationDef.html#Hi_NcParsers_Keywords_ITransformationDef_ProgramToMcTransform">ProgramToMcTransform</a>.
Modal — active coordinate persists via backward lookback.
Default coordinate ID is set by <a class="xref" href="Hi.NcParsers.Initializers.StaticInitializer.html">StaticInitializer</a>.</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.IsoG68RotationSyntax.html">IsoG68RotationSyntax</a></dt>
<dd><p>ISO/Fanuc: resolves G68 (2D coordinate rotation) and G69 (cancel).
Computes a rotation <a class="xref" href="Hi.Geom.Mat4d.html">Mat4d</a> around the active plane normal
and composes it into <a class="xref" href="Hi.NcParsers.Keywords.ITransformationDef.html#Hi_NcParsers_Keywords_ITransformationDef_ProgramToMcTransform">ProgramToMcTransform</a>.</p>
<p>
No <a class="xref" href="Hi.Numerical.Xyzabc.IMachineKinematics.html">IMachineKinematics</a> dependency needed —
G68 is pure geometric rotation.
</p>
<p>
Managed commands: G68, G69 (idempotent with <a class="xref" href="Hi.NcParsers.LogicSyntaxs.IsoG68p2TiltSyntax.html">IsoG68p2TiltSyntax</a>).
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.IsoG68p2TiltSyntax.html">IsoG68p2TiltSyntax</a></dt>
<dd><p>ISO/Fanuc: resolves G68.2 (tilted work plane) and G69 (cancel).
Computes a tilt <a class="xref" href="Hi.Geom.Mat4d.html">Mat4d</a> from I/J/K euler angles
(Fanuc ZXZ convention) and composes it into
<a class="xref" href="Hi.NcParsers.Keywords.ITransformationDef.html#Hi_NcParsers_Keywords_ITransformationDef_ProgramToMcTransform">ProgramToMcTransform</a>.</p>
<p>
Managed commands: G68.2, G69 (idempotent with <a class="xref" href="Hi.NcParsers.LogicSyntaxs.IsoG68RotationSyntax.html">IsoG68RotationSyntax</a>).
Siemens equivalent: CYCLE800 (separate syntax).
Heidenhain equivalent: PLANE SPATIAL (separate syntax).
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.IsoLocalCoordinateOffsetSyntax.html">IsoLocalCoordinateOffsetSyntax</a></dt>
<dd><p>ISO G52: Local coordinate system offset (additive to G54-series).</p>
<p>
<code>G52 X10 Y20 Z5</code> → sets local offset.
<code>G52 X0 Y0 Z0</code> → cancels (resets to zero).
M30 (program end) → also cancels.
</p>
Reads <code>Parsing.G52</code> (from <a class="xref" href="Hi.NcParsers.Syntaxs.GenericSyntaxKit.html#Hi_NcParsers_Syntaxs_GenericSyntaxKit_G52Syntax">G52Syntax</a>),
writes <a class="xref" href="Hi.NcParsers.Keywords.IsoLocalCoordinateOffset.html">IsoLocalCoordinateOffset</a> section,
and adds an <code>"IsoLocalCoordinateOffset"</code> entry to the transformation chain.
Modal — persists via backward lookback until changed or cancelled.
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.LinearMotionSyntax.html">LinearMotionSyntax</a></dt>
<dd><p>Writes <a class="xref" href="Hi.NcParsers.Keywords.Generic.MotionForm.html#Hi_NcParsers_Keywords_Generic_MotionForm_McLinear">McLinear</a> motion for linear commands
(ISO G00/G01, Heidenhain L/LN). Detects motion mode from
<a class="xref" href="Hi.NcParsers.Keywords.IFlagsDef.html#Hi_NcParsers_Keywords_IFlagsDef_Flags">Flags</a>, writes a one-shot
<a class="xref" href="Hi.NcParsers.Keywords.MotionEvent.html">MotionEvent</a> section (form + isRapid) plus a modal
<a class="xref" href="Hi.NcParsers.Keywords.MotionState.html">MotionState</a> section (Term) when
<a class="xref" href="Hi.NcParsers.Keywords.MachineCoordinateState.html">MachineCoordinateState</a> exists on the block.</p>
<p>
<a class="xref" href="Hi.NcParsers.Semantics.McLinearMotionSemantic.html">McLinearMotionSemantic</a> discriminates between
XYZ-only and XYZABC motion by checking whether rotary axis values
are present in <a class="xref" href="Hi.NcParsers.Keywords.MachineCoordinateState.html">MachineCoordinateState</a>.
</p>
Must be placed after <a class="xref" href="Hi.NcParsers.LogicSyntaxs.McAbcSyntax.html">McAbcSyntax</a> in the syntax chain.
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.MachineCoordSelectSyntax.html">MachineCoordSelectSyntax</a></dt>
<dd><p>Handles G53 (machine coordinate selection) — non-modal, one-shot.
The axis values (X/Y/Z) in the block are interpreted as machine
coordinates, bypassing all work offsets, local coordinates,
tool height compensation, and coordinate rotations.
If G91 (incremental) is active, G53 is ignored per ISO standard.</p>
<p>
Must be placed <b>before</b> <a class="xref" href="Hi.NcParsers.LogicSyntaxs.ProgramXyzSyntax.html">ProgramXyzSyntax</a> in the
syntax chain. When G53 is active, this syntax consumes X/Y/Z from
<a class="xref" href="Hi.NcParsers.Keywords.IParsingDef.html#Hi_NcParsers_Keywords_IParsingDef_Parsing">Parsing</a> and writes
<a class="xref" href="Hi.NcParsers.Keywords.IMachineCoordinateStateDef.html#Hi_NcParsers_Keywords_IMachineCoordinateStateDef_MachineCoordinateState">MachineCoordinateState</a> directly,
preventing <a class="xref" href="Hi.NcParsers.LogicSyntaxs.ProgramXyzSyntax.html">ProgramXyzSyntax</a> from processing them
as program coordinates.
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.McAbcCyclicPathSyntax.html">McAbcCyclicPathSyntax</a></dt>
<dd><p>Resolve modular rotary axes to the shortest cyclic path relative to the previous node.
Uses <a class="xref" href="Hi.NcParsers.Dependencys.IMachineAxisConfig.html#Hi_NcParsers_Dependencys_IMachineAxisConfig_IsModularRotary_System_String_">IsModularRotary(string)</a> to determine which axes
within <a class="xref" href="Hi.NcParsers.Keywords.IMachineCoordinateStateDef.html#Hi_NcParsers_Keywords_IMachineCoordinateStateDef_MachineCoordinateState">MachineCoordinateState</a> need cyclic resolution.
Falls back to hardcoded A/B/C if no <a class="xref" href="Hi.NcParsers.Dependencys.IMachineAxisConfig.html">IMachineAxisConfig</a> is available.
Must be placed after <a class="xref" href="Hi.NcParsers.LogicSyntaxs.ProgramXyzSyntax.html">ProgramXyzSyntax</a> in <a class="xref" href="Hi.NcParsers.SoftNcRunner.html#Hi_NcParsers_SoftNcRunner_NcSyntaxList">NcSyntaxList</a>.</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.McAbcSyntax.html">McAbcSyntax</a></dt>
<dd><p>Writes rotary axis values (A/B/C) into
<a class="xref" href="Hi.NcParsers.Keywords.IMachineCoordinateStateDef.html#Hi_NcParsers_Keywords_IMachineCoordinateStateDef_MachineCoordinateState">MachineCoordinateState</a> from
<a class="xref" href="Hi.NcParsers.Keywords.IParsingDef.html#Hi_NcParsers_Keywords_IParsingDef_Parsing">Parsing</a> and modal lookback.</p>
<p>
Only active when <a class="xref" href="Hi.NcParsers.Dependencys.IMachineAxisConfig.html">IMachineAxisConfig</a> declares rotary axes.
Works for both 3+2-axis (no <a class="xref" href="Hi.Numerical.Xyzabc.IMachineKinematics.html">IMachineKinematics</a>)
and simultaneous 5-axis configurations.
</p>
<p>
This syntax is intentionally ABC-only. When the block is rotary-only
(no <code>ProgramXyz</code>, e.g. <code>G00 A30.</code>) the section is created
with ABC but <b>without</b> X/Y/Z. <a class="xref" href="Hi.NcParsers.LogicSyntaxs.McAbcXyzFallbackSyntax.html">McAbcXyzFallbackSyntax</a>
— placed after <a class="xref" href="Hi.NcParsers.LogicSyntaxs.McXyzSyntax.html">McXyzSyntax</a> — copies X/Y/Z from the
previous block's <a class="xref" href="Hi.NcParsers.Keywords.IMachineCoordinateStateDef.html#Hi_NcParsers_Keywords_IMachineCoordinateStateDef_MachineCoordinateState">MachineCoordinateState</a>
to finish the section. Splitting the XYZ fill out lets this syntax
run <b>before</b> <a class="xref" href="Hi.NcParsers.LogicSyntaxs.McXyzSyntax.html">McXyzSyntax</a> (and before
<a class="xref" href="Hi.NcParsers.LogicSyntaxs.G43p4RtcpSyntax.html">G43p4RtcpSyntax</a>) without accidentally filling X/Y/Z
from prev and thereby short-circuiting
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonobject">DeriveMcXyz(JsonObject, Mat4d)</a>.
</p>
<p>
Missing rotary axes are filled from previous
<a class="xref" href="Hi.NcParsers.Keywords.IMachineCoordinateStateDef.html#Hi_NcParsers_Keywords_IMachineCoordinateStateDef_MachineCoordinateState">MachineCoordinateState</a> lookback,
unless the current section already has the value
(e.g., from <a class="xref" href="Hi.NcParsers.Initializers.HomeMcInitializer.html">HomeMcInitializer</a>).
Values are stored in degrees (matching <a class="xref" href="Hi.NcParsers.LogicSyntaxs.McAbcCyclicPathSyntax.html">McAbcCyclicPathSyntax</a>).
</p>
<p>
Must be placed <b>before</b> <a class="xref" href="Hi.NcParsers.LogicSyntaxs.McXyzSyntax.html">McXyzSyntax</a> so syntaxes
that need the current-block ABC to compute transforms
(e.g. <a class="xref" href="Hi.NcParsers.LogicSyntaxs.G43p4RtcpSyntax.html">G43p4RtcpSyntax</a>) can see it; and <b>before</b>
<a class="xref" href="Hi.NcParsers.LogicSyntaxs.McAbcCyclicPathSyntax.html">McAbcCyclicPathSyntax</a> and <a class="xref" href="Hi.NcParsers.LogicSyntaxs.LinearMotionSyntax.html">LinearMotionSyntax</a>.
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.McAbcXyzFallbackSyntax.html">McAbcXyzFallbackSyntax</a></dt>
<dd><p>Fills missing <code>X/Y/Z</code> on an ABC-only
<a class="xref" href="Hi.NcParsers.Keywords.IMachineCoordinateStateDef.html#Hi_NcParsers_Keywords_IMachineCoordinateStateDef_MachineCoordinateState">MachineCoordinateState</a> section.
Behaviour depends on whether the block is under RTCP with rotary
motion, as indicated by
<a class="xref" href="Hi.NcParsers.Syntaxs.TransformationUtil.html#Hi_NcParsers_Syntaxs_TransformationUtil_HasDynamicEntry_System_Text_Json_Nodes_JsonObject_">HasDynamicEntry(JsonObject)</a>:</p>
<ul><li>
<b>Non-dynamic</b> (no RTCP or RTCP with ABC stable) — the
programmed tool tip stays put in MC while rotary axes (if any) are
unchanged, so we simply copy X/Y/Z from the previous block's
<a class="xref" href="Hi.NcParsers.Keywords.IMachineCoordinateStateDef.html#Hi_NcParsers_Keywords_IMachineCoordinateStateDef_MachineCoordinateState">MachineCoordinateState</a>. This matches
NC modal XYZ carry-forward for rotary-only blocks such as
<code>G00 A30.</code> (non-RTCP pivoting).
</li><li>
<b>Dynamic</b> (RTCP active + ABC changing) — the programmed tool tip
must stay fixed in <i>program</i> coordinates while MC XYZ shifts to
compensate the new rotary state. Looks up the last
<a class="xref" href="Hi.NcParsers.Keywords.IProgramXyzDef.html#Hi_NcParsers_Keywords_IProgramXyzDef_ProgramXyz">ProgramXyz</a> and re-derives
<code>MC = inheritedProgramXyz × composedTransform</code>, where the
composed transform is the block's endpoint chain (now including
<a class="xref" href="Hi.NcParsers.Syntaxs.TransformationUtil.html#Hi_NcParsers_Syntaxs_TransformationUtil_PivotTransformSource">PivotTransformSource</a> as a full
rotation+translation Mat4d, so the chain already encodes the
kinematic IK). The carried <code>ProgramXyz</code> is also stamped onto
the current block so downstream consumers see a consistent
ProgramXyz + MC pair.
</li></ul>
<p>
Pair with <a class="xref" href="Hi.NcParsers.LogicSyntaxs.McAbcSyntax.html">McAbcSyntax</a>, which runs early to write ABC
but deliberately leaves X/Y/Z empty so <a class="xref" href="Hi.NcParsers.LogicSyntaxs.McXyzSyntax.html">McXyzSyntax</a> can
still derive MC XYZ from <code>ProgramXyz</code> via the transform chain
when the block carries linear motion. If <a class="xref" href="Hi.NcParsers.LogicSyntaxs.McXyzSyntax.html">McXyzSyntax</a>
has nothing to derive (no <code>ProgramXyz</code>), this syntax completes
the MC section as described above.
</p>
<p>
Does nothing when the section already carries all three of X/Y/Z
(normal linear-motion blocks), or when there is no section at all
(pure parse-only block that introduces no MC). Must be placed
<b>after</b> <a class="xref" href="Hi.NcParsers.LogicSyntaxs.McXyzSyntax.html">McXyzSyntax</a> and <b>before</b>
<a class="xref" href="Hi.NcParsers.LogicSyntaxs.McAbcCyclicPathSyntax.html">McAbcCyclicPathSyntax</a> / <a class="xref" href="Hi.NcParsers.LogicSyntaxs.LinearMotionSyntax.html">LinearMotionSyntax</a>.
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.McXyzSyntax.html">McXyzSyntax</a></dt>
<dd><p>Derives <a class="xref" href="Hi.NcParsers.Keywords.IMachineCoordinateStateDef.html#Hi_NcParsers_Keywords_IMachineCoordinateStateDef_MachineCoordinateState">MachineCoordinateState</a> from
<a class="xref" href="Hi.NcParsers.Keywords.IProgramXyzDef.html#Hi_NcParsers_Keywords_IProgramXyzDef_ProgramXyz">ProgramXyz</a> by applying the composed
<a class="xref" href="Hi.NcParsers.Keywords.ITransformationDef.html#Hi_NcParsers_Keywords_ITransformationDef_ProgramToMcTransform">ProgramToMcTransform</a>.</p>
<p>
Processes two stages:
<ol><li>Root <code>ProgramXyz</code> → root <code>MachineCoordinate</code></li><li><a class="xref" href="Hi.NcParsers.Keywords.CompoundMotion.html">CompoundMotion</a>.<a class="xref" href="Hi.NcParsers.Keywords.CompoundMotion.html#Hi_NcParsers_Keywords_CompoundMotion_ItemsKey">ItemsKey</a>[*]
— derives <code>MachineCoordinate</code> from <code>ProgramXyz</code> for items
that have <code>ProgramXyz</code> but no <code>MachineCoordinate</code></li></ol>
Must be placed after syntaxes that write <code>ProgramXyz</code>
(e.g., <a class="xref" href="Hi.NcParsers.LogicSyntaxs.ReferenceReturnSyntax.html">ReferenceReturnSyntax</a>)
and before syntaxes that read <code>MachineCoordinate</code>
(e.g., <a class="xref" href="Hi.NcParsers.LogicSyntaxs.LinearMotionSyntax.html">LinearMotionSyntax</a>).
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.PathSmoothingSyntax.html">PathSmoothingSyntax</a></dt>
<dd><p>Consumes G05.1 (high-precision contour / path smoothing) and records
its modal state. Q1 enables, Q0 disables. The simulation does not alter
the tool path — this is a controller-internal interpolation black box.</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.PeckDrillingCycleSyntax.html">PeckDrillingCycleSyntax</a></dt>
<dd><p>G83 peck drilling cycle. Supports modal repetition.
Drills in increments of depth Q, fully retracting to R between strokes.</p>
<p>
Cycle sequence (per stroke):
<ol><li>Rapid to init position (target XY, previous Z)</li><li>Rapid from init to R-point</li><li>For each stroke: rapid to clearance above previous depth,
feed Q deeper, rapid back to R</li><li>If remainder exists: feed to bottom Z, rapid to R</li><li>Rapid from R/bottom to final (G98 → init Z, G99 → R)</li></ol>
<p>
Retraction distance is read from <a class="xref" href="Hi.NcParsers.Dependencys.ICannedCycleConfig.html">ICannedCycleConfig</a>
(Fanuc #4002 / Syntec Pr4002, or <a class="xref" href="Hi.NcParsers.Dependencys.Generic.FallbackConfig.html">FallbackConfig</a>
fallback).
</p>
<p>
Reads absolute coordinates from the cycle section, which is
resolved by <a class="xref" href="Hi.NcParsers.LogicSyntaxs.CannedCycleResolveSyntax.html">CannedCycleResolveSyntax</a> (modal repetition,
G91 conversion, missing-axis fallback) before this syntax runs.
Must be placed after <a class="xref" href="Hi.NcParsers.LogicSyntaxs.CannedCycleResolveSyntax.html">CannedCycleResolveSyntax</a> and before
<a class="xref" href="Hi.NcParsers.LogicSyntaxs.IncrementalResolveSyntax.html">IncrementalResolveSyntax</a> in the syntax chain.
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.PivotTransformationSyntax.html">PivotTransformationSyntax</a></dt>
<dd><p>Writes the <a class="xref" href="Hi.NcParsers.Syntaxs.TransformationUtil.html#Hi_NcParsers_Syntaxs_TransformationUtil_PivotTransformSource">PivotTransformSource</a> entry
into <a class="xref" href="Hi.NcParsers.Keywords.ITransformationDef.html#Hi_NcParsers_Keywords_ITransformationDef_ProgramToMcTransform">ProgramToMcTransform</a>
on <b>every block</b>, capturing the Pn→MC kinematic rigid transform
for the block's endpoint rotary state. Mirrors legacy
<code>HardNcLine.GetProgramXyz</code>'s use of
<a class="xref" href="Hi.Numerical.Xyzabc.IMachineKinematics.html#Hi_Numerical_Xyzabc_IMachineKinematics_McToPn_Hi_Geom_DVec3d_">McToPn(DVec3d)</a> — without this entry, the
transform chain would miss the rotary rotation on any block whose
<code>MachineCoordinate.ABC</code> is non-zero, and <code>McXyzSyntax</code> (and
<code>ProgramXyzSyntax</code>'s inverse lookback) would silently drift.</p>
<p>
Scope is <b>not</b> limited to RTCP modal: as long as rotary axes are
physically at a non-zero position (e.g. after a non-RTCP <code>G00 B90</code>
plus any subsequent motion), the kinematic chain still contributes a
non-identity rigid transform that must appear in the endpoint chain.
<a class="xref" href="Hi.NcParsers.LogicSyntaxs.G43p4RtcpSyntax.html">G43p4RtcpSyntax</a> is orthogonal and only governs the
dynamic-rotary <a class="xref" href="Hi.NcParsers.Syntaxs.TransformationUtil.html#Hi_NcParsers_Syntaxs_TransformationUtil_KindKey">KindKey</a> tagging used by
<a class="xref" href="Hi.NcParsers.LogicSyntaxs.LinearMotionSyntax.html">LinearMotionSyntax</a> to pick the motion form.
</p>
<p>
Chain position: must run <b>after</b> all Pn-frame writers
(<a class="xref" href="Hi.NcParsers.LogicSyntaxs.IsoG68p2TiltSyntax.html">IsoG68p2TiltSyntax</a>, <a class="xref" href="Hi.NcParsers.LogicSyntaxs.ToolHeightOffsetSyntax.html">ToolHeightOffsetSyntax</a>,
<a class="xref" href="Hi.NcParsers.LogicSyntaxs.G43p4RtcpSyntax.html">G43p4RtcpSyntax</a>, <a class="xref" href="Hi.NcParsers.LogicSyntaxs.IsoCoordinateOffsetSyntax.html">IsoCoordinateOffsetSyntax</a>,
brand-specific coord offset syntaxes) so the <code>PivotTransform</code>
entry naturally lands as the <b>last</b> chain element. Must run
<b>before</b> <a class="xref" href="Hi.NcParsers.LogicSyntaxs.McXyzSyntax.html">McXyzSyntax</a> / <a class="xref" href="Hi.NcParsers.LogicSyntaxs.ProgramXyzSyntax.html">ProgramXyzSyntax</a>
so they see the completed chain.
</p>
<p>
Silently no-ops when <a class="xref" href="Hi.Numerical.Xyzabc.IMachineKinematics.html">IMachineKinematics</a> is absent
(3-axis configurations without rotary kinematics).
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.PlaneSelectSyntax.html">PlaneSelectSyntax</a></dt>
<dd><p>Consumes G17/G18/G19 plane selection from <a class="xref" href="Hi.NcParsers.Keywords.IFlagsDef.html#Hi_NcParsers_Keywords_IFlagsDef_Flags">Flags</a>
and writes <a class="xref" href="Hi.NcParsers.Keywords.IPlaneSelectDef.html">IPlaneSelectDef</a> section using conventional
axis-pair names (XY/ZX/YZ).
Modal — persists via backward lookback. Default is XY (G17).</p>
<p>
Downstream consumers (<a class="xref" href="Hi.NcParsers.LogicSyntaxs.CircularMotionSyntax.html">CircularMotionSyntax</a>,
<a class="xref" href="Hi.NcParsers.LogicSyntaxs.IsoG68RotationSyntax.html">IsoG68RotationSyntax</a>) call
<a class="xref" href="Hi.NcParsers.LogicSyntaxs.PlaneSelectSyntax.html#Hi_NcParsers_LogicSyntaxs_PlaneSelectSyntax_GetPlaneNormalDir_System_Text_Json_Nodes_JsonObject_">GetPlaneNormalDir(JsonObject)</a> to read the resolved plane.
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.PositioningSyntax.html">PositioningSyntax</a></dt>
<dd><p>Detects G90/G91 positioning mode from <a class="xref" href="Hi.NcParsers.Keywords.IFlagsDef.html#Hi_NcParsers_Keywords_IFlagsDef_Flags">Flags</a>
(or by modal lookback) and writes a <a class="xref" href="Hi.NcParsers.Keywords.Positioning.html">Positioning</a> section
(<a class="xref" href="Hi.NcParsers.Keywords.IPositioningDef.html#Hi_NcParsers_Keywords_IPositioningDef_Term">Term</a>, <a class="xref" href="Hi.NcParsers.Keywords.IPositioningDef.html#Hi_NcParsers_Keywords_IPositioningDef_Mode">Mode</a>)
to the block JSON.</p>
<p>
Fanuc/ISO: reads G90/G91 from <a class="xref" href="Hi.NcParsers.Keywords.IFlagsDef.html#Hi_NcParsers_Keywords_IFlagsDef_Flags">Flags</a> (global modal).
Heidenhain: would need a separate implementation reading I-prefix per axis.
Siemens: would extend with AC()/IC() per-axis override.
</p>
<p>
Does NOT convert incremental values — that is handled by
<a class="xref" href="Hi.NcParsers.LogicSyntaxs.IncrementalResolveSyntax.html">IncrementalResolveSyntax</a> which can be placed later
in the syntax chain, after canned cycle syntaxes have consumed
their parameters with cycle-specific G91 semantics.
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.ProgramEndCleanSyntax.html">ProgramEndCleanSyntax</a></dt>
<dd><p>Clears the per-block <code>Vars.Volatile</code> dictionary on blocks that
triggered program end (M02 / M30, identified by the
<a class="xref" href="Hi.NcParsers.Keywords.ProgramEnd.html">ProgramEnd</a> section written by <a class="xref" href="Hi.NcParsers.LogicSyntaxs.ProgramEndSyntax.html">ProgramEndSyntax</a>).</p>
<p>
Real Fanuc clears non-retained common variables (#100-#499) on program
end + reset; this syntax models that behaviour at the simulator level.
The clear happens on the same block that carried M02/M30 — the next
block's <a class="xref" href="Hi.NcParsers.LogicSyntaxs.VolatileVariableReadingSyntax.html">VolatileVariableReadingSyntax</a> carry then sees an
empty dictionary on the predecessor and starts fresh.
</p>
<p>
Pipeline placement: must run after both <a class="xref" href="Hi.NcParsers.LogicSyntaxs.ProgramEndSyntax.html">ProgramEndSyntax</a>
(which writes the <a class="xref" href="Hi.NcParsers.Keywords.ProgramEnd.html">ProgramEnd</a> section this syntax checks)
and <a class="xref" href="Hi.NcParsers.LogicSyntaxs.VolatileVariableReadingSyntax.html">VolatileVariableReadingSyntax</a> (so the carry has
already happened on this block; this syntax overwrites the result).
</p>
<p>
Retained common variables (<code>#500-#999</code>, owned by
<a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.RetainedCommonVariableTable.html">RetainedCommonVariableTable</a>) are
untouched — they survive program end on real hardware (NV-RAM).
Local variables (<code>#1-#33</code>, scope: macro call frame) are also
untouched here; their lifecycle belongs to G65/G66/M99 push/pop, not
program end.
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.ProgramEndSyntax.html">ProgramEndSyntax</a></dt>
<dd><p>Consumes M02/M30 (program end) from <a class="xref" href="Hi.NcParsers.Keywords.IFlagsDef.html#Hi_NcParsers_Keywords_IFlagsDef_Flags">Flags</a>
and writes <a class="xref" href="Hi.NcParsers.Keywords.IProgramEndDef.html">IProgramEndDef</a> section.</p>
<p>
Downstream syntaxes that need to reset modal state on program end
(e.g. <a class="xref" href="Hi.NcParsers.LogicSyntaxs.IsoLocalCoordinateOffsetSyntax.html">IsoLocalCoordinateOffsetSyntax</a> for G52 reset)
should read the <a class="xref" href="Hi.NcParsers.Keywords.ProgramEnd.html">ProgramEnd</a> section rather than
scanning for M30 in Flags directly.
</p>
Must be placed before syntaxes that depend on the ProgramEnd section.
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.ProgramStopSyntax.html">ProgramStopSyntax</a></dt>
<dd><p>Consumes M00 (unconditional stop) and M01 (optional stop) from
<a class="xref" href="Hi.NcParsers.Keywords.IFlagsDef.html#Hi_NcParsers_Keywords_IFlagsDef_Flags">Flags</a> and writes a
<a class="xref" href="Hi.NcParsers.Keywords.IProgramStopDef.html">IProgramStopDef</a> section on the block that carried the
flag. Non-modal: the section is written only on the exact block
where the stop code appears.</p>
<p>
Siblings with <a class="xref" href="Hi.NcParsers.LogicSyntaxs.ProgramEndSyntax.html">ProgramEndSyntax</a> (M02/M30) which handles
end-of-program, not in-program stops.
</p>
<p>
The parsing layer only records NC intent. Whether M01 actually
pauses the run is a runtime/semantic decision gated by the operator's
"Optional Stop" switch (analogous to
<a class="xref" href="Hi.NcParsers.Dependencys.IBlockSkipConfig.html">IBlockSkipConfig</a> for block skip).
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.ProgramXyzSyntax.html">ProgramXyzSyntax</a></dt>
<dd><p>Resolves ProgramXyz (leaf coordinate) from syntax XYZ tags.
Writes <a class="xref" href="Hi.NcParsers.Keywords.IProgramXyzDef.html#Hi_NcParsers_Keywords_IProgramXyzDef_ProgramXyz">ProgramXyz</a> sub-object to
<a class="xref" href="Hi.NcParsers.Syntaxs.SyntaxPiece.html">SyntaxPiece</a>.<a class="xref" href="Hi.NcParsers.Syntaxs.SyntaxPiece.html#Hi_NcParsers_Syntaxs_SyntaxPiece_JsonObject">JsonObject</a>.
Must be placed after <a class="xref" href="Hi.NcParsers.Syntaxs.BundleSyntax.html">BundleSyntax</a> since it uses
cross-node lookback for last position.</p>
<p>
<a class="xref" href="Hi.NcParsers.LogicSyntaxs.McXyzSyntax.html">McXyzSyntax</a> (placed after this in the chain) reads
<a class="xref" href="Hi.NcParsers.Keywords.IProgramXyzDef.html#Hi_NcParsers_Keywords_IProgramXyzDef_ProgramXyz">ProgramXyz</a> and writes
<a class="xref" href="Hi.NcParsers.Keywords.IMachineCoordinateStateDef.html#Hi_NcParsers_Keywords_IMachineCoordinateStateDef_MachineCoordinateState">MachineCoordinateState</a>.
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.ProgramXyzUtil.html">ProgramXyzUtil</a></dt>
<dd><p>Shared utilities for <a class="xref" href="Hi.NcParsers.Keywords.IProgramXyzDef.html#Hi_NcParsers_Keywords_IProgramXyzDef_ProgramXyz">ProgramXyz</a> and
<a class="xref" href="Hi.NcParsers.Keywords.IMachineCoordinateStateDef.html#Hi_NcParsers_Keywords_IMachineCoordinateStateDef_MachineCoordinateState">MachineCoordinateState</a> lookback and
resolution. Used by <a class="xref" href="Hi.NcParsers.LogicSyntaxs.ProgramXyzSyntax.html">ProgramXyzSyntax</a>,
<a class="xref" href="Hi.NcParsers.LogicSyntaxs.ReferenceReturnSyntax.html">ReferenceReturnSyntax</a>, and semantic resolvers that need
position lookback.</p>
<p>
<b>Two strategies for "what's the program coordinate at a block's
endpoint?"</b> — both invert an MC value through an
<a class="xref" href="Hi.NcParsers.Keywords.ITransformationDef.html#Hi_NcParsers_Keywords_ITransformationDef_ProgramToMcTransform">ProgramToMcTransform</a> chain,
but they pick the chain from <i>different</i> nodes:
</p>
<ul><li>
<b>By current-state transform</b>
(<a class="xref" href="Hi.NcParsers.LogicSyntaxs.ProgramXyzUtil.html#Hi_NcParsers_LogicSyntaxs_ProgramXyzUtil_ComputeProgramXyzByCurrentTransform_Hi_Common_Collections_LazyLinkedListNode_Hi_NcParsers_Syntaxs_SyntaxPiece__Hi_Geom_Vec3d_">ComputeProgramXyzByCurrentTransform(LazyLinkedListNode&lt;SyntaxPiece&gt;, Vec3d)</a>) — modal anchor is
<a class="xref" href="Hi.NcParsers.Keywords.IMachineCoordinateStateDef.html#Hi_NcParsers_Keywords_IMachineCoordinateStateDef_MachineCoordinateState">MachineCoordinateState</a>. Re-expresses an
MC value (typically a predecessor's modal MC) into the <i>current</i>
block's program frame using the current block's chain. Suitable for
chain-change blocks where the spindle physically stays put while the
chain (G54 swap, G68.2 activation, G43.4 toggle, tool-height change,
...) re-anchors the program frame; mirrors legacy
<code>HardNcLine.RebuildProgramXyzByMc</code>.
</li><li>
<b>By corresponding-state transform</b>
(<a class="xref" href="Hi.NcParsers.LogicSyntaxs.ProgramXyzUtil.html#Hi_NcParsers_LogicSyntaxs_ProgramXyzUtil_ComputeProgramXyzByCorrespondingTransform_Hi_Common_Collections_LazyLinkedListNode_Hi_NcParsers_Syntaxs_SyntaxPiece__">ComputeProgramXyzByCorrespondingTransform(LazyLinkedListNode&lt;SyntaxPiece&gt;)</a>) — modal
anchor is <a class="xref" href="Hi.NcParsers.Keywords.IProgramXyzDef.html#Hi_NcParsers_Keywords_IProgramXyzDef_ProgramXyz">ProgramXyz</a>. Recovers the
program coordinate that <code>nodeCarryingMc</code> was originally commanded
at, by inverting <i>that same node's</i> own transform on its own MC.
Suitable for RTCP rotary-dynamic inheritance, where the modal
invariant is "tool tip in workpiece frame stays put while rotary axes
turn" — the recovered Vec3d carries forward as the next rotary block's
modal ProgramXyz unchanged, regardless of how its
<code>PivotTransform</code> differs.
</li></ul>
<p>
Both strategies yield the same Vec3d when prev and current share the
same chain modal state; they only diverge across chain boundaries
(RTCP toggle, coord-system swap, tilt activation) and at rotary motion
(PivotTransform difference). Pick the wrong one and the result lands
in a stale frame:
</p>
<ul><li>
Non-RTCP using "corresponding" — leaves the pre-chain-change values,
so a block emitted right after <code>G43.4 H03</code> would inherit
ProgramXyz still in the G49 frame and the next motion's MC.Z drifts
by the introduced tool-height offset. (This was the 2026-04-25
SoftNc / HardNc divergence on <code>DemoPmcAirPlane/NC/02-ED6L20.NC</code>.)
</li><li>
RTCP using "current" — double-counts the rotary
<code>PivotTransform</code> difference, so the inherited workpiece anchor
rotates by the C delta on every rotary block.
</li></ul>
<p>
Direct callers of the two strategy helpers are rare — typically you
call the dispatcher <a class="xref" href="Hi.NcParsers.LogicSyntaxs.ProgramXyzUtil.html#Hi_NcParsers_LogicSyntaxs_ProgramXyzUtil_ResolveBlockProgramXyz_Hi_Common_Collections_LazyLinkedListNode_Hi_NcParsers_Syntaxs_SyntaxPiece__Hi_Geom_Vec3d_">ResolveBlockProgramXyz(LazyLinkedListNode&lt;SyntaxPiece&gt;, Vec3d)</a> (block's own
MC vs predecessor lookback, picks strategy from
<a class="xref" href="Hi.NcParsers.Syntaxs.TransformationUtil.html#Hi_NcParsers_Syntaxs_TransformationUtil_HasDynamicEntry_System_Text_Json_Nodes_JsonObject_">HasDynamicEntry(JsonObject)</a>) or
<a class="xref" href="Hi.NcParsers.LogicSyntaxs.ProgramXyzUtil.html#Hi_NcParsers_LogicSyntaxs_ProgramXyzUtil_GetLastProgramXyz_Hi_Common_Collections_LazyLinkedListNode_Hi_NcParsers_Syntaxs_SyntaxPiece__">GetLastProgramXyz(LazyLinkedListNode&lt;SyntaxPiece&gt;)</a> (pure predecessor lookback).
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.ReferenceReturnSyntax.html">ReferenceReturnSyntax</a></dt>
<dd><p>Writes <a class="xref" href="Hi.NcParsers.Keywords.ICompoundMotionDef.html">ICompoundMotionDef</a> section for G28 reference point return.
Reads intermediate XYZ from <code>Parsing.G28</code>
(written by <a class="xref" href="Hi.NcParsers.Syntaxs.GenericSyntaxKit.html#Hi_NcParsers_Syntaxs_GenericSyntaxKit_G28Syntax">G28Syntax</a>)
and converts to machine coordinates via
<a class="xref" href="Hi.NcParsers.LogicSyntaxs.ProgramXyzUtil.html#Hi_NcParsers_LogicSyntaxs_ProgramXyzUtil_ResolveProgramXyz_System_Text_Json_Nodes_JsonNode_Hi_Common_Collections_LazyLinkedListNode_Hi_NcParsers_Syntaxs_SyntaxPiece__Hi_NcParsers_Sentence_Hi_NcParsers_NcDiagnosticProgress_">ResolveProgramXyz(JsonNode, LazyLinkedListNode&lt;SyntaxPiece&gt;, Sentence, NcDiagnosticProgress)</a>.</p>
<p>
Must be placed after <a class="xref" href="Hi.NcParsers.LogicSyntaxs.LinearMotionSyntax.html">LinearMotionSyntax</a> in the syntax chain.
Removes the <a class="xref" href="Hi.NcParsers.Keywords.IMotionEventDef.html">IMotionEventDef</a> section written by
<a class="xref" href="Hi.NcParsers.LogicSyntaxs.LinearMotionSyntax.html">LinearMotionSyntax</a> (G28 handles its own motion).
Overwrites root <a class="xref" href="Hi.NcParsers.Keywords.IMachineCoordinateStateDef.html#Hi_NcParsers_Keywords_IMachineCoordinateStateDef_MachineCoordinateState">MachineCoordinateState</a>
and <a class="xref" href="Hi.NcParsers.Keywords.IProgramXyzDef.html#Hi_NcParsers_Keywords_IProgramXyzDef_ProgramXyz">ProgramXyz</a> with reference position
for subsequent block lookback.
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.RetainedCommonVariableReadingSyntax.html">RetainedCommonVariableReadingSyntax</a></dt>
<dd><p>Obtains values for Fanuc-style retained common variables (<code>#500-#999</code>)
by consuming literal numeric assignments from <code>Parsing.Assignments.#nnn</code>
and writing them straight to a registered
<a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.RetainedCommonVariableTable.html">RetainedCommonVariableTable</a>.</p>
<p>
No SyntaxPiece JSON mirror is created — the table is the single source of
truth for retained values, and <a class="xref" href="Hi.NcParsers.LogicSyntaxs.VariableEvaluatorSyntax.html">VariableEvaluatorSyntax</a> reads
from the table directly. The hincproj round-trip preserves writes across
project sessions.
</p>
<p>
Only literal numeric RHS values are consumed by this syntax
(<code>#500 = 1.234</code> ✓; <code>#600 = #500 + 1</code> ✗). Non-literal RHS entries
are left untouched in <code>Parsing.Assignments</code>; <a class="xref" href="Hi.NcParsers.LogicSyntaxs.VariableEvaluatorSyntax.html">VariableEvaluatorSyntax</a>
resolves them and writes the result through the same table. The two
syntaxes are decoupled.
</p>
<p>
If no <a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.RetainedCommonVariableTable.html">RetainedCommonVariableTable</a> is registered on the
runner's <code>NcDependencyList</code>, this syntax is a no-op.
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.RotaryAxisUtil.html">RotaryAxisUtil</a></dt>
<dd><p>Shared utilities for rotary axis (A/B/C) resolution.
Used by <a class="xref" href="Hi.NcParsers.LogicSyntaxs.G53p1RotaryPositionSyntax.html">G53p1RotaryPositionSyntax</a>,
<a class="xref" href="Hi.NcParsers.LogicSyntaxs.McAbcSyntax.html">McAbcSyntax</a>, <a class="xref" href="Hi.NcParsers.LogicSyntaxs.IsoG68p2TiltSyntax.html">IsoG68p2TiltSyntax</a>,
and other syntaxes that read or write rotary axis values.</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.SpindleSpeedSyntax.html">SpindleSpeedSyntax</a></dt>
<dd><p>Consumes S (spindle speed) and M03/M04/M05 (spindle direction)
from <a class="xref" href="Hi.NcParsers.Keywords.IParsingDef.html#Hi_NcParsers_Keywords_IParsingDef_Parsing">Parsing</a>.
Both are modal — persist across blocks via backward node lookback.
Writes resolved state to a <a class="xref" href="Hi.NcParsers.Keywords.ISpindleSpeedDef.html">ISpindleSpeedDef</a> section.
Direction is converted from ISO M-codes to the conventional
<a class="xref" href="Hi.Numerical.SpindleDirection.html">SpindleDirection</a> enum at this layer.</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.TappingCycleSyntax.html">TappingCycleSyntax</a></dt>
<dd><p>G84 (right-hand) / G74 (left-hand) tapping cycles.
Supports modal repetition.</p>
<p>
Cycle sequence:
<ol><li>Rapid to init position (target XY, previous Z)</li><li>Rapid from init to R-point</li><li>Feed from R-point to bottom Z</li><li>Spindle reverse at bottom</li><li>Feed retract to final Z (G98 → init Z, G99 → R)</li><li>Spindle restore to forward direction</li></ol>
<p>
G84: forward = CW (M03), reverse = CCW (M04).
G74: forward = CCW (M04), reverse = CW (M03).
</p>
<p>
Reads absolute coordinates from the cycle section, which is
resolved by <a class="xref" href="Hi.NcParsers.LogicSyntaxs.CannedCycleResolveSyntax.html">CannedCycleResolveSyntax</a> (modal repetition,
G91 conversion, missing-axis fallback) before this syntax runs.
Must be placed after <a class="xref" href="Hi.NcParsers.LogicSyntaxs.CannedCycleResolveSyntax.html">CannedCycleResolveSyntax</a> and before
<a class="xref" href="Hi.NcParsers.LogicSyntaxs.IncrementalResolveSyntax.html">IncrementalResolveSyntax</a> in the syntax chain.
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.TiltTransformUtil.html">TiltTransformUtil</a></dt>
<dd><p>Shared utilities for all tilt transform syntaxes
(ISO, Siemens, Heidenhain). Handles section IO,
backward lookback, and <a class="xref" href="Hi.NcParsers.Keywords.ITransformationDef.html#Hi_NcParsers_Keywords_ITransformationDef_ProgramToMcTransform">ProgramToMcTransform</a> composition.</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.ToolChangeSyntax.html">ToolChangeSyntax</a></dt>
<dd><p>Consumes T (tool number) and M06 (tool change) from
<a class="xref" href="Hi.NcParsers.Keywords.IParsingDef.html#Hi_NcParsers_Keywords_IParsingDef_Parsing">Parsing</a>.
T is modal — persists across blocks. M06 triggers the change.
Writes resolved state to a <code>ToolChange</code> section:
<code>{ &ldquo;ToolId&rdquo;: 1, &ldquo;IsChange&rdquo;: true, &ldquo;Term&rdquo;: &ldquo;M06&rdquo; }</code>.
<a class="xref" href="Hi.NcParsers.LogicSyntaxs.ToolChangeSyntax.html#Hi_NcParsers_LogicSyntaxs_ToolChangeSyntax_TermKey">TermKey</a> records the trigger command and is only written
when <a class="xref" href="Hi.NcParsers.LogicSyntaxs.ToolChangeSyntax.html#Hi_NcParsers_LogicSyntaxs_ToolChangeSyntax_IsChangeKey">IsChangeKey</a> is true (i.e. the block actually carried
the tool-change M code); modal-only blocks omit it.</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.ToolHeightOffsetSyntax.html">ToolHeightOffsetSyntax</a></dt>
<dd><p>Resolves ISO tool height offset (G43/G44/G49) to the effective offset
value (mm) and composes the offset as a translation into the accumulated
<a class="xref" href="Hi.NcParsers.Keywords.ITransformationDef.html#Hi_NcParsers_Keywords_ITransformationDef_ProgramToMcTransform">ProgramToMcTransform</a> matrix.</p>
<p>
RTCP modes (G43.4, TRAORI, M128) are handled by separate brand-specific
syntaxes (e.g., <a class="xref" href="Hi.NcParsers.LogicSyntaxs.G43p4RtcpSyntax.html">G43p4RtcpSyntax</a>).
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.UnitModeSyntax.html">UnitModeSyntax</a></dt>
<dd><p>Detects the unit-system code (ISO Group 06: G20 inch / G21 metric)
from <a class="xref" href="Hi.NcParsers.Keywords.IFlagsDef.html#Hi_NcParsers_Keywords_IFlagsDef_Flags">Flags</a> and writes a <a class="xref" href="Hi.NcParsers.Keywords.Unit.html">Unit</a>
section (<a class="xref" href="Hi.NcParsers.Keywords.IUnitDef.html#Hi_NcParsers_Keywords_IUnitDef_Term">Term</a>, <a class="xref" href="Hi.NcParsers.Keywords.IUnitDef.html#Hi_NcParsers_Keywords_IUnitDef_System">System</a>).
Modal — absence of an explicit flag inherits the previous block's
unit, defaulting to <a class="xref" href="Hi.NcParsers.Keywords.Unit.html#Hi_NcParsers_Keywords_Unit_Metric">Metric</a> at program start.</p>
<p>
The HiNC pipeline works exclusively in millimetres. When
<a class="xref" href="Hi.NcParsers.Keywords.Generic.IsoKeywords.html#Hi_NcParsers_Keywords_Generic_IsoKeywords_G20">G20</a> is detected this syntax emits an
<code>Unit--InchNotSupported</code> Unsupported Error so upstream callers
are forced to pre-convert the NC program to metric.
<a class="xref" href="Hi.NcParsers.Keywords.Generic.IsoKeywords.html#Hi_NcParsers_Keywords_Generic_IsoKeywords_G21">G21</a> is accepted as a no-op confirmation of
the default.
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.VariableEvaluatorSyntax.html">VariableEvaluatorSyntax</a></dt>
<dd><p>Resolves Custom Macro B variable references and bracket expressions on
a single block by walking the parser-stage residue and replacing each
reference with its evaluated numeric value.</p>
<p>
Two passes per block:
</p>
<ol><li>
<code>Parsing.Assignments.#nnn</code> entries with a non-literal RHS are
evaluated in iteration order. Successful results are written to
<code>Vars.Volatile</code> for <code>#100-#499</code> or to the registered
<code>RetainedCommonVariableTable</code> for <code>#500-#999</code>, and the
entry is removed. Iteration order matters: an earlier RHS may set a
variable that a later RHS reads. Failures (vacant operand, unsupported
function, parse error) emit a <code>VariableExpression--Unevaluated</code>
error and leave the entry in place; out-of-range ids are likewise left
in place.
</li><li>
Every string-typed value reachable from <code>Parsing.&lt;tag&gt;</code>
(axis tags, canned-cycle sub-objects like <code>Parsing.G81</code>,
<code>Parsing.G54.1</code>, etc.) is parsed; on a successful evaluation the
string is replaced with a numeric <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonvalue">JsonValue</a>. Failures
silently leave the original string and rely on downstream
<a class="xref" href="Hi.NcParsers.SoftNcUtil.html#Hi_NcParsers_SoftNcUtil_GetParsedDouble_System_Text_Json_Nodes_JsonObject_System_String_Hi_NcParsers_Sentence_Hi_NcParsers_NcDiagnosticProgress_">GetParsedDouble(JsonObject, string, Sentence, NcDiagnosticProgress)</a> at consumer sites to surface
<code>VariableExpression--Unevaluated</code> only if the tag is actually read.
</li></ol>
<p>
Lookup chain (first non-null wins):
</p>
<ol><li>Block-local <code>Vars.Local</code> with <a class="xref" href="Hi.Common.Collections.LazyLinkedListNode-1.html#Hi_Common_Collections_LazyLinkedListNode_1_Previous">Previous</a> traceback (<code>#1-#33</code>).</li><li>Block-local <code>Vars.Volatile</code> with traceback (<code>#100-#499</code>).</li><li>Each <a class="xref" href="Hi.NcParsers.LogicSyntaxs.Evaluation.IVariableLookup.html">IVariableLookup</a> in the runner's <code>NcDependencyList</code>, in registration order (e.g. <code>RetainedCommonVariableTable</code>, <code>FanucParameterTable</code>, <code>FanucToolOffsetTable</code>).</li><li>Each <a class="xref" href="Hi.NcParsers.LogicSyntaxs.Evaluation.IRuntimeVariableLookup.html">IRuntimeVariableLookup</a> in <a class="xref" href="Hi.NcParsers.LogicSyntaxs.VariableEvaluatorSyntax.html#Hi_NcParsers_LogicSyntaxs_VariableEvaluatorSyntax_RuntimeVariableLookups">RuntimeVariableLookups</a>, in list order (e.g. <code>FanucPositionVariableLookup</code>).</li></ol>
<p>
Each lookup is responsible for its own id-range gating — id ranges are
not hard-coded inside this syntax. Adding a new variable surface
(Heidenhain Q parameters, Siemens GUDs, modal G/F/T reads) is additive:
register an <a class="xref" href="Hi.NcParsers.LogicSyntaxs.Evaluation.IVariableLookup.html">IVariableLookup</a> on a dependency or push an
<a class="xref" href="Hi.NcParsers.LogicSyntaxs.Evaluation.IRuntimeVariableLookup.html">IRuntimeVariableLookup</a> onto the per-preset list.
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.LogicSyntaxs.VolatileVariableReadingSyntax.html">VolatileVariableReadingSyntax</a></dt>
<dd><p>Obtains values for Fanuc-style non-retained common variables
(<code>#100-#499</code>). Reads literal numeric assignments from
<code>Parsing.Assignments.#nnn</code>, dict-merges them with the previous block's
volatile state, and writes the resulting per-block dictionary into
<code>Vars.Volatile</code>.</p>
<p>
Lifetime is bounded by <code>MachiningSession</code>: within one session the
dictionary carries forward block-by-block via this syntax; session restart
abandons the SyntaxPiece JSON dataflow and starts fresh. Program-end
(M02/M30) clearing is handled by <a class="xref" href="Hi.NcParsers.LogicSyntaxs.ProgramEndCleanSyntax.html">ProgramEndCleanSyntax</a>.
</p>
<p>
Only literal numeric RHS values are consumed by this syntax
(<code>#124 = 15.</code> ✓; <code>#100 = #1 + 5</code> ✗). Non-literal RHS entries
are left untouched in <code>Parsing.Assignments</code>; <a class="xref" href="Hi.NcParsers.LogicSyntaxs.VariableEvaluatorSyntax.html">VariableEvaluatorSyntax</a>
resolves them and writes the result into the same per-block dictionary.
The two syntaxes are decoupled — the evaluator's lookup tracebacks via
<code>SyntaxPiece</code> linkage so it does not depend on having run before
or after this syntax.
</p>
</dd>
</dl>
</article>
<div class="contribution d-print-none">
</div>
</div>
<div class="affix">
<nav id="affix"></nav>
</div>
</main>
<div class="container-xxl search-results" id="search-results"></div>
<footer class="border-top text-secondary">
<div class="container-xxl">
<div class="flex-fill">
<span> Copyright © 2025 <a href='https://superhightech.com.tw'>Tech Coordinate</a>. All rights reserved. <a href='https://superhightech.com.tw'>超級高科技股份有限公司</a> © 2025 版權所有 </span>
</div>
</div>
</footer>
</body>
</html>