Table of Contents

General NC Code Support

The vocabulary HiNC interprets is decided by the controller brand selected for the project. This page covers the ISO-family presets — Fanuc, Syntec and Mazak — and Siemens SINUMERIK. Heidenhain is a different language and has its own page: Heidenhain Support.

How to read this page

Coverage is stated in three states.

State What happens when the construct appears in your program
Supported interpreted, and its effect is simulated.
Recognized, not simulated 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.
Not supported the words are left over, and the block reports Parsing--Unconsumed naming them.
Tip

The message list a run produces is the coverage report for your 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.

ISO core

Fanuc, Syntec and Mazak share the vocabulary below. Siemens spells most of it the same way and adds its own for the rest — see Siemens SINUMERIK.

Motion

Code Meaning
G00 Rapid positioning.
G01 Linear interpolation at the programmed feedrate.
G02 / G03 Circular interpolation, clockwise / counter-clockwise. The centre may be given as I / J / K offsets or as a radius R.
G04 Dwell. X / U are seconds, P is milliseconds, S is spindle revolutions. Both the G4 and G04 spellings are read.
G28 Reference-point (home) return through an intermediate point.
G53 One-shot machine-coordinate move — work offsets are bypassed for that block only.

Plane, units and positioning mode

Code Meaning
G17 / G18 / G19 Plane selection — XY / ZX / YZ. Arcs and canned cycles follow the active plane.
G21 Metric. This is the HiNC default.
G71 Metric — the RS-274-D / Fanuc G-code system C / Syntec spelling of G21, accepted the same way on the Fanuc and Syntec presets. Mazak EIA stays G20 / G21 only.
G20 Inch — not supported. The block reports Unit--InchNotSupported; post the program in metric.
G70 Inch — the RS-274-D / Fanuc G-code system C / Syntec spelling of G20, read on the Fanuc and Syntec presets. Not supported; the block reports Unit--InchNotSupported; post the program in metric.
G90 / G91 Absolute / incremental positioning.
G94 / G95 Feed per minute / feed per revolution.

Work coordinates

Code Meaning
G54G59 Standard work coordinate systems.
G59.1G59.9 Extended work coordinate systems, backed by the brand-neutral table the Fanuc, Mazak and Syntec presets carry behind their brand table. Like G54G59, a row left at zero is read as an authoring convention and stays silent.
G54.1 P1P48 Fanuc additional work coordinate systems, backed by the extended work offset table. Also read in the manual's second spelling G54 P1P48, with or without the space; a G54 with no P word is the plain G54 above. A selected row nobody has entered reports Coord-WorkOffset--AdditionalZero.
G52 Local coordinate offset, applied on top of the active work coordinate system.

Tool compensation

Code Meaning
G43 / G44 / G49 Tool length compensation, positive / negative / cancel. H selects the offset row.
G41 / G42 / G40 Cutter radius compensation, left / right / cancel. D selects the offset row.

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 G41 / G42, a comment, an empty line, a plunge along the plane normal (Z under G17) — takes no offset of its own and no part in a corner:

  • Start-up waits for motion. A G41 or G42 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.
  • Corners are resolved between travelling blocks. 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 plunge along the plane normal stays on the offset line.
  • The plane cannot change inside a region. G17 / G18 / G19 selects the compensation plane, and it may only be selected while compensation is cancelled. A plane code that resolves to a different plane while G41 / G42 is active — including one sharing its block with the G40 that cancels the region — is reported as RadiusComp--PlaneChangeInRegion, because the corner spanning the change would be built from one running axis per plane. A control alarms there (Fanuc PS0037 CAN NOT CHANGE PLANE IN CRC). Re-selecting the plane already in force is not a change and is accepted.
  • A bare G40 closes the region. The last compensated block ends on its own perpendicular offset rather than turning toward the first uncompensated move after the cancel. A G40 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 (EnableSoftNcRunner set false) ends that case perpendicular.
  • The D row must match the program's strategy. A zero-based program (the CAM path is the tool-centre path, G41 D.. kept for wear only) needs a D row whose geometry radius is 0; a cutter-radius program (the NC is the part contour) needs the tool radius there. An offset larger than an inner arc or groove of the contour makes the compensated path run against the programmed direction — a control stops with an interference alarm (Fanuc PS0041), HiNC reports RadiusComp--Interference and keeps playing the swapped-side path. The radius basis of the tool-house refresh is chosen on Tool Offsets.

