235 lines
13 KiB
HTML
235 lines
13 KiB
HTML
<!DOCTYPE html>
|
||
<html>
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<title>Namespace Hi.NcParsers.Dependencys.Fanuc | HiAPI-C# 2025 </title>
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<meta name="title" content="Namespace Hi.NcParsers.Dependencys.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 "{query}"">
|
||
<meta name="loc:searchNoResults" content="No results for "{query}"">
|
||
<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.Dependencys.Fanuc">
|
||
|
||
<h1 id="Hi_NcParsers_Dependencys_Fanuc" data-uid="Hi.NcParsers.Dependencys.Fanuc" class="text-break">Namespace Hi.NcParsers.Dependencys.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.Dependencys.Fanuc.FanucGotoIterationDependency.html">FanucGotoIterationDependency</a></dt>
|
||
<dd><p>Watchdog for Fanuc Custom Macro B GOTO loops. Holds a
|
||
<a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.FanucGotoIterationDependency.html#Hi_NcParsers_Dependencys_Fanuc_FanucGotoIterationDependency_MaxIterationsPerTarget">MaxIterationsPerTarget</a> limit (XML-persisted user config —
|
||
the soft cap above which the upcoming
|
||
<code>FanucGotoSyntax</code> stops firing and emits a warning) plus a
|
||
runtime per-target hit counter (<a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.FanucGotoIterationDependency.html#Hi_NcParsers_Dependencys_Fanuc_FanucGotoIterationDependency_CountByTarget">CountByTarget</a> — not
|
||
serialised, cleared at session start by
|
||
<a class="xref" href="Hi.NcParsers.SoftNcRunner.html#Hi_NcParsers_SoftNcRunner_RunControlLines_System_String_System_Collections_Generic_IEnumerable_System_String__Hi_MachiningProcs_MachiningSession_Hi_MachiningProcs_SessionProgress_System_Threading_CancellationToken_">RunControlLines(string, IEnumerable<string>, MachiningSession, SessionProgress, CancellationToken)</a>).</p>
|
||
<p>
|
||
The dependency is syntax-managed: <code>FanucGotoSyntax</code> reads the
|
||
limit, increments the counter, and decides whether to fire. There is
|
||
no host <code>Func</code> provider — the dep is placed in
|
||
<a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.html">Hi.NcParsers.Dependencys.Fanuc</a> rather than
|
||
<a class="xref" href="Hi.NcParsers.Dependencys.SystemWired.html">Hi.NcParsers.Dependencys.SystemWired</a> because nothing outside the
|
||
syntax pipeline writes it; <a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.FanucGotoIterationDependency.html#Hi_NcParsers_Dependencys_Fanuc_FanucGotoIterationDependency_Reset">Reset()</a> is a plain method call
|
||
the runner invokes, not a host-wired Func.
|
||
</p>
|
||
<p>
|
||
The counter key is <code>(FileName, TargetN)</code> where <code>FileName</code>
|
||
is the source-level file path of the block containing the GOTO (the
|
||
relative path form carried on <a class="xref" href="Hi.NcParsers.Sentence.html#Hi_NcParsers_Sentence_FilePath">FilePath</a> — same
|
||
form used by <code>IndexedFileLine</code> labels). Source-level keying means
|
||
multiple inline invocations of the same subprogram pool their counts
|
||
(they ARE the same source-code GOTO), while two different files with
|
||
their own N100 stay isolated (they ARE different jumps).
|
||
</p>
|
||
<p>
|
||
Default <a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.FanucGotoIterationDependency.html#Hi_NcParsers_Dependencys_Fanuc_FanucGotoIterationDependency_MaxIterationsPerTarget">MaxIterationsPerTarget</a> is 1000 — a runaway-loop
|
||
guard, not a precise iteration budget. Legitimate macro loops
|
||
(multi-hole drill matrices, calibration sweeps) sit well below this;
|
||
truly infinite loops hit the limit fast. Projects with batch-style
|
||
macros that legitimately need higher counts can raise the value in
|
||
the project XML.
|
||
</p>
|
||
</dd>
|
||
</dl>
|
||
<dl class="jumplist">
|
||
<dt><a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.FanucParameterTable.html">FanucParameterTable</a></dt>
|
||
<dd><p>Fanuc controller parameter table.
|
||
Stores system parameters (single value) and axis parameters (per-axis value)
|
||
following real Fanuc parameter numbering.</p>
|
||
</dd>
|
||
</dl>
|
||
<dl class="jumplist">
|
||
<dt><a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.FanucPositionVariableLookup.html">FanucPositionVariableLookup</a></dt>
|
||
<dd><p>Fanuc-style position system variables read from the previous block's
|
||
runtime-state JSON sections:</p>
|
||
<ul><li><span class="term"><code>#5001-#5003</code></span>Block-end position X/Y/Z (workpiece) → previous block's <a class="xref" href="Hi.NcParsers.Keywords.IProgramXyzDef.html#Hi_NcParsers_Keywords_IProgramXyzDef_ProgramXyz">ProgramXyz</a>.</li><li><span class="term"><code>#5021-#5023</code></span>Current machine position X/Y/Z → previous block's <a class="xref" href="Hi.NcParsers.Keywords.MachineCoordinateState.html">MachineCoordinateState</a>.</li><li><span class="term"><code>#5041-#5043</code></span>Current absolute position X/Y/Z → previous block's <a class="xref" href="Hi.NcParsers.Keywords.IProgramXyzDef.html#Hi_NcParsers_Keywords_IProgramXyzDef_ProgramXyz">ProgramXyz</a>.</li></ul>
|
||
<p>
|
||
Stateless. Configured on
|
||
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.VariableEvaluatorSyntax.html#Hi_NcParsers_EvaluationSyntaxs_VariableEvaluatorSyntax_RuntimeVariableLookups">RuntimeVariableLookups</a> rather than
|
||
<code>NcDependencyList</code> because the read needs the block node for
|
||
<a class="xref" href="Hi.Common.Collections.LazyLinkedListNode-1.html#Hi_Common_Collections_LazyLinkedListNode_1_Previous">Previous</a> access — there is no
|
||
long-lived dependency object that owns this data.
|
||
</p>
|
||
</dd>
|
||
</dl>
|
||
<dl class="jumplist">
|
||
<dt><a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.FanucToolOffsetVariableLookup.html">FanucToolOffsetVariableLookup</a></dt>
|
||
<dd><p>Fanuc-side adapter that exposes a wrapped <a class="xref" href="Hi.NcParsers.Dependencys.Generic.ToolOffsetTable.html">ToolOffsetTable</a>
|
||
(resolved at call time from the dependency list) as an
|
||
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Evaluation.IRuntimeVariableLookup.html">IRuntimeVariableLookup</a> following Fanuc Memory C tool
|
||
offset addressing: <code>#2001+N → effective height of offset N</code>
|
||
(geometry − wear).</p>
|
||
<p>
|
||
The underlying <a class="xref" href="Hi.NcParsers.Dependencys.Generic.ToolOffsetTable.html">ToolOffsetTable</a> stays brand-neutral —
|
||
Heidenhain / Siemens can use the same storage with different addressing
|
||
by registering their own adapter alongside the table. Stateless: holds
|
||
no reference of its own and resolves the table from the per-call
|
||
<code>dependencies</code> list, so XML round-trip is trivial (an empty element).
|
||
</p>
|
||
<p>
|
||
Registered on a brand preset's
|
||
VariableEvaluatorSyntax.RuntimeVariableLookups, not on
|
||
<a class="xref" href="Hi.NcParsers.SoftNcRunner.html#Hi_NcParsers_SoftNcRunner_NcDependencyList">NcDependencyList</a> — the wrapper owns no
|
||
long-lived data, only the Fanuc-style id addressing scheme. The
|
||
underlying <a class="xref" href="Hi.NcParsers.Dependencys.Generic.ToolOffsetTable.html">ToolOffsetTable</a> still lives in
|
||
<code>NcDependencyList</code> as the data dependency.
|
||
</p>
|
||
</dd>
|
||
</dl>
|
||
<dl class="jumplist">
|
||
<dt><a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.RetainedCommonVariableTable.html">RetainedCommonVariableTable</a></dt>
|
||
<dd><p>Fanuc-style ISO controller common variable table for the retained range
|
||
<code>#500-#999</code>. These variables survive a power cycle (in real hardware
|
||
they live in NV-RAM) and are serialised into the project file.</p>
|
||
<p>
|
||
Excluded by design:
|
||
<ul><li><span class="term">Local <code>#1-#33</code></span>Call-frame scoped (Fanuc local variables); lives in the <code>SyntaxPiece</code> JSON dataflow, not here.</li><li><span class="term">Non-retained common <code>#100-#499</code></span>Cleared by program-end / power reset; lives in the <code>SyntaxPiece</code> JSON dataflow as well, not in this table.</li><li><span class="term">System <code>#1000+</code></span>Read-only or computed from runtime state; resolved by dedicated reading syntaxes against other dependencies (e.g. <a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.FanucParameterTable.html">FanucParameterTable</a>, tool offset / WCS tables).</li></ul>
|
||
|
||
<p>
|
||
Vacant (Fanuc <code><vacant></code>) is represented by <code>null</code>: either the dictionary
|
||
has no entry for the key, or the entry maps to <code>null</code>. Both are treated identically by <a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.RetainedCommonVariableTable.html#Hi_NcParsers_Dependencys_Fanuc_RetainedCommonVariableTable_GetVariable_System_Int32_">GetVariable(int)</a>.
|
||
</p>
|
||
<p>
|
||
Naming rationale: Fanuc official documentation calls <code>#500-#999</code> "retained common variables"
|
||
(and <code>#100-#499</code> "non-retained common variables"). The umbrella term "macro variable" was
|
||
avoided because it conflicts with Custom Macro B's call-frame concept (G65/G66 push a frame
|
||
containing the local <code>#1-#33</code>); using <code>RetainedCommonVariableTable</code> reserves "macro"
|
||
for the call-frame topic.
|
||
</p>
|
||
</dd>
|
||
</dl>
|
||
<h3 id="enums">
|
||
Enums
|
||
</h3>
|
||
<dl class="jumplist">
|
||
<dt><a class="xref" href="Hi.NcParsers.Dependencys.Fanuc.CutterCompensationType.html">CutterCompensationType</a></dt>
|
||
<dd><p>Fanuc #5003: Cutter compensation startup/cancellation type.</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>
|