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

397 lines
24 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Namespace Hi.NcParsers.EvaluationSyntaxs.Fanuc | HiAPI-C# 2025 </title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" content="Namespace Hi.NcParsers.EvaluationSyntaxs.Fanuc | 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.EvaluationSyntaxs.Fanuc">
<h1 id="Hi_NcParsers_EvaluationSyntaxs_Fanuc" data-uid="Hi.NcParsers.EvaluationSyntaxs.Fanuc" class="text-break">Namespace Hi.NcParsers.EvaluationSyntaxs.Fanuc</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.EvaluationSyntaxs.Fanuc.FanucGotoSyntax.html">FanucGotoSyntax</a></dt>
<dd><p>Resolves Fanuc Custom Macro B GOTO control flow.
Triggered by <code>Parsing.FanucGoto</code> (written by
<a class="xref" href="Hi.NcParsers.ParsingSyntaxs.Fanuc.FanucGotoParsingSyntax.html">FanucGotoParsingSyntax</a>); decides whether
to fire, and on fire calls
<a class="xref" href="Hi.Common.Collections.LazyLinkedList-1.html#Hi_Common_Collections_LazyLinkedList_1_ReplaceSource_System_Collections_Generic_IEnumerable__0__">ReplaceSource(IEnumerable&lt;T&gt;)</a> on <code>layers[0]</code> with
the re-segmented file content starting at the matching <code>N{target}</code>
label. The host block stays materialised (so cache dumps still see the
GOTO call site); execution naturally continues from the new source
once the pipeline pulls the next block.</p>
<p>
Both unconditional <code>GOTO &lt;n&gt;</code> and conditional
<code>IF [&lt;expr&gt;] GOTO &lt;n&gt;</code> are implemented. The conditional
form leans on <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VariableEvaluatorSyntax.html">VariableEvaluatorSyntax</a>'s pass-2 tree walk
to substitute <code>Parsing.FanucGoto.Condition</code> with a numeric
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonvalue">JsonValue</a> when the expression
evaluates successfully — <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonnode">ReadCondition(JsonNode)</a> then reads the
node polymorphically. Truthy non-zero fires the redirect; zero falls
through silently; a still-string (unresolved) Condition emits
<code>FanucGoto--ConditionNotEvaluated</code> and falls through.
</p>
<p>
Pipeline placement: tail of the Fanuc / Mazak / Syntec Evaluation
bundle. Must run after <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VariableEvaluatorSyntax.html">VariableEvaluatorSyntax</a> so any
<code>#&lt;var&gt;</code> in the target N (e.g. <code>GOTO #1</code>) has been
substituted to a literal in <code>Parsing.FanucGoto.N</code>. Reader syntaxes
(<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VolatileVariableReadingSyntax.html">VolatileVariableReadingSyntax</a> etc.) are independent —
they touch <code>Parsing.Assignments</code>, not <code>Parsing.FanucGoto</code>.
</p>
<p>
Label scanning uses two hosted helper syntaxes —
CommentSyntax and IndexSyntax — applied to
each candidate block in turn so the predicate
<code>IndexNote.Number == target</code> matches the same way the Parsing
bundle would. Both are XML-IO-able so API customers can swap them
(e.g. for a controller variant using <code>;</code>-style comments or a
different head symbol). Defaults match Fanuc: <a class="xref" href="Hi.NcParsers.ParsingSyntaxs.CommentSyntaxs.QuoteCommentSyntax.html">QuoteCommentSyntax</a>
and <a class="xref" href="Hi.NcParsers.ParsingSyntaxs.HeadIndexSyntax.html">HeadIndexSyntax</a> with the <code>"N"</code> symbol.
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucIfThenSyntax.html">FanucIfThenSyntax</a></dt>
<dd><p>Resolves Fanuc Custom Macro B <code>IF [&lt;cond&gt;] THEN &lt;body&gt;</code>
single-block conditionals. Triggered by <code>Parsing.FanucIfThen</code>
(written by <a class="xref" href="Hi.NcParsers.ParsingSyntaxs.Fanuc.FanucIfThenParsingSyntax.html">FanucIfThenParsingSyntax</a>);
reads the now-resolved <a class="xref" href="Hi.NcParsers.Keywords.FanucIfThen.html#Hi_NcParsers_Keywords_FanucIfThen_Condition">Condition</a> node, decides
whether to fire, and on fire lifts the parsing-stage
<code>PendingAssignments</code> sub-object into the canonical
<code>Parsing.Assignments</code> bucket so the brand-specific reader syntaxes
downstream route each entry to its store the same way they would handle
an unconditional <code>#nnn = &lt;literal&gt;</code> on a normal block.</p>
<p>
Unlike <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucGotoSyntax.html">FanucGotoSyntax</a> there is no source splice, no
label scan, no iteration watchdog — the spec restricts the body to the
current block. The host block is preserved either way (the stamped
<code>FanucIfThen</code> section on the host's top-level JSON keeps the
IF-THEN call site visible to cache dumps and diagnostics, with
<a class="xref" href="Hi.NcParsers.Keywords.FanucIfThen.html#Hi_NcParsers_Keywords_FanucIfThen_Applied">Applied</a> flipped true only on a successful
fire).
</p>
<p>
Pipeline placement: in the Evaluation bundle <b>after</b>
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VariableEvaluatorSyntax.html">VariableEvaluatorSyntax</a> (so the Condition expression has
been substituted in place by pass-2 tree walk, and each
<code>PendingAssignments</code> RHS string has been evaluated to a numeric
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonvalue">JsonValue</a>) and <b>before</b> the reader syntaxes
(<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VolatileVariableReadingSyntax.html">VolatileVariableReadingSyntax</a>,
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.RetainedCommonVariableReadingSyntax.html">RetainedCommonVariableReadingSyntax</a>,
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucLocalVariableReadingSyntax.html">FanucLocalVariableReadingSyntax</a>,
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucSystemControlVariableSyntax.html">FanucSystemControlVariableSyntax</a>) — that ordering lets
the lifted entries reach the readers as if they had been written by
<a class="xref" href="Hi.NcParsers.ParsingSyntaxs.TagAssignmentSyntax.html">TagAssignmentSyntax</a> on a normal block.
</p>
<p>
Three condition outcomes mirror the
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.text.json.nodes.jsonnode">ReadCondition(JsonNode)</a> shape:
<ul><li>Truthy non-zero → lift assignments, stamp Applied=true.</li><li>Truthy zero → fall through silently, Applied=false.</li><li>Truthy null (evaluator failed, condition still a string or
non-finite) → warn <code>FanucIfThen--ConditionNotEvaluated</code>, do not
lift, Applied=false.</li></ul>
A truthy condition with no PendingAssignments (body did not parse as
one or more assignments — e.g. a G-code body, currently unsupported)
warns <code>FanucIfThen--UnsupportedBody</code> and falls through.
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucLocalVariableReadingSyntax.html">FanucLocalVariableReadingSyntax</a></dt>
<dd><p>Routes literal-RHS assignments to Fanuc-style local macro variables
(<code>#1-#33</code>) from <code>Parsing.Assignments</code> into <code>Vars.Local</code>
on the current block, carrying the previous block's <code>Vars.Local</code>
dict forward when both blocks share the same
<a class="xref" href="Hi.NcParsers.Keywords.MacroFrame.html">MacroFrame</a> id. Mirrors
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VolatileVariableReadingSyntax.html">VolatileVariableReadingSyntax</a> for the
<code>#100-#499</code> range, with two differences:</p>
<ul><li>Carry is gated by <a class="xref" href="Hi.NcParsers.Keywords.MacroFrame.html">MacroFrame</a> equality, so a
caller block after a G65 return does not inherit the macro body's
final locals.</li><li>Writes outside a macro frame (a main-program block doing
<code>#11 = 5</code>) emit
<code>LocalVariable--MainFrameWriteUnsupported</code> and consume the
assignment without persisting — real Fanuc allows main-frame local
writes but this simulator only tracks locals inside G65/G66 call
frames; surfacing the gap as a diagnostic is more informative than
a silent
<a class="xref" href="Hi.NcParsers.InspectionSyntaxs.UnconsumedCheckSyntax.html">UnconsumedCheckSyntax</a> hit.</li></ul>
<p>
Pipeline placement: Evaluation bundle, after
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VariableEvaluatorSyntax.html">VariableEvaluatorSyntax</a> (so any expression RHS such as
<code>#11 = #1 + 1</code> has already been normalised to a literal by the
time this reader runs) and after the other range readers
(<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.RetainedCommonVariableReadingSyntax.html">RetainedCommonVariableReadingSyntax</a>,
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VolatileVariableReadingSyntax.html">VolatileVariableReadingSyntax</a>) so they all share a
similar Reader-stage shape.
</p>
<p>
Only literal numeric RHS values are consumed here; non-literal
entries (which can only persist if
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VariableEvaluatorSyntax.html">VariableEvaluatorSyntax</a> failed to resolve them) are
left untouched and surface via the evaluator's own
<code>VariableExpression--Unevaluated</code> diagnostic plus
<a class="xref" href="Hi.NcParsers.InspectionSyntaxs.UnconsumedCheckSyntax.html">UnconsumedCheckSyntax</a>.
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroArgumentMap.html">FanucMacroArgumentMap</a></dt>
<dd><p>Fanuc Custom Macro B Type-I argument-letter map: which call-line letter
binds to which <code>Vars.Local</code> id (<code>#1-#26</code>) inside the macro body.
Reserved letters (<code>G</code>, <code>L</code>, <code>N</code>, <code>O</code>, <code>P</code>) are
absent — they are consumed by the call itself, not passed through.</p>
<p>
Used by <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroCallSyntax.html">FanucMacroCallSyntax</a> (G65, one-shot) and
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.html">FanucModalMacroSyntax</a> (G66, modal) to translate the
argument letters captured by <a class="xref" href="Hi.NcParsers.Syntaxs.FanucSyntaxUtil.html#Hi_NcParsers_Syntaxs_FanucSyntaxUtil_G65Syntax">G65Syntax</a>
/ <a class="xref" href="Hi.NcParsers.Syntaxs.FanucSyntaxUtil.html#Hi_NcParsers_Syntaxs_FanucSyntaxUtil_G66Syntax">G66Syntax</a> into the
<code>#nnn</code> bindings the macro body's expression evaluator can read.
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroCallSyntax.html">FanucMacroCallSyntax</a></dt>
<dd><p>Inlines a Fanuc Custom Macro B one-shot call (<code>G65 P_ L_ [letter
value …]</code>) into the source layer and binds the call-line argument
letters to <code>Vars.Local</code> <code>#1-#26</code> per the Type-I map (see
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroArgumentMap.html">FanucMacroArgumentMap</a>). Every inlined block carries the
binding dict, a clone of the <a class="xref" href="Hi.NcParsers.Keywords.FanucMacroCall.html">FanucMacroCall</a> diagnostic
record, and a <a class="xref" href="Hi.NcParsers.Keywords.MacroFrame.html">MacroFrame</a> id stamp — so
LocalVariableLookup resolves arg references in a
single-block lookup, a cache dump landing on any block immediately
shows which call it belongs to, and downstream
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucLocalVariableReadingSyntax.html">FanucLocalVariableReadingSyntax</a> carries body-internal
<code>#1-#33</code> writes forward only within the same frame. The host
block itself records <a class="xref" href="Hi.NcParsers.Keywords.FanucMacroCall.html">FanucMacroCall</a> but stays in the
caller's frame (no <a class="xref" href="Hi.NcParsers.Keywords.MacroFrame.html">MacroFrame</a> stamp) and emits no
motion act; after the macro body's last inlined block the pipeline
continues naturally into the caller's next block (the inlined pieces
sit ahead of the host block's successor in <code>layers[0]</code>).</p>
<p>
Frame isolation works on two layers. Statically, caller blocks
have no <a class="xref" href="Hi.NcParsers.Keywords.MacroFrame.html">MacroFrame</a> stamp (frame id 0 by
<a class="xref" href="Hi.NcParsers.Keywords.MacroFrame.html#Hi_NcParsers_Keywords_MacroFrame_Get_System_Text_Json_Nodes_JsonObject_">Get(JsonObject)</a>), so the inlined frame ids (allocated
fresh per <code>L</code>-repetition) never collide with main. Dynamically,
LocalVariableLookup and
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucLocalVariableReadingSyntax.html">FanucLocalVariableReadingSyntax</a> compare frame ids
before carrying any <code>Vars.Local</code> entry across a block boundary
— a macro body's body-internal writes therefore stay inside the
macro and never leak back into the caller's frame.
</p>
<p>
Filename lookup mirrors <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.SubProgramCallSyntax.html">SubProgramCallSyntax</a>:
<code>O{P:D4}.NC</code>, <code>O{P}.NC</code>, <code>O{P:D4}</code>, <code>O{P}</code>,
<code>{P:D4}.NC</code>, <code>{P}.NC</code> — first match wins. The lookup root
is <a class="xref" href="Hi.NcParsers.Dependencys.Generic.SubProgramFolderConfig.html#Hi_NcParsers_Dependencys_Generic_SubProgramFolderConfig_InternalFolder">InternalFolder</a> (G65 has no
"external storage" variant; M198's external root is M98/M198-only).
</p>
<p>
<code>L &gt; 1</code> inlines the same macro <code>L</code> times in series. Each
repetition is a fresh segmentation pass (so each block gets its own
<a class="xref" href="Hi.NcParsers.Syntaxs.SyntaxPiece.html">SyntaxPiece</a> JSON object — the downstream pipeline
mutates JSON in place and would clobber sibling repetitions if
instances were shared) and gets a fresh <code>FileIndex</code> (so
<code>(FileIndex, LineIndex)</code> pairs stay unique across the
<code>L</code>-copies of the same source lines).
</p>
<p>
Pipeline placement: ahead of <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.SubProgramCallSyntax.html">SubProgramCallSyntax</a> inside
the Fanuc <code>Evaluation</code> <a class="xref" href="Hi.NcParsers.Syntaxs.BundleSyntax.html">BundleSyntax</a>
so a hypothetical <code>G65 P_</code> + <code>M98 P_</code> on the same block
expands the G65 macro first (would be an unusual but legal
composition). Detection is on the <code>Parsing.G65</code> sub-object
written by <a class="xref" href="Hi.NcParsers.Syntaxs.FanucSyntaxUtil.html#Hi_NcParsers_Syntaxs_FanucSyntaxUtil_G65Syntax">G65Syntax</a>
(a <a class="xref" href="Hi.NcParsers.ParsingSyntaxs.ParameterizedFlagSyntax.html">ParameterizedFlagSyntax</a>) — the
keyword <code>"G65"</code> never reaches <code>Parsing.Flags</code> because the
parameterized match has already consumed the text by the time
<a class="xref" href="Hi.NcParsers.ParsingSyntaxs.NumberedFlagSyntax.html">NumberedFlagSyntax</a> runs.
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.html">FanucModalMacroSyntax</a></dt>
<dd><p>Handles Fanuc Custom Macro B modal-call lifecycle (<code>G66</code> setup,
<code>G67</code> cancel, and per-motion-block implicit macro invocation).
The same class is registered twice in the pipeline via
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.html#Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucModalMacroSyntax_Phase">Phase</a> — once in the Evaluation bundle
(<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.SyntaxPhase.html#Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucModalMacroSyntax_SyntaxPhase_Setup">Setup</a>, captures G66/G67 edges and carries
the <a class="xref" href="Hi.NcParsers.Keywords.FanucModalMacro.html">FanucModalMacro</a> state block-to-block) and once in
the PostLogic bundle (<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.SyntaxPhase.html#Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucModalMacroSyntax_SyntaxPhase_Expansion">Expansion</a>, on every
motion block within an active G66 modal, inlines the macro body via
the same mechanism <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucMacroCallSyntax.html">FanucMacroCallSyntax</a> uses).</p>
<p>
Keeping both phases in one class makes the pairing visually explicit:
readers see "G66 in one file" and the two methods (<code>DoSetup</code>,
<code>DoExpansion</code>) make the lifecycle obvious. The two factory
helpers (<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.html#Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucModalMacroSyntax_Setup">Setup</a>, <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.html#Hi_NcParsers_EvaluationSyntaxs_Fanuc_FanucModalMacroSyntax_Expansion">Expansion</a>) mirror the
<code>ModalCarrySyntax.Logic</code> / <code>.PostLogic</code> pattern already in
the codebase.
</p>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucSystemControlVariableSyntax.html">FanucSystemControlVariableSyntax</a></dt>
<dd><p>Consumes Fanuc-style system-control variable assignments
(<code>#3000-#3999</code>) — alarm trigger (<code>#3000</code>), millisecond and
hour clocks (<code>#3001</code> / <code>#3002</code>), single-block / feed-hold
bypass flags (<code>#3003</code> / <code>#3004</code>), pause-with-message
(<code>#3006</code>), mirror-image flags (<code>#3007</code>), date / time
(<code>#3011</code> / <code>#3012</code>), tool-life data (<code>#3030</code> /
<code>#3032</code>), etc.</p>
<p>
Every id in this range is a controller-side state variable — its
authoritative value lives on the real hardware (RTC, alarm bus,
override switches, …) and an NC write at most triggers a side effect
(clock reset, alarm raise, message-pause prompt). Offline simulation
has none of that machinery, so this syntax does <b>not</b> emulate the
effect. Instead it:
</p>
<ol><li>records the literal write on the block JSON under
<code>Vars.SystemControl</code> (round-trip and cache-dump visibility);</li><li>emits a <code>FanucSystemControl--Unsupported</code>
<a class="xref" href="Hi.NcParsers.NcDiagnosticProgress.html#Hi_NcParsers_NcDiagnosticProgress_UnsupportedMessage_Hi_NcParsers_ISentenceCarrier_System_String_System_String_System_Object_">UnsupportedMessage(ISentenceCarrier, string, string, object)</a>
so the user knows the assignment was recognised but its controller-side
effect is not simulated. Message-severity (not Warning) because these
writes are safe no-ops offline — every consumed assignment would emit
a Warning per block, which would be noisy without signalling anything
the user must act on;</li><li>removes the entry from <code>Parsing.Assignments</code> so it does not
re-surface as a generic <code>Parsing--Unconsumed</code> diagnostic.</li></ol>
<p>
The dictionary carries forward block-by-block (same dict-merge pattern
as <a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VolatileVariableReadingSyntax.html">VolatileVariableReadingSyntax</a>) so a downstream consumer
can read the most recent recorded value via <code>SyntaxPiece</code> linkage.
</p>
<p>
Only literal numeric RHS values are consumed; non-literal RHS
(e.g. <code>#3002 = #500</code>) is left in <code>Parsing.Assignments</code> for
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VariableEvaluatorSyntax.html">VariableEvaluatorSyntax</a> to resolve, mirroring the
retained / volatile reading syntaxes.
</p>
<p>
Fanuc-family only — Siemens uses named system variables
(<code>$AC_TIME</code>, <code>$A_DAY</code>, …) and Heidenhain uses
<code>FN18: SYSREAD</code>; neither flows through <code>Parsing.Assignments.#nnn</code>.
</p>
</dd>
</dl>
<h3 id="enums">
Enums
</h3>
<dl class="jumplist">
<dt><a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Fanuc.FanucModalMacroSyntax.SyntaxPhase.html">FanucModalMacroSyntax.SyntaxPhase</a></dt>
<dd><p>Identifies which pipeline phase the instance runs in. The two
values correspond to the Evaluation-bundle and PostLogic-bundle
registrations of this same syntax class.</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>