Rotation, tilted planes and five-axis

Code Meaning
G68 Coordinate rotation in the active plane, around a centre point by angle R.
G68.2 Tilted work plane — Euler angles I / J / K with origin X / Y / Z.
G69 Cancels G68 and G68.2.
G53.1 Tool-axis direction — swings the rotary axes into line with the active G68.2 plane.
G43.4 RTCP / tool centre point management. The Siemens equivalent is TRAORI, the Heidenhain equivalent M128.

Canned cycles

Code Cycle
G73 High-speed peck drilling — Q increments with a partial retract.
G74 Left-hand tapping.
G76 Fine boring — oriented spindle stop, Q shift, rapid out.
G81 Drilling.
G82 Drilling with a dwell at the bottom.
G83 Peck drilling — Q increments with a full retract to the R point.
G84 Right-hand tapping.
G85 Boring, feed out.
G86 Boring, spindle stop then rapid out.
G87 Back boring.
G89 Boring with a dwell at the bottom.
G80 Cancel.
G98 / G99 Retract to the initial level / to the R level.

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 G91 incremental cycle data are resolved before the strokes are built.

On SoftNc (the 3.2 default) a repeat block is the XYZ / R / Q / F / P / K family. An A / B / C word on a repeat is not taken: a rotary-only repeat does not fire the cycle, a mixed block drops the rotary word, and under G68.2 the hole follows the table. Programs that index a rotary axis that way should run with SoftNc off — the HardNc fallback indexes those blocks the way a control does. See the Adoption status note.

Polar interpolation

G12.1 turns polar coordinate interpolation on and G13.1 turns it off. Inside a polar section the X word is a diameter and the C word is a hypothetical Cartesian axis in millimetres, not rotary degrees. HiNC halves X, resolves G90 / G91, 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°. G41 / G42 compensation is resolved on the hypothetical plane, and YA / ZB axis pairs work the same way. G codes that conflict with polar mode are checked before the mode is entered.

Path smoothing

G05.1 Q1 enables high-precision contour control (AICC / Nano Smoothing) and Q0 disables it. The optional R precision level is preserved.

Bare G05 (or G5) is a different feature under a confusingly similar name, and the two are tracked separately so they cannot cancel one another. It selects a function through its P word, on the Fanuc, Syntec and Mazak presets:

P Reading
P10000 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 Hpcc--NoOp.
P0 Cancels HPCC. Consumed silently — cancelling a no-op needs no message.
P10001P10999 High-speed cycle machining. The real machine executes cycle data pre-registered in its variable area, which is actual axis motion HiNC cannot see, so the simulated result misses that machining. Reports Hpcc--HighSpeedCycleIgnored as a warning.
anything else Not supported offline and ignored, reported as Hpcc--UnsupportedFunction. Small P values select the high-speed remote buffer modes.
no P at all Not supported offline and ignored, reported as Hpcc--MissingFunctionWord.

An unevaluated macro variable or expression in P is tolerated — it reports Hpcc--UnevaluatedFunction rather than failing the block.

M codes

Code Meaning
M00 / M01 Program stop / optional stop.
M02 / M30 Program end. On SoftNc the next block starts with tool-length compensation (including TCP), tilt, cutter-radius compensation and canned cycles cancelled; the M02 / M30 block itself still runs under the modal state it executed with. The HardNc fallback does not apply that reset.
M03 / M04 / M05 Spindle clockwise / counter-clockwise / stop.
M06 Tool change. The axis travel the change requires is synthesized rather than teleported.
M07 / M08 / M09 Mist coolant on / flood coolant on / coolant off.
M98 / M99 Subprogram call (M98 P{program} L{repeat}) and return, including M99 P{sequence} early return.
M198 Subprogram call from external storage — same shape as M98, different lookup folder.
Note

Composite and OEM M-codes are not built in — they are declared on the machine. An M13 that means “spindle CW plus flood coolant”, an M-code that triggers a tool change, or turret T-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 DeclaredMCode--UnmodeledEffects instead of raising an unknown-code warning on every occurrence.

Note

If a program states a spindle speed greater than zero but never issues a direction, HiNC assumes clockwise and reports SpindleDirection--AssumedCw. Without that assumption the cutting-force model would silently produce zero mechanics for the whole file.

