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,17 +87,380 @@
<article data-uid="">
<h1 id="general-nc-code-support">General NC Code Support</h1>
<p>This list only represents partial functionality that can be applied to these commands. It may not execute complete functionality.</p>
<h2 id="iso-standard-nc-codes">ISO Standard NC Codes</h2>
<p>G00, G01, G02, G03, G04, G17, G18, G19, G21, G28, G40,
G43, G44, G49, G52, G53, G54~G59.9, G68, G69, G71,
G80, G81, G82, G83, G85, G86,
G90, G91, G94, G98, G99</p>
<p>M03, M04, M05, M06, M08, M09, M13, M14, M30</p>
<h2 id="fanuc--syntec-specific-nc-codes">Fanuc &amp; Syntec Specific NC Codes</h2>
<p>G43.4, G53.1, G68.2</p>
<h2 id="siemens-specific-nc-codes">Siemens Specific NC Codes</h2>
<p>G500, SUPA, TRAFOOF, TRAORI</p>
<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>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>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.</td>
</tr>
<tr>
<td><code>G54.1 P1</code>–<code>P48</code></td>
<td>Fanuc extended work offset table.</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>
<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>
<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 &ldquo;spindle CW plus flood coolant&rdquo;, 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 &lt;statement&gt;</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(&quot;A;B&quot;)</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=&quot;NAME&quot;</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 href="../../fundamentals/nc-parsing/index.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>