deploy webservice static-file routing for docsite folder URLs, per-instance step-cache db, and constant-height panel title bars.

This commit is contained in:
2026-08-27 14:51:37 +08:00
parent 1fc510af5e
commit 2a98ae7556
1468 changed files with 182837 additions and 18888 deletions
@@ -87,133 +87,244 @@
<article data-uid="Controllers/HeidenhainSupport">
<h1 id="heidenhain-controller-support">Heidenhain Controller Support</h1>
<p>This chapter explains HiNC support for NC codes of Heidenhain TNC640 and TNC530 controllers.</p>
<p>Heidenhain controllers support general ISO syntax. The general ISO syntax supported by HiNC is documented in other files.</p>
<p>If not mentioned in the documentation, it generally means it's not supported. R radius compensation command is not supported.</p>
<h2 id="format-support">Format Support</h2>
<p>Except for L code and FQ code, there must be spaces between letter instructions, otherwise, they cannot be parsed.</p>
<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>Can be parsed:</p>
<p>Equivalent, all parsed:</p>
<ul>
<li><code>FMAX M03</code></li>
<li><code>LX-26.3 Y+43.1 Z+100.3 A-90.0 C+13.123 FQ3</code></li>
<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>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 may be left implicit, and an arc that closes on its start point is a full circle.</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>
<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>Cannot be parsed:
<code>FMAXM03</code></p>
</blockquote>
<p>Support for <code>L</code> move command.</p>
<blockquote>
<p>Can be parsed:</p>
<p>Parsed:</p>
<ul>
<li><code>LX+0Y+0FMAX</code></li>
<li><code>L X+0 Y+0 FMAX</code></li>
</ul>
</blockquote>
<h2 id="macro-support">Macro Support</h2>
<h3 id="q-variable-assignment">Q Variable Assignment</h3>
<p>Support for Q variable assignment.</p>
<blockquote>
<p>Can be parsed:</p>
<ul>
<li><code>Q1 = 5000</code></li>
<li><code>Q2 = 123</code></li>
<li><code>Q3 = 1000</code></li>
<li><code>LX-26.3 Y+43.1 Z+100.3 A-90.0 C+13.123 FQ3</code></li>
</ul>
</blockquote>
<h3 id="q-variable-operations">Q Variable Operations</h3>
<p>Support for the following macro operations:</p>
<ul>
<li><code>FN0</code> specify a value.</li>
<li><code>FN1</code> calculate and specify the sum of two values.</li>
<li><code>FN2</code> calculate and specify the difference of two values.</li>
<li><code>FN3</code> calculate and specify the product of two values.</li>
</ul>
<blockquote>
<p>Can be parsed:</p>
<ul>
<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="tool-call">TOOL CALL</h2>
<p>Support for <code>TOOL CALL</code>, but the tool name must be a number.</p>
<blockquote>
<p>Can be parsed:</p>
<ul>
<li><code>TOOL CALL &quot;1&quot; Z S5000</code></li>
<li><code>TOOL CALL 1 Z S5000</code></li>
<li><code>TOOL CALL &quot;1&quot; Z S5000</code></li>
<li><code>TOOL CALL &quot;B40R&quot; 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>Cannot be parsed:
<code>TOOL CALL &quot;ET1&quot; S5000</code></p>
</blockquote>
<h2 id="cycl-def-7">CYCL DEF 7</h2>
<p>Support for <code>CYCL DEF 7</code> workpiece origin offset command.</p>
<blockquote>
<p>Can be parsed:</p>
<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="cycl-def-247">CYCL DEF 247</h2>
<p>Support for <code>CYCL DEF 247</code> workpiece origin setting. Supports <code>Q339</code> coordinate index.</p>
<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>Can be parsed: <code>CYCL DEF 247 Q339=+1</code></p>
</blockquote>
<h2 id="plane-series-instructions">PLANE Series Instructions</h2>
<h3 id="motion-behavior-instructions">Motion Behavior Instructions</h3>
<p>Support for one of three motion behavior instructions: { <code>STAY</code> , <code>TURN</code> , <code>MOVE</code> } .</p>
<h3 id="seq">SEQ</h3>
<p>Support for { <code>SEQ+</code> , <code>SEQ-</code> } active spindle rotation direction instructions.</p>
<h3 id="table-rot">TABLE ROT</h3>
<p>Support for <code>TABLE ROT</code> worktable rotation instructions.</p>
<h3 id="plane-spatial">PLANE SPATIAL</h3>
<blockquote>
<p>Can be parsed: <code>PLANE SPATIAL SPA-60.3 SPB+0 SPC-19.88 STAY SEQ- TABLE ROT</code></p>
</blockquote>
<h3 id="plane-reset">PLANE RESET</h3>
<blockquote>
<p>Can be parsed: <code>PLANE RESET STAY</code></p>
</blockquote>
<h2 id="heidenhain-specific-m-codes">Heidenhain Specific M Codes</h2>
<p>Support for the following Heidenhain specific M codes. General ISO M codes are documented elsewhere.</p>
<h3 id="m91">M91</h3>
<p>Support for <code>M91</code> single-line effective mechanical coordinate displacement.</p>
<blockquote>
<p>Can be parsed: <code>L Z-1 F5000 M91</code></p>
</blockquote>
<h3 id="m107">M107</h3>
<p><strong>Skip</strong> <code>M107</code> display error message command.</p>
<h3 id="m108">M108</h3>
<p><strong>Skip</strong> <code>M108</code> reset <code>M107</code> command.</p>
<h3 id="m126">M126</h3>
<p>Support for <code>M126</code> move on the rotary axis with a shorter path.</p>
<h3 id="m127">M127</h3>
<p>Support for <code>M127</code> reset <code>M126</code> command.</p>
<h4 id="controller-parameter-field-300401">Controller Parameter Field 300401</h4>
<p>Support for controller parameter field <code>300401</code>, if this parameter is true, regardless of whether <code>M127</code> is issued, it will move on the rotary axis with a shorter path.</p>
<p>Parameter field <code>300401</code> default value is true.</p>
<h3 id="m128">M128</h3>
<p>Support for <code>M128</code> enable Tool Center Point Management (TCPM).</p>
<h3 id="m129">M129</h3>
<p>Support for <code>M129</code> disable Tool Center Point Management (TCPM).</p>
<h3 id="m140">M140</h3>
<p>Support for <code>M140 MB</code> <code>M140 MB MAX</code> retract tool command.</p>
<blockquote>
<p>Can be parsed:</p>
<p>Parsed:</p>
<ul>
<li><code>M140 MB MAX</code></li>
<li><code>M140 MB+50 F6000</code></li>
<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.</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&lt;n&gt;</code> definitions, and the head-anchored <code>L&lt;n&gt;,&lt;m&gt;</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="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 href="../../fundamentals/nc-parsing/index.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>