Fanuc

Everything in the ISO core, plus:

Custom Macro B. # variable assignment and arithmetic, with each range routed to the store it belongs to — #1#33 local to the macro frame, #100#499 volatile and cleared on M02 / M30, #500#999 retained and saved with the project, #3000#3999 system control. Boolean and logical operators, IF [..] GOTO n, IF [..] THEN <statement>, and WHILE [..] DO m / END m with a bounded-loop watchdog. Position and tool-offset system variables read back into expressions.

Macro and subprogram calls. G65 one-shot macro call, binding arguments AZ onto #1#26; G66 / G67 modal macro, firing at every positioning block until cancelled; M98 / M198 / M99. 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.

Not supported. G10 programmable data setting, G50 spindle speed clamp, G31 skip.

Syntec

Syntec runs the ISO core plus the Fanuc-family macro and subprogram vocabulary and polar interpolation.

Not supported. Custom G macros defined on the controller, Pr parameter mapping, and twin-head / twin-turret program syntax.

Mazak

Mazak reads EIA/ISO with the Fanuc-family macro and subprogram vocabulary and polar interpolation.

Not supported. MAZATROL conversational sections, and switching between MAZATROL and EIA/ISO inside one program. Export the EIA/ISO program from the controller.

Siemens SINUMERIK

Real .mpf / .spf programs replay end to end — this is not an ISO subset with a Siemens label on it.

Modal vocabulary. SUPA / G153 suppress all frames for one block; G70 / G71 units; the path-smoothing family (G60x / G64x, FNORM / SOFT / FFWON / COMP* / UPATH, CYCLE832); MSG() and STOPRE; CR= and TURN= arcs. Tail comments are quote-aware, so a ; inside MSG("A;B") does not truncate the block. G74 / G75 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 F never reaches the modal feedrate.

Tools. T="NAME" string tool calls with D cutting-edge offsets, resolved through the $TC_DP tool table — lengths and radius plus additive wear.

Variables and expressions. R parameters R0R999 are held as per-project data, DEF REAL / DEF INT declarations lower into assignments, and a full expression evaluator means Z=R63+150 and X=SIN(R10)*20 drive real motion. $P_UIFR[n,axis,TR] binds both ways to the frame table. Any other $ variable is recorded with an unsupported note rather than silently dropped.

Frames and five-axis. TRANS / ATRANS / ROT / AROT (with RPL=) and the solid-angle forms ROTS / AROTS compose into the tilt chain in Sinumerik RPY order (ROTS / AROTS behave as ROT / AROT: at most two angles, first-named axis first); TRAORI is a real RTCP mode, the sibling of ISO G43.4, with TRAFOOF handing the offset back; CYCLE800 is decoded from its MODE bits across all four swivel modes.

Calls and control flow. L-prefixed and named subprogram calls, inlined with their P repetition count; M17 / RET; REPEAT over a labelled slice; MCALL CYCLE81 / 82 / 83 / 85 mapped onto the shared canned-cycle machinery; PROC headers and labels. GOTOF / GOTOB, IF / ELSE / ENDIF, and WHILE / FOR / REPEAT-UNTIL / LOOP. Jumps and loop iterations are capped rather than hanging the session — over the cap the construct warns and falls through.

Per-word coordinate functions. AC() / IC() / DC() / ACP() / ACN(), including on I / J / K circle centres, so G90 C=IC(360/17) is one incremental index inside an absolute program. ACP() takes the forward window, ACN() the backward one, and DC() the shortest swing.

Coded positions. CAC / CIC / CDC / CACP / CACN take a 1-based indexing position number instead of a coordinate, resolved against the machine's own indexing-position tables.

OEM auxiliary M-codes. The preset declares M12 / M13 / M22 / M23 and M330 / M331 as note-only, so each occurrence voices DeclaredMCode--UnmodeledEffects rather than an unknown-code warning. A machine's own table overrides the declaration once the real effects are known.

Recognized, not simulated. SCALE / ASCALE, MIRROR / AMIRROR and CROTS — each reported as SiemensFrame--Unsupported.

Not supported. SETAL.

See Also

  • Heidenhain Support — klartext and Heidenhain DIN/ISO.
  • NC Parsing Engine — 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.