Archived
deploy webservice static-file routing for docsite folder URLs, per-instance step-cache db, and constant-height panel title bars.
This commit is contained in:
@@ -0,0 +1,389 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Class CodedPositionUtil | HiAPI-C# 2025 </title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="title" content="Class CodedPositionUtil | HiAPI-C# 2025 ">
|
||||
|
||||
<meta name="description" content="Shared coded-position resolution for the write-stage consumers ( for rotary words, for linear words): turns a per-word entry of the coded family ( / / / / — stamped by for CAC()/CIC()/CDC()/CACP()/CACN()) plus the evaluated position number into an axis coordinate via , and names the plain override value the caller rewrites the entry to — so the tail-pass and every other downstream reader only ever see the established non-coded vocabulary. Failure semantics mirror the Siemens alarms as far as a simulator can: an invalid position number (alarm 17510) or a missing table reports an error diagnostic and resolves to "hold" — the caller writes the anchor so the axis does not move. CIC(0) also resolves to hold, by specification ("the indexing axis is not traversed") and silently. A CIC from between two indexing positions advances to the n-th next position in the programmed direction. On a cyclic indexing axis the incremental sign becomes a directional ( / ) approach; increments spanning more than one revolution reach the correct position but collapse the extra full turns (the tail-pass windows cover one revolution).">
|
||||
<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.LogicSyntaxs.CodedPositionUtil">
|
||||
|
||||
|
||||
|
||||
<h1 id="Hi_NcParsers_LogicSyntaxs_CodedPositionUtil" data-uid="Hi.NcParsers.LogicSyntaxs.CodedPositionUtil" class="text-break">
|
||||
Class CodedPositionUtil
|
||||
</h1>
|
||||
|
||||
<div class="facts text-secondary">
|
||||
<dl><dt>Namespace</dt><dd><a class="xref" href="Hi.html">Hi</a>.<a class="xref" href="Hi.NcParsers.html">NcParsers</a>.<a class="xref" href="Hi.NcParsers.LogicSyntaxs.html">LogicSyntaxs</a></dd></dl>
|
||||
<dl><dt>Assembly</dt><dd>HiMech.dll</dd></dl>
|
||||
</div>
|
||||
|
||||
<div class="markdown summary"><p>Shared coded-position resolution for the write-stage consumers
|
||||
(<a class="xref" href="Hi.NcParsers.LogicSyntaxs.McAbcSyntax.html">McAbcSyntax</a> for rotary words,
|
||||
<a class="xref" href="Hi.NcParsers.LogicSyntaxs.IncrementalResolveSyntax.html">IncrementalResolveSyntax</a> for linear words): turns a
|
||||
per-word <a class="xref" href="Hi.NcParsers.Keywords.PositioningOverride.html">PositioningOverride</a> entry of the coded family
|
||||
(<a class="xref" href="Hi.NcParsers.Keywords.Positioning.html#Hi_NcParsers_Keywords_Positioning_CodedAbsolute">CodedAbsolute</a> /
|
||||
<a class="xref" href="Hi.NcParsers.Keywords.Positioning.html#Hi_NcParsers_Keywords_Positioning_CodedIncremental">CodedIncremental</a> /
|
||||
<a class="xref" href="Hi.NcParsers.Keywords.Positioning.html#Hi_NcParsers_Keywords_Positioning_CodedShortest">CodedShortest</a> /
|
||||
<a class="xref" href="Hi.NcParsers.Keywords.Positioning.html#Hi_NcParsers_Keywords_Positioning_CodedPositiveOnly">CodedPositiveOnly</a> /
|
||||
<a class="xref" href="Hi.NcParsers.Keywords.Positioning.html#Hi_NcParsers_Keywords_Positioning_CodedNegativeOnly">CodedNegativeOnly</a> — stamped by
|
||||
<a class="xref" href="Hi.NcParsers.EvaluationSyntaxs.Siemens.SiemensAcIcSyntax.html">SiemensAcIcSyntax</a> for
|
||||
<code>CAC()</code>/<code>CIC()</code>/<code>CDC()</code>/<code>CACP()</code>/<code>CACN()</code>)
|
||||
plus the evaluated position number into an axis coordinate via
|
||||
<a class="xref" href="Hi.NcParsers.Dependencys.IIndexingPositionConfig.html">IIndexingPositionConfig</a>, and names the plain override
|
||||
value the caller rewrites the entry to — so the
|
||||
<a class="xref" href="Hi.NcParsers.LogicSyntaxs.McAbcCyclicPathSyntax.html">McAbcCyclicPathSyntax</a> tail-pass and every other
|
||||
downstream reader only ever see the established non-coded vocabulary.</p>
|
||||
<p>
|
||||
Failure semantics mirror the Siemens alarms as far as a simulator can:
|
||||
an invalid position number (alarm 17510) or a missing table reports an
|
||||
error diagnostic and resolves to "hold" — the caller writes the anchor
|
||||
so the axis does not move. <code>CIC(0)</code> also resolves to hold, by
|
||||
specification ("the indexing axis is not traversed") and silently.
|
||||
A <code>CIC</code> from between two indexing positions advances to the n-th
|
||||
next position in the programmed direction. On a cyclic indexing axis
|
||||
the incremental sign becomes a directional
|
||||
(<a class="xref" href="Hi.NcParsers.Keywords.Positioning.html#Hi_NcParsers_Keywords_Positioning_PositiveOnly">PositiveOnly</a> /
|
||||
<a class="xref" href="Hi.NcParsers.Keywords.Positioning.html#Hi_NcParsers_Keywords_Positioning_NegativeOnly">NegativeOnly</a>) approach; increments spanning
|
||||
more than one revolution reach the correct position but collapse the
|
||||
extra full turns (the tail-pass windows cover one revolution).
|
||||
</p>
|
||||
</div>
|
||||
<div class="markdown conceptual"></div>
|
||||
|
||||
<div class="codewrapper">
|
||||
<pre><code class="lang-csharp hljs">public static class CodedPositionUtil</code></pre>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="typelist inheritance">
|
||||
<dt>Inheritance</dt>
|
||||
<dd>
|
||||
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
|
||||
<div><span class="xref">CodedPositionUtil</span></div>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
<dl class="typelist inheritedMembers">
|
||||
<dt>Inherited Members</dt>
|
||||
<dd>
|
||||
<div>
|
||||
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object)</a>
|
||||
</div>
|
||||
<div>
|
||||
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
|
||||
</div>
|
||||
<div>
|
||||
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a>
|
||||
</div>
|
||||
<div>
|
||||
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
|
||||
</div>
|
||||
<div>
|
||||
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone">object.MemberwiseClone()</a>
|
||||
</div>
|
||||
<div>
|
||||
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
|
||||
</div>
|
||||
<div>
|
||||
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>
|
||||
</div>
|
||||
</dd></dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2 class="section" id="fields">Fields
|
||||
</h2>
|
||||
|
||||
|
||||
|
||||
<h3 id="Hi_NcParsers_LogicSyntaxs_CodedPositionUtil_ConfigMissingDiagId" data-uid="Hi.NcParsers.LogicSyntaxs.CodedPositionUtil.ConfigMissingDiagId">
|
||||
ConfigMissingDiagId
|
||||
|
||||
</h3>
|
||||
|
||||
<div class="markdown level1 summary"><p>Diagnostic id for a coded-position word whose axis no longer
|
||||
resolves an indexing table at the write stage (the unwrap stage
|
||||
only stamps coded overrides for configured indexing axes, so this
|
||||
indicates the dependency list changed between stages). The axis
|
||||
holds its position.</p>
|
||||
</div>
|
||||
<div class="markdown level1 conceptual"></div>
|
||||
|
||||
<div class="codewrapper">
|
||||
<pre><code class="lang-csharp hljs">public const string ConfigMissingDiagId = "CodedPosition--ConfigMissing"</code></pre>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="section">Field Value</h4>
|
||||
<dl class="parameters">
|
||||
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
||||
<dd></dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 id="Hi_NcParsers_LogicSyntaxs_CodedPositionUtil_NumberInvalidDiagId" data-uid="Hi.NcParsers.LogicSyntaxs.CodedPositionUtil.NumberInvalidDiagId">
|
||||
NumberInvalidDiagId
|
||||
|
||||
</h3>
|
||||
|
||||
<div class="markdown level1 summary"><p>Diagnostic id for a coded position number the indexing table cannot
|
||||
resolve: not an integer, outside the table, or (via <code>CIC</code>)
|
||||
advanced past the end of a non-cyclic table. The Siemens control
|
||||
raises alarm 17510 and stops; the simulation reports this error and
|
||||
holds the axis.</p>
|
||||
</div>
|
||||
<div class="markdown level1 conceptual"></div>
|
||||
|
||||
<div class="codewrapper">
|
||||
<pre><code class="lang-csharp hljs">public const string NumberInvalidDiagId = "CodedPosition--NumberInvalid"</code></pre>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<h4 class="section">Field Value</h4>
|
||||
<dl class="parameters">
|
||||
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
||||
<dd></dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h2 class="section" id="methods">Methods
|
||||
</h2>
|
||||
|
||||
|
||||
<a id="Hi_NcParsers_LogicSyntaxs_CodedPositionUtil_IsCodedOverride_" data-uid="Hi.NcParsers.LogicSyntaxs.CodedPositionUtil.IsCodedOverride*"></a>
|
||||
|
||||
<h3 id="Hi_NcParsers_LogicSyntaxs_CodedPositionUtil_IsCodedOverride_System_String_" data-uid="Hi.NcParsers.LogicSyntaxs.CodedPositionUtil.IsCodedOverride(System.String)">
|
||||
IsCodedOverride(string)
|
||||
|
||||
</h3>
|
||||
|
||||
<div class="markdown level1 summary"><p>True when <code class="paramref">overrideValue</code> is one of the five
|
||||
coded-position <a class="xref" href="Hi.NcParsers.Keywords.PositioningOverride.html">PositioningOverride</a> values.</p>
|
||||
</div>
|
||||
<div class="markdown level1 conceptual"></div>
|
||||
|
||||
<div class="codewrapper">
|
||||
<pre><code class="lang-csharp hljs">public static bool IsCodedOverride(string overrideValue)</code></pre>
|
||||
</div>
|
||||
|
||||
<h4 class="section">Parameters</h4>
|
||||
<dl class="parameters">
|
||||
<dt><code>overrideValue</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
||||
<dd></dd>
|
||||
</dl>
|
||||
|
||||
<h4 class="section">Returns</h4>
|
||||
<dl class="parameters">
|
||||
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
|
||||
<dd></dd>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a id="Hi_NcParsers_LogicSyntaxs_CodedPositionUtil_TryResolveCodedTarget_" data-uid="Hi.NcParsers.LogicSyntaxs.CodedPositionUtil.TryResolveCodedTarget*"></a>
|
||||
|
||||
<h3 id="Hi_NcParsers_LogicSyntaxs_CodedPositionUtil_TryResolveCodedTarget_Hi_NcParsers_Dependencys_IIndexingPositionConfig_System_String_System_String_System_Double_System_Double_Hi_NcParsers_ISentenceCarrier_Hi_NcParsers_NcDiagnosticProgress_System_Double__System_String__" data-uid="Hi.NcParsers.LogicSyntaxs.CodedPositionUtil.TryResolveCodedTarget(Hi.NcParsers.Dependencys.IIndexingPositionConfig,System.String,System.String,System.Double,System.Double,Hi.NcParsers.ISentenceCarrier,Hi.NcParsers.NcDiagnosticProgress,System.Double@,System.String@)">
|
||||
TryResolveCodedTarget(IIndexingPositionConfig, string, string, double, double, ISentenceCarrier, NcDiagnosticProgress, out double, out string)
|
||||
|
||||
</h3>
|
||||
|
||||
<div class="markdown level1 summary"><p>Resolves a coded-position word to its target axis coordinate.
|
||||
Returns true with the target position; false means “hold” — the
|
||||
caller writes <code class="paramref">anchorPosition</code> instead (no motion
|
||||
on this axis), with any error already reported.
|
||||
<code class="paramref">resolvedOverride</code> is always set to the plain
|
||||
override value the caller stamps over the coded entry
|
||||
(<a class="xref" href="Hi.NcParsers.Keywords.Positioning.html#Hi_NcParsers_Keywords_Positioning_Absolute">Absolute</a> on every hold).</p>
|
||||
</div>
|
||||
<div class="markdown level1 conceptual"></div>
|
||||
|
||||
<div class="codewrapper">
|
||||
<pre><code class="lang-csharp hljs">public static bool TryResolveCodedTarget(IIndexingPositionConfig indexingConfig, string axis, string codedOverride, double parsedValue, double anchorPosition, ISentenceCarrier sentenceCarrier, NcDiagnosticProgress diag, out double targetPosition, out string resolvedOverride)</code></pre>
|
||||
</div>
|
||||
|
||||
<h4 class="section">Parameters</h4>
|
||||
<dl class="parameters">
|
||||
<dt><code>indexingConfig</code> <a class="xref" href="Hi.NcParsers.Dependencys.IIndexingPositionConfig.html">IIndexingPositionConfig</a></dt>
|
||||
<dd><p>Indexing table, or null when the dependency list carries none.</p>
|
||||
</dd>
|
||||
<dt><code>axis</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
||||
<dd><p>Axis name (e.g., “C”).</p>
|
||||
</dd>
|
||||
<dt><code>codedOverride</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
||||
<dd><p>The coded <a class="xref" href="Hi.NcParsers.Keywords.PositioningOverride.html">PositioningOverride</a> entry value.</p>
|
||||
</dd>
|
||||
<dt><code>parsedValue</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></dt>
|
||||
<dd><p>Evaluated word value — the position number (or count, for <a class="xref" href="Hi.NcParsers.Keywords.Positioning.html#Hi_NcParsers_Keywords_Positioning_CodedIncremental">CodedIncremental</a>).</p>
|
||||
</dd>
|
||||
<dt><code>anchorPosition</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></dt>
|
||||
<dd><p>Current axis position, used as the <code>CIC</code> anchor and as the hold target.</p>
|
||||
</dd>
|
||||
<dt><code>sentenceCarrier</code> <a class="xref" href="Hi.NcParsers.ISentenceCarrier.html">ISentenceCarrier</a></dt>
|
||||
<dd><p>Block to anchor diagnostics to.</p>
|
||||
</dd>
|
||||
<dt><code>diag</code> <a class="xref" href="Hi.NcParsers.NcDiagnosticProgress.html">NcDiagnosticProgress</a></dt>
|
||||
<dd><p>Diagnostic sink; may be null.</p>
|
||||
</dd>
|
||||
<dt><code>targetPosition</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></dt>
|
||||
<dd><p>Resolved target axis coordinate.</p>
|
||||
</dd>
|
||||
<dt><code>resolvedOverride</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></dt>
|
||||
<dd><p>Plain override value to stamp over the coded entry.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h4 class="section">Returns</h4>
|
||||
<dl class="parameters">
|
||||
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
|
||||
<dd></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>
|
||||
Reference in New Issue
Block a user