Archived
deploy.
This commit is contained in:
@@ -0,0 +1,431 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Heidenhain Controller Support | HiAPI-C# 2025 </title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="title" content="Heidenhain Controller Support | 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="">
|
||||
<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="Controllers/HeidenhainSupport">
|
||||
<h1 id="heidenhain-controller-support">Heidenhain Controller Support</h1>
|
||||
|
||||
<p>Heidenhain programs run on a single controller preset that reads <strong>both</strong> dialects — TNC klartext
|
||||
(TNC 640 / TNC 530 conversational) and Heidenhain <strong>DIN/ISO</strong>. There is no separate selection to
|
||||
make: pick Heidenhain as the project's controller and the program is read in whichever dialect it is
|
||||
written in.</p>
|
||||
<p>Coverage is stated in the same three states as
|
||||
<a href="controller-iso.html#how-to-read-this-page">General NC Code Support</a> — supported, recognized but not
|
||||
simulated, and not supported. <em>Recognized but not simulated</em> is a deliberate state: the construct is
|
||||
consumed and reported under its own message id, so it can never be silently misread as something
|
||||
else. A <code>PLANE AXIAL B+45</code> will never be mistaken for a rotary-axis command.</p>
|
||||
<h2 id="program-format">Program format</h2>
|
||||
<h3 id="separators-are-optional">Separators are optional</h3>
|
||||
<p>Klartext is normally written with spaces between the letter instructions, and that is what the
|
||||
control shows. Some post-processors emit the same program with no separators at all. <strong>Both forms
|
||||
parse</strong>, and so does the detached feed spelling.</p>
|
||||
<blockquote>
|
||||
<p>Equivalent, all parsed:</p>
|
||||
<ul>
|
||||
<li><code>L X-26.3 Y+43.1 Z+100.3 A-90.0 C+13.123 FQ3</code> and <code>LX-26.3Y+43.1Z+100.3A-90.0C+13.123FQ3</code></li>
|
||||
<li><code>L X+0 Y+0 R0 FMAX</code> and <code>LX+0Y+0R0FMAX</code></li>
|
||||
<li><code>FMAX M03 M08</code> and <code>FMAXM03M08</code></li>
|
||||
<li><code>F20000</code> and <code>F 20000</code></li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
<h3 id="multi-line-blocks">Multi-line blocks</h3>
|
||||
<p>A statement broken across lines with the tilde continuation — the usual shape of a <code>CYCL DEF</code> body or
|
||||
a long <code>PLANE</code> statement — is joined back into one block before parsing, so it is read as the single
|
||||
statement it is.</p>
|
||||
<h2 id="motion">Motion</h2>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Construct</th>
|
||||
<th>Support</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>L</code></td>
|
||||
<td>Straight-line motion with its axis words.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>LN</code></td>
|
||||
<td>Surface-normal block — a straight line carrying the endpoint plus up to two normalized vectors, in the fixed element order <code>X,Y,Z</code> → <code>NX,NY,NZ</code> → <code>TX,TY,TZ</code>. See <a href="#vector-blocks-ln">Vector blocks</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>FMAX</code></td>
|
||||
<td>Rapid traverse.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>CC</code> / <code>C</code></td>
|
||||
<td>Circular motion — <code>CC</code> sets the pole, <code>C</code> states the end point. <code>DR-</code> is clockwise and <code>DR+</code> counter-clockwise, the centre always comes from the modal <code>CC</code> rather than from the <code>C</code> block, and an arc that closes on its start point is a full circle. See <a href="#arc-centres-cc">Arc centres</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>RL</code> / <code>RR</code> / <code>R0</code></td>
|
||||
<td>Radius compensation left / right / off.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>M91</code></td>
|
||||
<td>One-shot machine-coordinate move for that block.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>M126</code> / <code>M127</code></td>
|
||||
<td>Shortest-path rotary traverse on / off. With neither stated, shortest path is the default.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>M140 MB+n</code> / <code>M140 MB MAX</code></td>
|
||||
<td>Tool-axis retract — by <code>n</code> mm, or to the positive Z stroke limit. Without a configured stroke limit, <code>MB MAX</code> reports <code>M140--NoStrokeLimit</code> and is skipped. The statement's own <code>F</code> drives the retract without entering the modal feedrate.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>STOP</code></td>
|
||||
<td>Program stop, alongside <code>M00</code> / <code>M01</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>CYCL DEF 32 TOLERANCE</code></td>
|
||||
<td>Path-smoothing tolerance.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>BLK FORM</code></td>
|
||||
<td>Recorded as a stock declaration. It does <strong>not</strong> replace the workpiece configured in the project.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3 id="arc-centres-cc">Arc centres (<code>CC</code>)</h3>
|
||||
<p>A <code>C</code> block never states its own centre. Each in-plane component is resolved from the modal <code>CC</code>
|
||||
section: the <code>CC</code> block's own axis word first, then the same axis of the previous <code>CC</code>, and last the
|
||||
arc's own start point. A <code>CC</code> stating no coordinates is the one spelling that supplies all three at
|
||||
once — it takes the last programmed position, read at the <code>CC</code> block rather than at the arc, and
|
||||
replaces the modal centre instead of inheriting it. That is what makes the manual's own shape work:
|
||||
<code>CC</code> on the centre, a move out to the arc start, then the <code>C</code> block.</p>
|
||||
<p>A centre that lands on the arc's own start point leaves the block with no radius and so no arc
|
||||
geometry: it reports <code>Arc-CircleCenter--OnStartPoint</code> and is degraded to a straight move to the
|
||||
endpoint. One in-plane coordinate is enough to escape that — an arc whose modal chain still leaves
|
||||
the other coordinate to the start point keeps real geometry and plays normally, and is refused only
|
||||
by the optimizer's splition, described under <a href="#optimized-output">Optimized output</a>.</p>
|
||||
<h3 id="vector-blocks-ln">Vector blocks (<code>LN</code>)</h3>
|
||||
<p>CAM-generated five-axis programs state the posture as vectors rather than as rotary words. An <code>LN</code>
|
||||
block carries the endpoint plus the surface-normal vector <code>NX</code>/<code>NY</code>/<code>NZ</code> — the 3D tool-compensation
|
||||
direction — and, optionally, the tool vector <code>TX</code>/<code>TY</code>/<code>TZ</code>. HiNC resolves whichever vector governs
|
||||
into the machine's rotary axes and feeds the result through the same RTCP machinery the rotary-word
|
||||
programs use, so there is no second motion path to reason about.</p>
|
||||
<p>Which vector governs follows the control's own rules:</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Situation</th>
|
||||
<th>Tool axis</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>T</code> present, <code>M128</code> or <code>FUNCTION TCPM</code> active</td>
|
||||
<td>The <code>T</code> vector — the tool keeps the set orientation.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>T</code> absent, RTCP active</td>
|
||||
<td>The surface normal <code>N</code> — the tool is held perpendicular to the contour.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>RTCP inactive</td>
|
||||
<td>The <code>T</code> vector is <strong>ignored</strong>, exactly as the control ignores it. Reported as <code>Orientation-Vector--IgnoredNoTcpm</code>, with the posture left untouched.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>RTCP counts as active when the same block turns it on, so a block that both activates RTCP and
|
||||
carries a vector is not skipped.</p>
|
||||
<p>Two limits are worth knowing before trusting the result:</p>
|
||||
<ul>
|
||||
<li>The vector is read in the <strong>untilted</strong> program frame. An <code>LN</code> block under an active <code>PLANE</code> tilt is
|
||||
reported as <code>Orientation-Vector--TiltedFrameAssumed</code> rather than remapped.</li>
|
||||
<li>Compensation <strong>along</strong> the surface normal (<code>DR2</code> / 3D-ToolComp) is recognized, not simulated —
|
||||
<code>SurfaceNormal--CompNotSimulated</code>, raised once per run.</li>
|
||||
</ul>
|
||||
<p>A vector that is not unit length is normalized and reported (<code>Orientation-Vector--NotNormalized</code>); a
|
||||
zero vector is reported as <code>Orientation-Vector--ZeroVector</code>.</p>
|
||||
<h2 id="tools">Tools</h2>
|
||||
<p><code>TOOL CALL</code> performs the tool change on its own — klartext has no separate <code>M06</code> trigger. A tool
|
||||
number or a quoted tool name is accepted.</p>
|
||||
<blockquote>
|
||||
<p>Parsed:</p>
|
||||
<ul>
|
||||
<li><code>TOOL CALL 1 Z S5000</code></li>
|
||||
<li><code>TOOL CALL "1" Z S5000</code></li>
|
||||
<li><code>TOOL CALL "B40R" Z S3000 DL+0.5</code></li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
<ul>
|
||||
<li>The spindle speed <code>S</code> is recorded modally.</li>
|
||||
<li><code>DL</code> is a length delta — the effective tool height is the tool-table height <strong>plus</strong> <code>DL</code>.</li>
|
||||
<li><code>DR</code> is read and recorded but <strong>not applied</strong>: radius compensation uses the tool-table radius as-is,
|
||||
and the block reports <code>ToolChange--DeltaUnsupported</code>.</li>
|
||||
<li>A tool axis other than <code>Z</code> reports <code>ToolChange--AxisUnsupported</code>.</li>
|
||||
<li>A <code>TOOL CALL</code> whose tool number could not be captured — an unevaluated variable, for example —
|
||||
reports <code>ToolChange--MissingToolId</code>.</li>
|
||||
</ul>
|
||||
<h2 id="datums">Datums</h2>
|
||||
<p><code>CYCL DEF 247</code> sets the datum preset and <code>CYCL DEF 7</code> is an <strong>additive</strong> shift on top of it, which is
|
||||
the TNC semantic. The two compose as separate entries in the coordinate chain instead of replacing
|
||||
each other.</p>
|
||||
<blockquote>
|
||||
<p>Parsed:</p>
|
||||
<pre><code>CYCL DEF 247 Q339=+1
|
||||
</code></pre>
|
||||
<pre><code>CYCL DEF 7.0 DATUM SHIFT
|
||||
CYCL DEF 7.1 X10.123
|
||||
CYCL DEF 7.2 Y22.223
|
||||
CYCL DEF 7.3 Z32.97
|
||||
</code></pre>
|
||||
</blockquote>
|
||||
<h2 id="q-parameters-and-fn">Q parameters and FN</h2>
|
||||
<p><code>Q</code>, <code>QR</code>, <code>QL</code> and <code>QS</code> parameters are read wherever a value is expected, so <code>FQ1</code> reaches the
|
||||
feedrate, <code>L X+Q2</code> reaches the program position and <code>TOOL CALL SQ3</code> reaches the spindle speed. <code>Q0</code>–<code>Q99</code>
|
||||
free parameters and <code>QR0</code>–<code>QR499</code> permanent parameters are held as per-project data and saved with
|
||||
the project.</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Construct</th>
|
||||
<th>Support</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>FN 0</code>–<code>FN 5</code></td>
|
||||
<td>Assignment and arithmetic, including the <code>DIV</code> keyword of FN 4 and the prefix <code>SQRT</code> of FN 5.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>FN 9</code>–<code>FN 12</code></td>
|
||||
<td>Conditional jumps — <strong>executed</strong>, with a per-label iteration cap so a corrupt or hostile program cannot spin forever.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Other <code>FN</code> opcodes (<code>FN 14</code>, <code>FN 16</code>, <code>FN 18 SYSREAD</code>, …)</td>
|
||||
<td>Recognized, not simulated. The statement is claimed and reported, so its target parameter stays empty instead of taking a fabricated value.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<blockquote>
|
||||
<p>Parsed:</p>
|
||||
<ul>
|
||||
<li><code>Q1 = 5000</code></li>
|
||||
<li><code>FN0: Q1 = 5000</code></li>
|
||||
<li><code>FN1: Q1 = -Q2 + -5</code></li>
|
||||
<li><code>FN2: Q1 = +10 - +5</code></li>
|
||||
<li><code>FN3: Q2 = +3 * +3</code></li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
<h2 id="tilted-planes-and-rtcp">Tilted planes and RTCP</h2>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Construct</th>
|
||||
<th>Support</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>PLANE SPATIAL</code></td>
|
||||
<td>Fully composed, including <code>SEQ+</code> / <code>SEQ-</code>, <code>COORD ROT</code> / <code>TABLE ROT</code>, and the <code>STAY</code> / <code>MOVE</code> / <code>TURN</code> positioning behaviours.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>PLANE RESET</code></td>
|
||||
<td>Cancels the tilt.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>PLANE VECTOR</code></td>
|
||||
<td>Structurally captured, not simulated.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>PLANE EULER</code> / <code>POINTS</code> / <code>RELATIV</code> / <code>AXIAL</code> / <code>PROJECTED</code></td>
|
||||
<td>Recognized, not simulated — consumed and reported as <code>HeidenhainPlane--Unsupported</code>, with the previous tilt retained.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>FUNCTION TCPM</code></td>
|
||||
<td>Supported, read as the default <code>REFPNT TIP-TIP</code>. A center-referenced reference point (<code>REFPNT CNT-CNT</code> / <code>TIP-CENTER</code>) is <strong>recognized, not simulated</strong>: the coordinates are still taken as tip-to-tip, so CNT-referenced CAM output simulates offset by the ball radius along the tool axis. Reported as <code>Orientation-RefPoint--CntNotSimulated</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>M128</code> / <code>M129</code></td>
|
||||
<td>Tool centre point control on / off — real RTCP, the Heidenhain sibling of ISO <code>G43.4</code> and Siemens <code>TRAORI</code>.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<blockquote>
|
||||
<p>Parsed:</p>
|
||||
<ul>
|
||||
<li><code>PLANE SPATIAL SPA-60.3 SPB+0 SPC-19.88 STAY SEQ- TABLE ROT</code></li>
|
||||
<li><code>PLANE RESET STAY</code></li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
<h2 id="cycles-and-calls">Cycles and calls</h2>
|
||||
<ul>
|
||||
<li><strong><code>CYCL DEF 2xx</code></strong> bodies are read with their <code>Q</code> parameters mirrored into the block. Cycles <strong>200</strong>,
|
||||
<strong>232</strong>, <strong>251</strong>, <strong>252</strong> and <strong>253</strong> are mapped onto the shared drilling machinery and simulated;
|
||||
the mapping follows the cycle's own <code>Q</code> values, so a <code>Q202</code> peck increment routes to peck drilling
|
||||
and a <code>Q211</code> bottom dwell to dwell drilling.</li>
|
||||
<li>A <code>CYCL DEF</code> body that is not one of those is recognized, not simulated — reported as
|
||||
<code>HeidenhainCycl--Unsupported</code>.</li>
|
||||
<li><strong><code>CYCL CALL</code></strong> and <strong><code>CYCL CALL POS</code></strong> fire the cycle once; <code>M99</code> fires once and <code>M89</code> arms modal
|
||||
firing.</li>
|
||||
<li><strong><code>CALL LBL n</code></strong> inlines the label body up to <code>LBL 0</code>; <strong><code>CALL LBL n REP m</code></strong> repeats that section
|
||||
<code>m</code> times.</li>
|
||||
<li><strong><code>CALL PGM</code></strong> resolves the called program by file name.</li>
|
||||
<li><strong>Mirror image</strong> in both spellings — the klartext <code>CYCL DEF 8</code> form and the DIN/ISO <code>G28</code> form.</li>
|
||||
</ul>
|
||||
<h2 id="diniso-dialect">DIN/ISO dialect</h2>
|
||||
<p>The same preset, with nothing to switch.</p>
|
||||
<ul>
|
||||
<li><code>%</code> tape header and <code>N</code> block numbers.</li>
|
||||
<li><code>T</code> plus <code>M06</code> tool change.</li>
|
||||
<li><strong>Arc centres <code>I</code> / <code>J</code> / <code>K</code> are absolute pole coordinates</strong>, not incremental offsets from the
|
||||
start point. This is the Heidenhain reading, and the pole carries forward modally.</li>
|
||||
<li>The ISO label family — <code>G98 L<n></code> definitions, and the head-anchored <code>L<n>,<m></code> call whose comma
|
||||
count maps onto the repeat count.</li>
|
||||
<li><code>G247 Q339</code> stamps the same datum preset as <code>CYCL DEF 247</code>.</li>
|
||||
<li><code>G54</code> with axis words is read as a datum-shift declaration.</li>
|
||||
<li><code>G70</code> / <code>G71</code> units.</li>
|
||||
</ul>
|
||||
<div class="WARNING">
|
||||
<h5>Warning</h5>
|
||||
<p><strong><code>G28</code> on Heidenhain is MIRROR IMAGE, not a reference-point return.</strong> The Fanuc reading of <code>G28</code>
|
||||
is deliberately absent from the Heidenhain preset. Select the Heidenhain controller for a
|
||||
Heidenhain DIN/ISO file — read as Fanuc, every mirror statement becomes a home move.</p>
|
||||
</div>
|
||||
<h2 id="optimized-output">Optimized output</h2>
|
||||
<p>An optimized program is patched into the source text block by block rather than re-emitted, so it
|
||||
comes back in the dialect it was written in, and two rules keep the result a program a TNC will
|
||||
accept.</p>
|
||||
<p>A feed the optimizer writes into a block that carried none lands after the coordinate words and
|
||||
after <code>DR+</code> / <code>DR-</code> and <code>RL</code> / <code>RR</code> / <code>R0</code>, so the element order the control expects — coordinates,
|
||||
rotation direction, radius compensation, <code>F</code>, <code>M</code> — holds on the patched block: <code>L X+10 Y+20 RL</code>
|
||||
comes back as <code>L X+10 Y+20 RL F500</code>. A block that already states an <code>F</code> keeps that word where it
|
||||
stands, and only its number changes — unless the feed is <code>FMAX</code>, <code>FAUTO</code> or a <code>Q</code> parameter, which
|
||||
patch mode refuses to rewrite: the block is left exactly as written, reporting
|
||||
<code>Writeback-Patch--KeywordValue</code> or <code>Writeback-Patch--VariableValue</code>.</p>
|
||||
<p>The optimizer's embedded source note is written in the klartext comment grammar — a <code>;</code> comment,
|
||||
never a parenthesized one, because a TNC reads parentheses as code:</p>
|
||||
<pre><code>120 L X+35 Y-11.7 R0 F500 ;src(LineNo: 140, StepIndex: 256)
|
||||
</code></pre>
|
||||
<p>Re-interpolation itself is not refused for being klartext. A <code>C … DR±</code> arc splits like any other
|
||||
when the modal <code>CC</code> chain supplies both in-plane centre coordinates: no centre words are rebuilt,
|
||||
and each fragment carries the block's own words with its own endpoint and feed, around the one <code>CC</code>
|
||||
line they all share unchanged. The arc that is optimized whole instead is the one whose modal chain
|
||||
left an in-plane coordinate unstated — no <code>CC</code> ever gave it, so the arc's own start point supplies
|
||||
it, and every fragment would re-derive that centre from its own start. Such pieces are optimized as
|
||||
whole lines under <code>NcOpt--SplitionStartPointCenterUnsupported</code>, raised once per run.</p>
|
||||
<h2 id="not-supported">Not supported</h2>
|
||||
<p><code>TOOL DEF</code>, <code>FK</code> free-contour programming, <code>SL</code> cycles, <code>PATTERN DEF</code>, and <code>TCH PROBE</code>. These are left
|
||||
unconsumed, and the block that carried them reports <code>Parsing--Unconsumed</code> naming the words.</p>
|
||||
<p>Machine-specific M-codes that are not part of the Heidenhain vocabulary above are declared on the
|
||||
machine rather than built in — see the M-code note on
|
||||
<a href="controller-iso.html#m-codes">General NC Code Support</a>.</p>
|
||||
<h2 id="see-also">See Also</h2>
|
||||
<ul>
|
||||
<li><a href="controller-iso.html">General NC Code Support</a> — Fanuc, Syntec, Mazak and Siemens SINUMERIK.</li>
|
||||
<li><a class="xref" href="nc-parsing.html">NC Parsing Engine</a> — the pipeline behind these constructs, the
|
||||
brand-by-brand support matrix in one table, and how a machine's own vocabulary is added without
|
||||
changing HiNC.</li>
|
||||
</ul>
|
||||
|
||||
</article>
|
||||
|
||||
<div class="contribution d-print-none">
|
||||
</div>
|
||||
|
||||
<div class="next-article d-print-none border-top" id="nextArticle"></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>
|
||||
@@ -0,0 +1,547 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>General NC Code Support | HiAPI-C# 2025 </title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="title" content="General NC Code Support | 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="">
|
||||
<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="Technique-GeneralNcCodeSupport">
|
||||
<h1 id="general-nc-code-support">General NC Code Support</h1>
|
||||
|
||||
<p>The vocabulary HiNC interprets is decided by the controller brand selected for the project. This page
|
||||
covers the ISO-family presets — <strong>Fanuc</strong>, <strong>Syntec</strong> and <strong>Mazak</strong> — and <strong>Siemens SINUMERIK</strong>.
|
||||
Heidenhain is a different language and has its own page: <a href="controller-heidenhain.html">Heidenhain Support</a>.</p>
|
||||
<h2 id="how-to-read-this-page">How to read this page</h2>
|
||||
<p>Coverage is stated in three states.</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>State</th>
|
||||
<th>What happens when the construct appears in your program</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><strong>Supported</strong></td>
|
||||
<td>interpreted, and its effect is simulated.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Recognized, not simulated</strong></td>
|
||||
<td>consumed on purpose and reported under its own message id. The block keeps running and the construct's effect does not apply — but it can never be silently misread as something else.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Not supported</strong></td>
|
||||
<td>the words are left over, and the block reports <code>Parsing--Unconsumed</code> naming them.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="TIP">
|
||||
<h5>Tip</h5>
|
||||
<p>The message list a run produces is the coverage report for <strong>your</strong> program. Every word the
|
||||
interpreter could not use is named on the block that carried it, so you never have to infer
|
||||
coverage from the simulated result. An unknown code does not stop the run — it is reported and
|
||||
skipped.</p>
|
||||
</div>
|
||||
<h2 id="iso-core">ISO core</h2>
|
||||
<p>Fanuc, Syntec and Mazak share the vocabulary below. Siemens spells most of it the same way and adds
|
||||
its own for the rest — see <a href="#siemens-sinumerik">Siemens SINUMERIK</a>.</p>
|
||||
<h3 id="motion">Motion</h3>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Code</th>
|
||||
<th>Meaning</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>G00</code></td>
|
||||
<td>Rapid positioning.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>G01</code></td>
|
||||
<td>Linear interpolation at the programmed feedrate.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>G02</code> / <code>G03</code></td>
|
||||
<td>Circular interpolation, clockwise / counter-clockwise. The centre may be given as <code>I</code> / <code>J</code> / <code>K</code> offsets or as a radius <code>R</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>G04</code></td>
|
||||
<td>Dwell. <code>X</code> / <code>U</code> are seconds, <code>P</code> is milliseconds, <code>S</code> is spindle revolutions. Both the <code>G4</code> and <code>G04</code> spellings are read.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>G28</code></td>
|
||||
<td>Reference-point (home) return through an intermediate point.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>G53</code></td>
|
||||
<td>One-shot machine-coordinate move — work offsets are bypassed for that block only.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3 id="plane-units-and-positioning-mode">Plane, units and positioning mode</h3>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Code</th>
|
||||
<th>Meaning</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>G17</code> / <code>G18</code> / <code>G19</code></td>
|
||||
<td>Plane selection — XY / ZX / YZ. Arcs and canned cycles follow the active plane.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>G21</code></td>
|
||||
<td>Metric. This is the HiNC default.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>G71</code></td>
|
||||
<td>Metric — the RS-274-D / Fanuc G-code system C / Syntec spelling of <code>G21</code>, accepted the same way on the Fanuc and Syntec presets. Mazak EIA stays <code>G20</code> / <code>G21</code> only.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>G20</code></td>
|
||||
<td>Inch — <strong>not supported</strong>. The block reports <code>Unit--InchNotSupported</code>; post the program in metric.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>G70</code></td>
|
||||
<td>Inch — the RS-274-D / Fanuc G-code system C / Syntec spelling of <code>G20</code>, read on the Fanuc and Syntec presets. <strong>Not supported</strong>; the block reports <code>Unit--InchNotSupported</code>; post the program in metric.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>G90</code> / <code>G91</code></td>
|
||||
<td>Absolute / incremental positioning.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>G94</code> / <code>G95</code></td>
|
||||
<td>Feed per minute / feed per revolution.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3 id="work-coordinates">Work coordinates</h3>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Code</th>
|
||||
<th>Meaning</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>G54</code>–<code>G59</code></td>
|
||||
<td>Standard work coordinate systems.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>G59.1</code>–<code>G59.9</code></td>
|
||||
<td>Extended work coordinate systems, backed by the brand-neutral table the Fanuc, Mazak and Syntec presets carry behind their brand table. Like <code>G54</code>–<code>G59</code>, a row left at zero is read as an authoring convention and stays silent.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>G54.1 P1</code>–<code>P48</code></td>
|
||||
<td>Fanuc additional work coordinate systems, backed by the extended work offset table. Also read in the manual's second spelling <code>G54 P1</code>–<code>P48</code>, with or without the space; a <code>G54</code> with no P word is the plain G54 above. A selected row nobody has entered reports <code>Coord-WorkOffset--AdditionalZero</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>G52</code></td>
|
||||
<td>Local coordinate offset, applied on top of the active work coordinate system.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3 id="tool-compensation">Tool compensation</h3>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Code</th>
|
||||
<th>Meaning</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>G43</code> / <code>G44</code> / <code>G49</code></td>
|
||||
<td>Tool length compensation, positive / negative / cancel. <code>H</code> selects the offset row.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>G41</code> / <code>G42</code> / <code>G40</code></td>
|
||||
<td>Cutter radius compensation, left / right / cancel. <code>D</code> selects the offset row.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Radius compensation is resolved against the blocks that actually travel in the compensation plane. A
|
||||
block whose own words command no movement in that plane — a bare <code>G41</code> / <code>G42</code>, a comment, an empty
|
||||
line, a Z-only plunge — takes no offset of its own and no part in a corner:</p>
|
||||
<ul>
|
||||
<li><strong>Start-up waits for motion.</strong> A <code>G41</code> or <code>G42</code> block that does not move in the plane does not
|
||||
start the offset; the first block that travels in the plane is the start-up block and takes the
|
||||
perpendicular (type A) offset. The blocks between them carry the previous block's offset vector,
|
||||
so nothing moves on their account.</li>
|
||||
<li><strong>Corners are resolved between travelling blocks.</strong> Wordless blocks sitting between two moves are
|
||||
passed over, and the corner is the intersection of the two real segments. Running axes are the
|
||||
in-plane part of each displacement, so a ramping move keeps its full offset and a Z-only plunge
|
||||
stays on the offset line.</li>
|
||||
<li><strong>A bare <code>G40</code> closes the region.</strong> The last compensated block ends on its own perpendicular
|
||||
offset rather than turning toward the first uncompensated move after the cancel. A <code>G40</code> that
|
||||
carries motion is the last corner's partner instead, and the compensated path meets the cancel
|
||||
line at their intersection (Fanuc type B); the legacy interpreter
|
||||
(<a class="xref" href="../../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_EnableSoftNcRunner">EnableSoftNcRunner</a> set <code>false</code>) ends that case
|
||||
perpendicular.</li>
|
||||
</ul>
|
||||
<h3 id="rotation-tilted-planes-and-five-axis">Rotation, tilted planes and five-axis</h3>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Code</th>
|
||||
<th>Meaning</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>G68</code></td>
|
||||
<td>Coordinate rotation in the active plane, around a centre point by angle <code>R</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>G68.2</code></td>
|
||||
<td>Tilted work plane — Euler angles <code>I</code> / <code>J</code> / <code>K</code> with origin <code>X</code> / <code>Y</code> / <code>Z</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>G69</code></td>
|
||||
<td>Cancels <code>G68</code> and <code>G68.2</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>G53.1</code></td>
|
||||
<td>Tool-axis direction — swings the rotary axes into line with the active <code>G68.2</code> plane.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>G43.4</code></td>
|
||||
<td>RTCP / tool centre point management. The Siemens equivalent is <code>TRAORI</code>, the Heidenhain equivalent <code>M128</code>.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3 id="canned-cycles">Canned cycles</h3>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Code</th>
|
||||
<th>Cycle</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>G73</code></td>
|
||||
<td>High-speed peck drilling — <code>Q</code> increments with a partial retract.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>G74</code></td>
|
||||
<td>Left-hand tapping.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>G76</code></td>
|
||||
<td>Fine boring — oriented spindle stop, <code>Q</code> shift, rapid out.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>G81</code></td>
|
||||
<td>Drilling.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>G82</code></td>
|
||||
<td>Drilling with a dwell at the bottom.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>G83</code></td>
|
||||
<td>Peck drilling — <code>Q</code> increments with a full retract to the <code>R</code> point.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>G84</code></td>
|
||||
<td>Right-hand tapping.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>G85</code></td>
|
||||
<td>Boring, feed out.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>G86</code></td>
|
||||
<td>Boring, spindle stop then rapid out.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>G87</code></td>
|
||||
<td>Back boring.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>G89</code></td>
|
||||
<td>Boring with a dwell at the bottom.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>G80</code></td>
|
||||
<td>Cancel.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>G98</code> / <code>G99</code></td>
|
||||
<td>Retract to the initial level / to the <code>R</code> level.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>A cycle is expanded into the individual strokes it performs — approach, peck, dwell, retract — each
|
||||
with its own feedrate, so material removal and cycle time come out of the real motion rather than an
|
||||
approximation. Modal repetition and <code>G91</code> incremental cycle data are resolved before the strokes are
|
||||
built.</p>
|
||||
<h3 id="polar-interpolation">Polar interpolation</h3>
|
||||
<p><code>G12.1</code> turns polar coordinate interpolation on and <code>G13.1</code> turns it off. Inside a polar section the
|
||||
<code>X</code> word is a <strong>diameter</strong> and the <code>C</code> word is a hypothetical Cartesian axis in millimetres, not
|
||||
rotary degrees. HiNC halves <code>X</code>, resolves <code>G90</code> / <code>G91</code>, writes both the polar and the derived
|
||||
Cartesian positions along with the machine C angle, and simulates polar linear and polar arc motion —
|
||||
the arc as real spiral geometry that stays continuous across ±180°. <code>G41</code> / <code>G42</code> compensation is
|
||||
resolved on the hypothetical plane, and <code>YA</code> / <code>ZB</code> axis pairs work the same way. G codes that
|
||||
conflict with polar mode are checked before the mode is entered.</p>
|
||||
<h3 id="path-smoothing">Path smoothing</h3>
|
||||
<p><code>G05.1 Q1</code> enables high-precision contour control (AICC / Nano Smoothing) and <code>Q0</code> disables it. The
|
||||
optional <code>R</code> precision level is preserved.</p>
|
||||
<p><strong>Bare <code>G05</code> (or <code>G5</code>) is a different feature under a confusingly similar name</strong>, and the two are
|
||||
tracked separately so they cannot cancel one another. It selects a function through its <code>P</code> word, on
|
||||
the Fanuc, Syntec and Mazak presets:</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><code>P</code></th>
|
||||
<th>Reading</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>P10000</code></td>
|
||||
<td>HPCC — RISC-based high-precision contour control. Recognized, deliberately not simulated: it changes the machine's look-ahead, acceleration and servo behaviour, never the programmed coordinates. Reports <code>Hpcc--NoOp</code>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>P0</code></td>
|
||||
<td>Cancels HPCC. Consumed silently — cancelling a no-op needs no message.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>P10001</code>–<code>P10999</code></td>
|
||||
<td>High-speed cycle machining. The real machine executes cycle data pre-registered in its variable area, which is <strong>actual axis motion HiNC cannot see</strong>, so the simulated result misses that machining. Reports <code>Hpcc--HighSpeedCycleIgnored</code> as a warning.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>anything else, or no <code>P</code> at all</td>
|
||||
<td>Not supported offline and ignored, reported as <code>Hpcc--UnsupportedFunction</code>. Small <code>P</code> values select the high-speed remote buffer modes.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>An unevaluated macro variable or expression in <code>P</code> is tolerated — it reports
|
||||
<code>Hpcc--UnsupportedFunction</code> rather than failing the block.</p>
|
||||
<h3 id="m-codes">M codes</h3>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Code</th>
|
||||
<th>Meaning</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><code>M00</code> / <code>M01</code></td>
|
||||
<td>Program stop / optional stop.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>M02</code> / <code>M30</code></td>
|
||||
<td>Program end.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>M03</code> / <code>M04</code> / <code>M05</code></td>
|
||||
<td>Spindle clockwise / counter-clockwise / stop.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>M06</code></td>
|
||||
<td>Tool change. The axis travel the change requires is synthesized rather than teleported.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>M07</code> / <code>M08</code> / <code>M09</code></td>
|
||||
<td>Mist coolant on / flood coolant on / coolant off.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>M98</code> / <code>M99</code></td>
|
||||
<td>Subprogram call (<code>M98 P{program} L{repeat}</code>) and return, including <code>M99 P{sequence}</code> early return.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>M198</code></td>
|
||||
<td>Subprogram call from external storage — same shape as <code>M98</code>, different lookup folder.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><strong>Composite and OEM M-codes are not built in — they are declared on the machine.</strong> An <code>M13</code> that
|
||||
means “spindle CW plus flood coolant”, an M-code that triggers a tool change, or turret <code>T</code>-word
|
||||
semantics are stated once in the machine's own M-code table and expanded into the ISO effects the
|
||||
rest of the pipeline already understands. A code declared with no modelled effect is voiced once as
|
||||
<code>DeclaredMCode--UnmodeledEffects</code> instead of raising an unknown-code warning on every occurrence.</p>
|
||||
</div>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p>If a program states a spindle speed greater than zero but never issues a direction, HiNC assumes
|
||||
clockwise and reports <code>SpindleDirection--AssumedCw</code>. Without that assumption the cutting-force
|
||||
model would silently produce zero mechanics for the whole file.</p>
|
||||
</div>
|
||||
<h2 id="fanuc">Fanuc</h2>
|
||||
<p>Everything in the ISO core, plus:</p>
|
||||
<p><strong>Custom Macro B.</strong> <code>#</code> variable assignment and arithmetic, with each range routed to the store it
|
||||
belongs to — <code>#1</code>–<code>#33</code> local to the macro frame, <code>#100</code>–<code>#499</code> volatile and cleared on <code>M02</code> /
|
||||
<code>M30</code>, <code>#500</code>–<code>#999</code> retained and saved with the project, <code>#3000</code>–<code>#3999</code> system control. Boolean and
|
||||
logical operators, <code>IF [..] GOTO n</code>, <code>IF [..] THEN <statement></code>, and <code>WHILE [..] DO m</code> / <code>END m</code> with
|
||||
a bounded-loop watchdog. Position and tool-offset system variables read back into expressions.</p>
|
||||
<p><strong>Macro and subprogram calls.</strong> <code>G65</code> one-shot macro call, binding arguments <code>A</code>–<code>Z</code> onto <code>#1</code>–<code>#26</code>;
|
||||
<code>G66</code> / <code>G67</code> modal macro, firing at every positioning block until cancelled; <code>M98</code> / <code>M198</code> / <code>M99</code>.
|
||||
A callee's blocks are spliced into the program at the call site, so the rest of the run treats them
|
||||
exactly as if they had been written in the main file.</p>
|
||||
<p><strong>Not supported.</strong> <code>G10</code> programmable data setting, <code>G50</code> spindle speed clamp, <code>G31</code> skip.</p>
|
||||
<h2 id="syntec">Syntec</h2>
|
||||
<p>Syntec runs the ISO core plus the Fanuc-family macro and subprogram vocabulary and polar
|
||||
interpolation.</p>
|
||||
<p><strong>Not supported.</strong> Custom <code>G</code> macros defined on the controller, <code>Pr</code> parameter mapping, and
|
||||
twin-head / twin-turret program syntax.</p>
|
||||
<h2 id="mazak">Mazak</h2>
|
||||
<p>Mazak reads EIA/ISO with the Fanuc-family macro and subprogram vocabulary and polar interpolation.</p>
|
||||
<p><strong>Not supported.</strong> MAZATROL conversational sections, and switching between MAZATROL and EIA/ISO
|
||||
inside one program. Export the EIA/ISO program from the controller.</p>
|
||||
<h2 id="siemens-sinumerik">Siemens SINUMERIK</h2>
|
||||
<p>Real <code>.mpf</code> / <code>.spf</code> programs replay end to end — this is not an ISO subset with a Siemens label on
|
||||
it.</p>
|
||||
<p><strong>Modal vocabulary.</strong> <code>SUPA</code> / <code>G153</code> suppress all frames for one block; <code>G70</code> / <code>G71</code> units; the
|
||||
path-smoothing family (<code>G60x</code> / <code>G64x</code>, <code>FNORM</code> / <code>SOFT</code> / <code>FFWON</code> / <code>COMP*</code> / <code>UPATH</code>, <code>CYCLE832</code>);
|
||||
<code>MSG()</code> and <code>STOPRE</code>; <code>CR=</code> and <code>TURN=</code> arcs. Tail comments are quote-aware, so a <code>;</code> inside
|
||||
<code>MSG("A;B")</code> does not truncate the block. <code>G74</code> / <code>G75</code> fixed-point return is claimed as a whole
|
||||
block, so the dummy axis values it carries never mint a rapid to those coordinates and its <code>F</code> never
|
||||
reaches the modal feedrate.</p>
|
||||
<p><strong>Tools.</strong> <code>T="NAME"</code> string tool calls with <code>D</code> cutting-edge offsets, resolved through the <code>$TC_DP</code>
|
||||
tool table — lengths and radius plus additive wear.</p>
|
||||
<p><strong>Variables and expressions.</strong> R parameters <code>R0</code>–<code>R999</code> are held as per-project data, <code>DEF REAL</code> /
|
||||
<code>DEF INT</code> declarations lower into assignments, and a full expression evaluator means <code>Z=R63+150</code> and
|
||||
<code>X=SIN(R10)*20</code> drive real motion. <code>$P_UIFR[n,axis,TR]</code> binds both ways to the frame table. Any other
|
||||
<code>$</code> variable is recorded with an unsupported note rather than silently dropped.</p>
|
||||
<p><strong>Frames and five-axis.</strong> <code>TRANS</code> / <code>ATRANS</code> / <code>ROT</code> / <code>AROT</code> (with <code>RPL=</code>) compose into the tilt
|
||||
chain in Sinumerik RPY order; <code>TRAORI</code> is a real RTCP mode, the sibling of ISO <code>G43.4</code>, with
|
||||
<code>TRAFOOF</code> handing the offset back; <code>CYCLE800</code> is decoded from its MODE bits across all four swivel
|
||||
modes.</p>
|
||||
<p><strong>Calls and control flow.</strong> <code>L</code>-prefixed and named subprogram calls, inlined with their <code>P</code> repetition
|
||||
count; <code>M17</code> / <code>RET</code>; <code>REPEAT</code> over a labelled slice; <code>MCALL CYCLE81</code> / <code>82</code> / <code>83</code> / <code>85</code> mapped onto
|
||||
the shared canned-cycle machinery; <code>PROC</code> headers and labels. <code>GOTOF</code> / <code>GOTOB</code>, <code>IF</code> / <code>ELSE</code> /
|
||||
<code>ENDIF</code>, and <code>WHILE</code> / <code>FOR</code> / <code>REPEAT-UNTIL</code> / <code>LOOP</code>. Jumps and loop iterations are capped rather
|
||||
than hanging the session — over the cap the construct warns and falls through.</p>
|
||||
<p><strong>Per-word coordinate functions.</strong> <code>AC()</code> / <code>IC()</code> / <code>DC()</code> / <code>ACP()</code> / <code>ACN()</code>, including on <code>I</code> /
|
||||
<code>J</code> / <code>K</code> circle centres, so <code>G90 C=IC(360/17)</code> is one incremental index inside an absolute program.
|
||||
<code>ACP()</code> takes the forward window, <code>ACN()</code> the backward one, and <code>DC()</code> the shortest swing.</p>
|
||||
<p><strong>Coded positions.</strong> <code>CAC</code> / <code>CIC</code> / <code>CDC</code> / <code>CACP</code> / <code>CACN</code> take a 1-based indexing position number
|
||||
instead of a coordinate, resolved against the machine's own indexing-position tables.</p>
|
||||
<p><strong>OEM auxiliary M-codes.</strong> The preset declares <code>M12</code> / <code>M13</code> / <code>M22</code> / <code>M23</code> and <code>M330</code> / <code>M331</code> as
|
||||
note-only, so each occurrence voices <code>DeclaredMCode--UnmodeledEffects</code> rather than an unknown-code
|
||||
warning. A machine's own table overrides the declaration once the real effects are known.</p>
|
||||
<p><strong>Recognized, not simulated.</strong> <code>ROTS</code> / <code>AROTS</code>, <code>SCALE</code> / <code>ASCALE</code>, and <code>MIRROR</code> / <code>AMIRROR</code> — each
|
||||
reported as <code>SiemensFrame--Unsupported</code>.</p>
|
||||
<p><strong>Not supported.</strong> <code>SETAL</code>.</p>
|
||||
<h2 id="see-also">See Also</h2>
|
||||
<ul>
|
||||
<li><a href="controller-heidenhain.html">Heidenhain Support</a> — klartext and Heidenhain DIN/ISO.</li>
|
||||
<li><a class="xref" href="nc-parsing.html">NC Parsing Engine</a> — the pipeline behind these codes, the
|
||||
brand-by-brand support matrix in one table, and how a machine's own vocabulary is added without
|
||||
changing HiNC.</li>
|
||||
</ul>
|
||||
|
||||
</article>
|
||||
|
||||
<div class="contribution d-print-none">
|
||||
</div>
|
||||
|
||||
<div class="next-article d-print-none border-top" id="nextArticle"></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>
|
||||
@@ -0,0 +1,132 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>NC Dialects | HiAPI-C# 2025 </title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="title" content="NC Dialects | 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="">
|
||||
<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="">
|
||||
<h1 id="nc-dialects">NC Dialects</h1>
|
||||
|
||||
<p>How a controller program becomes motion. A machine's NC is not one language but a family of
|
||||
dialects that disagree about almost everything except the axis letters, so HiNC parses a program
|
||||
against the brand it was written for and reports what it could not honour rather than guessing.</p>
|
||||
<p>Ordered from the engine that reads every dialect to the two reader-facing pages that say what each
|
||||
brand's vocabulary actually does.</p>
|
||||
<ul>
|
||||
<li><a href="nc-parsing.html">NC Parsing Engine</a> — The interpreter pipeline, the brand-by-brand support matrix, and how a machine's own vocabulary is added without changing HiNC</li>
|
||||
<li><a href="controller-iso.html">ISO / General NC</a> — What Fanuc, Syntec, Mazak and Siemens SINUMERIK code HiNC honours, recognises without acting on, or refuses</li>
|
||||
<li><a href="controller-heidenhain.html">Heidenhain</a> — Klartext and Heidenhain DIN/ISO: the block format, Q parameters, tilted planes and the cycles that are read</li>
|
||||
</ul>
|
||||
<h2 id="see-also">See Also</h2>
|
||||
<ul>
|
||||
<li><a href="../nc-optimization/index.html">NC Optimization</a> — what rewrites the program this engine reads</li>
|
||||
<li><a href="../../manual/setup/index.html">Setup</a> — the setup tasks these dialects are configured from</li>
|
||||
<li><a href="../../manual/setup/program-zero-alignment.html">Program Zero Alignment</a> — the setup task that decides which work offset the code in these pages resolves against</li>
|
||||
<li><a href="../../manual/setup/controller.html">Controller</a> — picking the brand a project reads its programs with, and the tables that brand grows</li>
|
||||
</ul>
|
||||
|
||||
</article>
|
||||
|
||||
<div class="contribution d-print-none">
|
||||
</div>
|
||||
|
||||
<div class="next-article d-print-none border-top" id="nextArticle"></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>
|
||||
@@ -0,0 +1,490 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>NC Parsing Engine | HiAPI-C# 2025 </title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="title" content="NC Parsing Engine | 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="">
|
||||
<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="Fundamentals-NcParsingEngine">
|
||||
<h1 id="nc-parsing-engine">NC Parsing Engine</h1>
|
||||
|
||||
<p><a class="xref" href="../../api/Hi.NcParsers.SoftNcRunner.html">SoftNcRunner</a> is the NC interpreter. It reads a controller program — Fanuc,
|
||||
Siemens, Syntec, Mazak or Heidenhain G-code, an NX cutter-location file, or a CSV controller
|
||||
recording — and turns it into the machine actions the simulation executes.</p>
|
||||
<p>It is a <strong>composed</strong> interpreter rather than a fixed one. The segmenter, the initializers, the
|
||||
syntax stages, the semantics and the dependency data are five ordered lists on the runner object,
|
||||
all of them serializable. Adding support for a G-code means adding one syntax unit and one line to a
|
||||
list; removing support means removing that line. Nothing about a brand is compiled into a central
|
||||
class.</p>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p><code>SoftNcRunner</code> is the default NC pipeline as of 3.2
|
||||
(<a class="xref" href="../../api/Hi.MachiningProcs.LocalProjectService.html#Hi_MachiningProcs_LocalProjectService_EnableSoftNcRunner">EnableSoftNcRunner</a> defaults to <code>true</code>).
|
||||
<a class="xref" href="../../api/Hi.Numerical.FilePlayers.HardNcRunner.html">HardNcRunner</a> remains reachable as the opt-out fallback for the
|
||||
shrinking set of features still bound to it.</p>
|
||||
</div>
|
||||
<h2 id="the-pipeline">The pipeline</h2>
|
||||
<p>A program becomes actions in five ordered stages. Each shipped preset expresses them as five
|
||||
<a class="xref" href="../../api/Hi.NcParsers.Syntaxs.BundleSyntax.html">BundleSyntax</a> containers named <code>Parsing</code>, <code>Evaluation</code>, <code>Logic</code>,
|
||||
<code>PostLogic</code> and <code>Inspection</code>.</p>
|
||||
<pre><code class="lang-mermaid">graph TD
|
||||
A[NC raw lines] --> SEG[ISegmenter]
|
||||
SEG --> SENT[Sentence stream]
|
||||
SENT --> INIT[INcInitializer]
|
||||
INIT --> P[Parsing<br/>text to structure]
|
||||
P --> E[Evaluation<br/>variables, expressions,<br/>calls, control flow]
|
||||
E --> L[Logic<br/>modal state, coordinates,<br/>compensation, motion]
|
||||
L --> PL[PostLogic<br/>modal carry]
|
||||
PL --> I[Inspection<br/>backfill, unconsumed check,<br/>snapshot]
|
||||
I --> SEM[INcSemantic]
|
||||
SEM --> OUT[Machine actions]
|
||||
|
||||
DEP[INcDependency list<br/>brand tables, coordinate systems,<br/>tool offsets, kinematics, ...]
|
||||
DEP -. injected .-> P
|
||||
DEP -. injected .-> E
|
||||
DEP -. injected .-> L
|
||||
DEP -. injected .-> SEM
|
||||
</code></pre>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Stage</th>
|
||||
<th>Responsibility</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a class="xref" href="../../api/Hi.NcParsers.Segmenters.ISegmenter.html">ISegmenter</a></td>
|
||||
<td>cuts the raw text into blocks. Three implementations ship — one line per block, and the two multi-line forms Heidenhain and Siemens programs need</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="xref" href="../../api/Hi.NcParsers.Initializers.INcInitializer.html">INcInitializer</a></td>
|
||||
<td>seeds the stream head with the machine's starting state, for example the configured home position</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Parsing</strong></td>
|
||||
<td>recognizes the text: words, statements, cycle bodies, comments. Writes structure, never meaning</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Evaluation</strong></td>
|
||||
<td>resolves anything the block computes for itself — variable reads and writes, arithmetic, conditional jumps, loops, and subprogram or macro calls, whose bodies are spliced into the stream so later stages walk them as if they had always been in the host file</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Logic</strong></td>
|
||||
<td>the modal machine model: units, positioning mode, plane, feed, spindle, coolant, tool change and compensation, work offsets, tilt and RTCP, and the program-to-machine coordinate chain</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>PostLogic</strong></td>
|
||||
<td>carries the block's full modal context forward, so every block's data is self-contained</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Inspection</strong></td>
|
||||
<td>back-fills derived values, reports words nothing consumed, and optionally snapshots the block</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="xref" href="../../api/Hi.NcParsers.Semantics.INcSemantic.html">INcSemantic</a></td>
|
||||
<td>turns the finished block into machine actions — linear and arc motion, teleports, tool change, spindle, dwell, stroke-limit checks</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Over 150 syntax units ship across those five stages, plus the per-brand lists that select and order
|
||||
them.</p>
|
||||
<p>Most syntax units implement <a class="xref" href="../../api/Hi.NcParsers.Syntaxs.ISituNcSyntax.html">ISituNcSyntax</a> — they mutate the block in
|
||||
place. <a class="xref" href="../../api/Hi.NcParsers.Syntaxs.IExpandingNcSyntax.html">IExpandingNcSyntax</a> exists for a unit that must turn one block into
|
||||
several. Note that the shipped call and repeat syntaxes are <em>not</em> expanders: they splice the callee's
|
||||
already-segmented blocks into the stream ahead of the current position, which keeps one block's
|
||||
identity intact through the rest of the pipeline.</p>
|
||||
<h2 id="composition-and-presets">Composition and presets</h2>
|
||||
<p>The runner is a container; its five lists are what make it a Fanuc runner or a Heidenhain one.</p>
|
||||
<pre><code class="lang-xml"><SoftNcRunner>
|
||||
<PipelineNcDependencyList>...</PipelineNcDependencyList>
|
||||
<Segmenter>...</Segmenter>
|
||||
<NcInitializationList>...</NcInitializationList>
|
||||
<NcSyntaxList>...</NcSyntaxList>
|
||||
<NcSemanticList>...</NcSemanticList>
|
||||
</SoftNcRunner>
|
||||
</code></pre>
|
||||
<p>Every unit implements <a class="xref" href="../../api/Hi.Common.XmlUtils.IMakeXmlSource.html">IMakeXmlSource</a> and registers itself with
|
||||
<a class="xref" href="../../api/Hi.Common.XmlUtils.XFactory.html">XFactory</a>, so the whole pipeline round-trips through XML. Seven presets are
|
||||
built in:</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Preset</th>
|
||||
<th>Reads</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a class="xref" href="../../api/Hi.NcParsers.SoftNcRunner.html#Hi_NcParsers_SoftNcRunner_FanucNcRunner">FanucNcRunner</a></td>
|
||||
<td>Fanuc G-code, including Custom Macro B</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="xref" href="../../api/Hi.NcParsers.SoftNcRunner.html#Hi_NcParsers_SoftNcRunner_SiemensNcRunner">SiemensNcRunner</a></td>
|
||||
<td>Sinumerik <code>.mpf</code> / <code>.spf</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="xref" href="../../api/Hi.NcParsers.SoftNcRunner.html#Hi_NcParsers_SoftNcRunner_SyntecNcRunner">SyntecNcRunner</a></td>
|
||||
<td>Syntec G-code</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="xref" href="../../api/Hi.NcParsers.SoftNcRunner.html#Hi_NcParsers_SoftNcRunner_MazakNcRunner">MazakNcRunner</a></td>
|
||||
<td>Mazak EIA/ISO</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="xref" href="../../api/Hi.NcParsers.SoftNcRunner.html#Hi_NcParsers_SoftNcRunner_HeidenhainNcRunner">HeidenhainNcRunner</a></td>
|
||||
<td>klartext <strong>and</strong> DIN/ISO, on one preset</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="xref" href="../../api/Hi.Numerical.CsvParsers.GeneralCsvRunner.html">GeneralCsvRunner</a></td>
|
||||
<td>a CSV controller recording</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="xref" href="../../api/Hi.Numerical.ClsfParsers.NxClRunner.html">NxClRunner</a></td>
|
||||
<td>NX CLSF / APT-source cutter-location files</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>The five brand presets also ship as standalone files under <code>Resource/Controller/</code> with the
|
||||
<code>.Controller</code> extension, written by <a class="xref" href="../../api/Hi.NcParsers.ControllerPresetWriter.html">ControllerPresetWriter</a>, so the load browser
|
||||
starts populated. Those files are regenerable snapshots — the static properties above are the source
|
||||
of truth, and the files are rewritten whenever a brand pipeline changes.</p>
|
||||
<div class="IMPORTANT">
|
||||
<h5>Important</h5>
|
||||
<p>Reading a preset file back requires the pipeline types to be registered first
|
||||
(<a class="xref" href="../../api/Hi.NcParsers.SoftNcRunner.html#Hi_NcParsers_SoftNcRunner_Reg_">Reg</a> through
|
||||
<a class="xref" href="../../api/Hi.MachiningProcs.LocalProjectService.html#Hi_MachiningProcs_LocalProjectService_Reg_">Reg</a> at startup). The loader <strong>drops unregistered
|
||||
entries silently</strong> rather than failing the load, so an unregistered process reads a hollow
|
||||
pipeline that parses nothing.</p>
|
||||
<p>A runner rehydrated from an older saved file keeps the syntax list it was saved with — nothing
|
||||
re-derives a brand's syntax list at read time. To pick up new brand syntaxes, take the current
|
||||
preset or a fresh <a class="xref" href="../../api/Hi.NcParsers.NcRunnerSuit.html">NcRunnerSuit</a> built from it. Missing <em>system-wired</em>
|
||||
dependencies are back-filled automatically on load; syntaxes are not.</p>
|
||||
</div>
|
||||
<h2 id="the-dataflow">The dataflow</h2>
|
||||
<p>Each block travels the pipeline as a <a class="xref" href="../../api/Hi.NcParsers.Syntaxs.SyntaxPiece.html">SyntaxPiece</a> carrying a JSON object.
|
||||
Every stage reads some keys, writes some keys, and removes the keys it has consumed. The convention
|
||||
is <strong>section plus term</strong>: the section key is a semantic name that is the same across brands
|
||||
(<code>Unit</code>, <code>Feedrate</code>, <code>Motion</code>, <code>CoordinateOffset</code>), while the controller's actual keyword lives in
|
||||
the section's <code>Term</code> field so the correspondence with the source text is never lost.</p>
|
||||
<p>A Fanuc block <code>N162 X-14.696 Y-6.42 Z45.638</code>, after the pipeline (matrices elided):</p>
|
||||
<pre><code class="lang-json">{
|
||||
"IndexNote": {"Symbol":"N","Number":162},
|
||||
"Positioning": {"Term":"G90","Mode":"Absolute"},
|
||||
"Unit": {"Term":"G21","System":"Metric"},
|
||||
"PlaneSelect": {"Term":"G17","Plane":"XY"},
|
||||
"Feedrate": {"FeedrateValue":400,"Term":"G94","Unit":"mm/min"},
|
||||
"SpindleSpeed": {"SpindleSpeed_rpm":20000,"Direction":"CW"},
|
||||
"Coolant": {"IsOn":true,"Mode":"Flood"},
|
||||
"ToolChange": {"ToolId":4,"IsChange":false},
|
||||
"TiltTransform": {"Term":"G68.2"},
|
||||
"ProgramToMcTransform": [
|
||||
{"Source":"TiltTransform", "Mat4d":[ ... ]},
|
||||
{"Source":"ToolHeightCompensation", "Mat4d":[ ... ]},
|
||||
{"Source":"CoordinateOffset", "Mat4d":[ ... ]},
|
||||
{"Source":"PivotTransform", "Mat4d":[ ... ]}
|
||||
],
|
||||
"ToolHeightCompensation": {"Offset_mm":16,"Term":"G43","OffsetId":4},
|
||||
"CoordinateOffset": {"CoordinateId":"G54","Offset_X":72.4,"Offset_Y":-72.4,"Offset_Z":-116.44},
|
||||
"ProgramXyz": {"X":-14.696,"Y":-6.42,"Z":45.638},
|
||||
"MachineCoordinateState": {"X":140.5947,"Y":-78.8200,"Z":-124.4559},
|
||||
"MotionState": {"Term":"G01"},
|
||||
"MotionEvent": {"Form":"McLinear","IsRapid":false},
|
||||
"RadiusCompensation": {"Term":"G40","OffsetId":0,"Radius_mm":0}
|
||||
}
|
||||
</code></pre>
|
||||
<p>Three things are worth reading off that block.</p>
|
||||
<p><strong>Program and machine coordinates are both present.</strong> The source states program coordinates; the
|
||||
pipeline keeps them and adds the solved machine coordinates, so a report or a UI can use either.</p>
|
||||
<p><strong><code>ProgramToMcTransform</code> flattens the cause chain.</strong> The program-to-machine mapping is not one
|
||||
opaque matrix but the ordered list of contributions that built it — tilt, tool height, work offset,
|
||||
pivot — each with its own matrix. When a machine coordinate is not what you expected, this array
|
||||
names which compensation is responsible without re-running anything.</p>
|
||||
<p><strong>Modal state is complete on every block</strong>, even where the source line states none of it, because
|
||||
PostLogic carries the previous block's sections forward. A section the pipeline synthesized rather
|
||||
than read from the source carries an <code>AddedBy</code> marker (<code>ModalCarry</code> or <code>Backfill</code>), so a reader can
|
||||
tell authored data from carried data — see <a class="xref" href="../../api/Hi.NcParsers.Syntaxs.SyntaxStageKeys.html">SyntaxStageKeys</a>.</p>
|
||||
<h3 id="retention-and-the-freeze">Retention and the freeze</h3>
|
||||
<p>A session retains every executed block for its lifetime, and the live JSON graph costs about 12 KB
|
||||
per line against about 1.6 KB for its compact UTF-8 form — which is what made multi-million-line
|
||||
programs exhaust a client machine. Once a block leaves the executing window its piece is <strong>frozen</strong>:
|
||||
the graph is replaced by those bytes (<a class="xref" href="../../api/Hi.NcParsers.Syntaxs.SyntaxPiece.html#Hi_NcParsers_Syntaxs_SyntaxPiece_Freeze_">Freeze</a>,
|
||||
<a class="xref" href="../../api/Hi.NcParsers.Syntaxs.SyntaxPiece.html#Hi_NcParsers_Syntaxs_SyntaxPiece_IsFrozen">IsFrozen</a>). On a 25,000-line play that takes session retention
|
||||
from 406 MB to 142 MB. The switch is
|
||||
<a class="xref" href="../../api/Hi.MachiningProcs.NcRunnerSessionState.html#Hi_MachiningProcs_NcRunnerSessionState_FreezeExecutedPieces">FreezeExecutedPieces</a>, on by default.</p>
|
||||
<p>Downstream readers are unaffected — the <code>JsonObject</code> getter re-parses on demand and the encoding is
|
||||
byte-identical to the live form — but the object it returns is a <strong>fresh read-only snapshot per
|
||||
call</strong>, with no caching and no write-back. Two reads are not reference-equal, a mutation lands on a
|
||||
throwaway copy, and code that reads the same piece repeatedly should hold the snapshot in a local. To
|
||||
inspect the dataflow, snapshot it <em>in</em> the pipeline with the <code>SnapshotSyntax</code> entry each bundle
|
||||
carries (disabled by default) rather than holding pieces and poking them afterwards.</p>
|
||||
<p>Type discrimination is slightly looser after a round trip, because JSON has fewer types than the live
|
||||
graph: <code>NaN</code> and <code>±Infinity</code> serialize as quoted strings and thaw as string nodes, and <code>5.0</code> freezes
|
||||
as <code>5</code>, so an integer read of it succeeds where it previously would not.
|
||||
<a class="xref" href="../../api/Hi.Common.JsonUtil.html#Hi_Common_JsonUtil_GetDouble_">GetDouble</a> maps the quoted non-finite spellings back to their <code>double</code>
|
||||
constants, so read numbers through it rather than through a raw node cast.</p>
|
||||
<h2 id="dependencies">Dependencies</h2>
|
||||
<p>Machine and case data reach the syntaxes as a list of <a class="xref" href="../../api/Hi.NcParsers.Dependencys.INcDependency.html">INcDependency</a>
|
||||
objects rather than as fields on a shared configuration object. A syntax declares what it needs by
|
||||
interface and pulls it:</p>
|
||||
<pre><code class="lang-csharp">// A syntax that needs the machine's home position asks for the interface, not for a class.
|
||||
var homeConfig = ncDependencyList.OfType<IHomeMcConfig>().FirstOrDefault();
|
||||
</code></pre>
|
||||
<p>Adding a brand means adding a table that implements the interfaces its syntaxes ask for — the brand
|
||||
parameter tables derive from <a class="xref" href="../../api/Hi.NcParsers.Dependencys.ControllerParameterTableBase.html">ControllerParameterTableBase</a>.</p>
|
||||
<p><strong>Per-case data travels as a proxy.</strong> Tool offsets, work-coordinate offsets, Siemens frames,
|
||||
Heidenhain datums and retained macro variables belong to a <em>job</em>, not to a controller
|
||||
configuration. Those entries sit in the pipeline list as placeholders that resolve, per session,
|
||||
against the owning project's per-case list — which is what lets one controller configuration be
|
||||
shared across projects. <a class="xref" href="../../api/Hi.NcParsers.SoftNcRunner.html#Hi_NcParsers_SoftNcRunner_PipelineNcDependencyList">PipelineNcDependencyList</a> is the raw list;
|
||||
consumers read the resolved view through
|
||||
<a class="xref" href="../../api/Hi.NcParsers.SoftNcRunner.html#Hi_NcParsers_SoftNcRunner_GetEffectiveNcDependencyList_">GetEffectiveNcDependencyList</a>.</p>
|
||||
<p><a class="xref" href="../../api/Hi.NcParsers.NcRunnerSuit.html">NcRunnerSuit</a> bundles a runner with its per-case data as one file-loadable unit,
|
||||
so a whole parser configuration — pipeline and job data together — moves as a single file.</p>
|
||||
<h2 id="machine-wiring">Machine wiring</h2>
|
||||
<p><a class="xref" href="../../api/Hi.NcParsers.SoftNcRunner.html#Hi_NcParsers_SoftNcRunner_ConfigureByMachiningChain_">ConfigureByMachiningChain</a> takes the machining chain and settles
|
||||
what the pipeline needs to know about the physical machine: axis order, which axes are rotary and
|
||||
which linear, and the kinematics the coordinate syntaxes solve against. A five-axis machine, a
|
||||
four-axis machine and a twin-table machine all run the same program path — the difference is the
|
||||
chain, not the parser.</p>
|
||||
<h2 id="extending-it">Extending it</h2>
|
||||
<p>Three kinds of customization need no rebuild of the libraries:</p>
|
||||
<p><strong>Switch brand.</strong></p>
|
||||
<pre><code class="lang-csharp">var runner = SoftNcRunner.HeidenhainNcRunner;
|
||||
runner.ConfigureByMachiningChain(machine.Chain);
|
||||
</code></pre>
|
||||
<p><strong>Add a syntax for one machine's own vocabulary.</strong> A machine whose PLC uses a non-standard <code>M168</code>
|
||||
for clamping needs a class implementing <a class="xref" href="../../api/Hi.NcParsers.Syntaxs.ISituNcSyntax.html">ISituNcSyntax</a> and one entry in
|
||||
that project's pipeline list. No HiAPIs source changes.</p>
|
||||
<p><strong>Declare OEM M-codes without writing code at all.</strong>
|
||||
<a class="xref" href="../../api/Hi.NcParsers.Dependencys.IMCodeDeclarationConfig.html">IMCodeDeclarationConfig</a> and
|
||||
<a class="xref" href="../../api/Hi.NcParsers.Dependencys.MCodeEffects.html">MCodeEffects</a> let a machine state what its own M-codes do — a
|
||||
composite spindle-and-coolant code, a tool-change trigger, turret <code>T</code>-word semantics — and
|
||||
<a class="xref" href="../../api/Hi.NcParsers.LogicSyntaxs.MCodeExpansionSyntax.html">MCodeExpansionSyntax</a> expands them into the canonical ISO flags the
|
||||
shared consumers already understand. A code declared with no modeled effects is voiced once as
|
||||
<code>DeclaredMCode--UnmodeledEffects</code> instead of raising an unknown-code warning on every occurrence.</p>
|
||||
<div class="IMPORTANT">
|
||||
<h5>Important</h5>
|
||||
<p><strong>Composing the pipeline is a licensed capability.</strong> Registering a unit that is not built in —
|
||||
into the syntax list, the dependency list, the semantics, the initializers or the segmenter — and
|
||||
executing an NC-embedded C# script both require the <code>NcComposition</code> licence feature. The check
|
||||
runs once per session at the run entry, so it covers project-XML load, whole-object replacement
|
||||
and direct list mutation alike.</p>
|
||||
<p>Degradation is <strong>silent and functional</strong>, not an error: external units are skipped for that
|
||||
session and named in one <code>Composition--NotLicensed</code> diagnostic, an external segmenter falls back
|
||||
to the single-line segmenter, and scripts are skipped with <code>Script--NotLicensed</code>. The runner's
|
||||
persisted lists are never mutated, so the project still saves correctly — but the simulation that
|
||||
ran is a different one. If you build against this surface, check for that diagnostic rather than
|
||||
assuming your unit ran.</p>
|
||||
<p>Built-in units are unrestricted in order, count, duplication and constructor configuration, and
|
||||
calling the public API from your own application or session script needs no extra licence.</p>
|
||||
</div>
|
||||
<h2 id="brand-support">Brand support</h2>
|
||||
<p>Coverage is stated in three states. <strong>Recognized but not simulated</strong> is a deliberate state, not a
|
||||
gap: the construct is consumed safely and reported with its own diagnostic id, so it can never be
|
||||
misread as something else — a <code>PLANE AXIAL B+45</code> will not be mistaken for a rotary axis command.</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Brand</th>
|
||||
<th>Supported</th>
|
||||
<th>Recognized, not simulated</th>
|
||||
<th>Not supported</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><strong>Fanuc</strong></td>
|
||||
<td>ISO core, canned cycles G73–G89, G41/G42, G43.4 RTCP, G53/G53.1, G68/G68.2/G69, G12.1/G13.1 polar with compensation, Custom Macro B (<code>#</code> variables, <code>IF</code>/<code>GOTO</code>, <code>WHILE</code>/<code>DO</code>), <code>M98</code>/<code>M99</code> subprograms, <code>G65</code>/<code>G66</code>/<code>G67</code> macro calls</td>
|
||||
<td>bare <code>G05 P</code> HPCC selections (<code>Hpcc--NoOp</code>, <code>Hpcc--HighSpeedCycleIgnored</code>, <code>Hpcc--UnsupportedFunction</code>)</td>
|
||||
<td><code>G10</code> programmable data setting, <code>G50</code> spindle limit, <code>G31</code> skip</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Siemens</strong></td>
|
||||
<td>modal vocabulary, <code>SUPA</code>/<code>G153</code>, <code>T="name"</code> with <code>D</code> offsets, <code>$TC_DP</code> tool tables, R-parameters and <code>DEF</code> variables with a full expression evaluator, <code>$P_UIFR</code>, <code>TRANS</code>/<code>ATRANS</code>/<code>ROT</code>/<code>AROT</code> frames, <code>TRAORI</code>/<code>TRAFOOF</code>, <code>CYCLE800</code>, <code>MSG</code>/<code>STOPRE</code>, <code>CR=</code>/<code>TURN=</code> arcs, <code>L</code>/named subprograms, <code>MCALL</code>, <code>REPEAT</code>, <code>PROC</code>/labels, <code>GOTOF</code>/<code>GOTOB</code>, <code>IF</code>/<code>ELSE</code>/<code>ENDIF</code>, <code>WHILE</code>/<code>FOR</code>/<code>REPEAT-UNTIL</code>/<code>LOOP</code>, <code>AC()</code>/<code>IC()</code>/<code>DC()</code>/<code>ACP()</code>/<code>ACN()</code>, the coded-position family, <code>G74</code>/<code>G75</code></td>
|
||||
<td><code>ROTS</code>/<code>AROTS</code>, <code>SCALE</code>/<code>ASCALE</code>, <code>MIRROR</code>/<code>AMIRROR</code> (<code>SiemensFrame--Unsupported</code>)</td>
|
||||
<td><code>SETAL</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Heidenhain</strong></td>
|
||||
<td>klartext motion and <code>FMAX</code>, <code>LN</code> surface-normal blocks resolved into the rotary axes, <code>M91</code>, <code>TOOL CALL</code> with <code>DL</code>/<code>DR</code>, <code>CYCL DEF 247</code> presets and <code>CYCL DEF 7</code> additive shifts, <code>CC</code>/<code>C</code> arcs, <code>RL</code>/<code>RR</code>/<code>R0</code>, <code>M126</code>/<code>M127</code>, <code>M140</code>, <code>CYCL DEF 32</code>, Q/QR parameters with the FN grammar and FN 9–12 jumps, <code>PLANE SPATIAL</code>, <code>FUNCTION TCPM</code>, <code>M128</code>/<code>M129</code>, machining cycles 200/232/251/252/253, <code>CYCL CALL</code>/<code>CYCL CALL POS</code>, <code>CALL LBL</code> with <code>REP</code>, <code>CALL PGM</code>, tilde continuation, <code>BLK FORM</code>, <code>STOP</code>, mirror image (<code>G28</code> and <code>CYCL DEF 8</code>), and the DIN/ISO dialect with absolute <code>I</code>/<code>J</code>/<code>K</code> centres, the ISO label family, <code>G247</code>, <code>G54</code> datum words and <code>G70</code>/<code>G71</code></td>
|
||||
<td><code>PLANE VECTOR</code> (captured), <code>PLANE EULER</code> / <code>POINTS</code> / <code>RELATIV</code> / <code>AXIAL</code> / <code>PROJECTED</code> (<code>HeidenhainPlane--Unsupported</code>), unimplemented <code>FN</code> opcodes such as <code>FN 18 SYSREAD</code>, unrecognized <code>CYCL DEF</code> bodies (<code>HeidenhainCycl--Unsupported</code>), center-referenced <code>FUNCTION TCPM REFPNT</code> (<code>Orientation-RefPoint--CntNotSimulated</code>), and 3D-ToolComp along the <code>LN</code> surface normal (<code>SurfaceNormal--CompNotSimulated</code>)</td>
|
||||
<td><code>TOOL DEF</code>, <code>FK</code> free contour, <code>SL</code> cycles, <code>PATTERN DEF</code>, <code>TCH PROBE</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Syntec</strong></td>
|
||||
<td>ISO core plus the Fanuc-family macro and subprogram vocabulary, polar interpolation</td>
|
||||
<td>bare <code>G05 P</code> HPCC selections, as Fanuc</td>
|
||||
<td>custom G macros, <code>Pr</code> parameter mapping, twin-head / twin-turret syntax</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Mazak</strong></td>
|
||||
<td>EIA/ISO with the Fanuc-family macro and subprogram vocabulary, polar interpolation</td>
|
||||
<td>bare <code>G05 P</code> HPCC selections, as Fanuc</td>
|
||||
<td>Mazatrol conversational sections, MAZATROL ↔ EIA/ISO switching</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="NOTE">
|
||||
<h5>Note</h5>
|
||||
<p>On the Heidenhain preset, DIN/ISO <code>G28</code> is <strong>MIRROR IMAGE</strong>, not a Fanuc reference-point return,
|
||||
and <code>ReferenceReturnSyntax</code> is not in that preset's Logic list. <code>HardNcRunner</code> keeps the Fanuc
|
||||
reading, so the two engines are deliberately divergent on Heidenhain <code>G28</code> files.</p>
|
||||
</div>
|
||||
<h2 id="scope-and-testing">Scope and testing</h2>
|
||||
<p>Two limits sit outside the per-brand table and apply to everything in it.</p>
|
||||
<ul>
|
||||
<li><strong>Milling only.</strong> Turning and tapping operations are not simulated. A program containing them
|
||||
parses as far as its milling content allows; the operations themselves are not modelled.</li>
|
||||
<li><strong>Fanuc syntax is the primary test surface.</strong> All five presets are exercised, but Fanuc carries
|
||||
the most coverage, and a construct that is unusual in Fanuc but ordinary in another dialect is
|
||||
the likeliest place to meet an unimplemented case. The three-state table above exists so that
|
||||
such a case is reported rather than silently mis-read.</li>
|
||||
</ul>
|
||||
<p>Full five-axis RTCP is supported across the presets that have it — Fanuc <code>G43.4</code>, Heidenhain
|
||||
<code>FUNCTION TCPM</code> and <code>M128</code>, Siemens <code>TRAORI</code>.</p>
|
||||
<h2 id="loading-a-hardnc-era-project">Loading a HardNc-era project</h2>
|
||||
<p>Projects written for the legacy interpreter still load.</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Mechanism</th>
|
||||
<th>Purpose</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><a class="xref" href="../../api/Hi.NcParsers.SoftNcRunner.html#Hi_NcParsers_SoftNcRunner_FromLegacyNcEnvXml_">FromLegacyNcEnvXml</a></td>
|
||||
<td>builds a <code>SoftNcRunner</code> from a legacy configuration element</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>the <code>NcEnv</code> XML alias</td>
|
||||
<td>a project saved under the old element name still deserializes</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>the legacy version patches</td>
|
||||
<td>a project saved by an older build gains the syntaxes and semantics added since, according to the project API version it carries</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>the system-wired back-fill</td>
|
||||
<td>a saved pipeline gains the runtime-wired dependencies it predates</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a class="xref" href="../../api/Hi.MachiningProcs.SessionShell.html#Hi_MachiningProcs_SessionShell_EnableSoftNcRunner">EnableSoftNcRunner</a></td>
|
||||
<td>set <code>false</code> to run the legacy interpreter for comparison</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>The version patches cover projects back to the 3.1.163 era; the back-fill is unconditional, because
|
||||
the dependencies it adds are stateless runtime-wired singletons for which presence is the only
|
||||
question worth asking.</p>
|
||||
<h2 id="see-also">See Also</h2>
|
||||
<ul>
|
||||
<li><a class="xref" href="controller-heidenhain.html">Heidenhain Support</a> — the reader-facing page for klartext and Heidenhain DIN/ISO</li>
|
||||
<li><a class="xref" href="controller-iso.html">General NC Code Support</a> — the reader-facing page for Fanuc, Syntec, Mazak and Siemens SINUMERIK</li>
|
||||
</ul>
|
||||
|
||||
</article>
|
||||
|
||||
<div class="contribution d-print-none">
|
||||
</div>
|
||||
|
||||
<div class="next-article d-print-none border-top" id="nextArticle"></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>
|
||||
@@ -0,0 +1,31 @@
|
||||
|
||||
<div id="sidetoggle">
|
||||
<div>
|
||||
<div class="sidefilter">
|
||||
<form class="toc-filter">
|
||||
<span class="glyphicon glyphicon-filter filter-icon"></span>
|
||||
<span class="glyphicon glyphicon-remove clear-icon" id="toc_filter_clear"></span>
|
||||
<input type="text" id="toc_filter_input" placeholder="Filter by title" onkeypress="if(event.keyCode==13) {return false;}">
|
||||
</form>
|
||||
</div>
|
||||
<div class="sidetoc">
|
||||
<div class="toc" id="toc">
|
||||
|
||||
<ul class="nav level1">
|
||||
<li>
|
||||
<a href="index.html" name="" title="Overview">Overview</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="nc-parsing.html" name="" title="NC Parsing Engine">NC Parsing Engine</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="controller-iso.html" name="" title="ISO / General NC">ISO / General NC</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="controller-heidenhain.html" name="" title="Heidenhain">Heidenhain</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
{"items":[{"name":"Overview","href":"index.html","topicHref":"index.html"},{"name":"NC Parsing Engine","href":"nc-parsing.html","topicHref":"nc-parsing.html"},{"name":"ISO / General NC","href":"controller-iso.html","topicHref":"controller-iso.html"},{"name":"Heidenhain","href":"controller-heidenhain.html","topicHref":"controller-heidenhain.html"}]}
|
||||
Reference in New Issue
Block a user