Sinumerik ISO Mode (Running Fanuc-Style G-Code)

What ISO Dialect Mode Is

SINUMERIK 840D sl and 828D controls can run Fanuc-style G-code natively through the ISO dialect option — no translation required for most of the language. The control operates in one of two modes: Siemens mode (native language) or ISO dialect mode (Fanuc-style). You switch between them with two G-codes, each programmed alone in its own block:

CommandEffect
G290Siemens NC programming language active
G291ISO dialect NC programming language active

The active tool, tool offsets, and work offsets are not affected by the switchover. Which mode the control powers up and resets into is set by machine data: MD18800 $MN_MM_EXTERN_LANGUAGE activates the external language, and when ISO dialect is set as the default, the control reboots in ISO mode. Power-on defaults for the individual G groups (G90/G91, G20/G21, etc.) come from MD20154 $MC_EXTERN_GCODE_RESET_VALUES.

Ground rules the manual lays down:

RuleConsequence
No mixing dialects in one blockAn NC block is either all ISO or all Siemens
No Siemens G-functions in ISO modeSwitch with G290 first if you need them
Siemens subroutines callable from ISO codeThis is how the canned cycles actually run (Siemens shell cycles)
Max 9 axes in ISO modeFirst three fixed as X, Y, Z; others from A, B, C, U, V, W

What Works in ISO Mode

Appendix B of the manual lists the full ISO milling G-code table. The everyday Fanuc vocabulary is there. Codes marked optional depend on what the machine builder configured — check your machine documentation.

Function groupG-codes supportedNotes
MotionG00, G01, G02, G03, G33Plus helical G02/G03 and involute G02.2/G03.2
Plane selectionG17, G18, G19Parallel-axis variants supported
Absolute / incrementalG90, G91
Inch / metricG20, G21G-code system A/C variants (G70/G71) in the table
Feed modesG93, G94, G95Inverse-time, per-minute, per-revolution
Cutter compensationG40, G41, G42
Tool length compensationG43, G44, G49Direction by sign of H offset, same as Fanuc
Canned cyclesG73, G74, G76, G80–G87, G89With G98/G99 return-plane control; multiple-start threads with G33
Work offsetsG54–G59, G54.1 (G54 P1–48), G54 P0G54 P0 = external work offset; write offsets with G10 L2/L20
Coordinate settingG92, G92.1, G52, G53G92.1 resets G92/G52 shifts
Reference pointG27, G28, G30, G30.1
Scaling / mirroringG50, G51, G50.1, G51.1Scaling is optional
RotationG68, G692D and 3D rotation; optional
Polar / special interpolationG15, G16, G12.1, G13.1, G07.1G12.1 maps to Siemens TRANSMIT; G07.1 = cylindrical interpolation
MacrosG65, G66, G67See macro section — arguments land in Siemens variables
Measuring / skipG31, G31 P1–P4, G10.6G10.6 = rapid lift via digital input
Subprograms / interruptsM98, M99, M96, M97M96/M97 need MD10808 bit 0 enabled
Path controlG09, G61, G62, G63, G64Exact stop, corner override, tapping mode, continuous path
OtherG04, G10, G22, G23, G72.1, G72.2G72.1/G72.2 contour repetition (optional, not on all controls)

What’s Different — the Gotchas

A Fanuc program will syntax-check its way through ISO mode, but several behaviors differ from a real Fanuc. These are the documented ones that bite.

AreaOn a real FanucIn Sinumerik ISO mode
No # macro variablesMacro B: #1#33 locals, #100s, #500s, IF/GOTO/WHILENot part of the ISO milling dialect. G65/G66 arguments are stored in Siemens system variables $C_A$C_Z, which can only be read in Siemens mode. Macro logic must be written in Siemens language (R-parameters, IF ... GOTOF)
Decimal-point handlingSet by parameter; typically X1000 = least-input-incrementMD10884 selects pocket-calculator notation (X1000 = 1000 mm) or standard notation (X1000 = 1 mm at IS-B, 0.1 mm at IS-C). Wrong setting scales every no-decimal value in the program
Subprogram numbers (M98)M98 P51002 = O1002 × 5, programs live as O-numbersM98 P21 searches part-program memory for the file 21.mpf; repeats via P30021 (count+number) or the L address. With 8-digit program numbers enabled (MD20734 bit 6), count-in-P is no longer allowed — the manual flags this as incompatible with the ISO original. Nesting: 16 levels (+2 reserved for interrupts)
Canned-cycle behavior dataRetract/clearance amounts from parameters (e.g., 5114)Cycles run as Siemens shell cycles; safety clearance comes from GUD _ZSFR[0], G73 chip-break retract from _ZSFR[1], G76/G87 lift-off direction from _ZSFI[5]. Q is one modal value shared across G73/G76/G83
Cycle modal dataQ and R stick once programmedProgram Q and R in a block that also has axis motion or the values are not stored modally; a G00–G03 in the same block deselects the cycle
Tool offset numbers (D/H)D = radius offset register, H = length offset registerISO D/H numbers map into the Siemens T/D tool memory through $TC_DPH[t,d], which someone must populate at setup. Length is always Z-assigned when $SC_TOOL_LENGTH_CONST = 17
G31 skip resultsCaptured positions in #5061#5064Captured in $AA_MW[axis] (work) / $AA_MM[axis] (machine) — readable only in Siemens mode. No CRC allowed in a G31 block
Block skip levels/ and /1 are the same switch/ and /1 are separate skip levels activated independently; levels /1–/9 available; skip sign works mid-block
M99 in a main programLoops to program startSame — but program runtime is not reset and the workpiece counter does not increment
Interrupts (M96/M97)Enabled by parameter, UINT signalOnly work if MD10808 $MN_EXTERN_INTERRUPT_BITS_M96 bit 0 = 1; otherwise M96/M97 are treated as ordinary M-functions. Routed through cover cycle CYCLE396 by default
CommentsParenthesesParentheses work, and ; also starts a comment. Nested ( inside a comment keeps the comment open until every bracket is closed — can silently swallow the rest of the block
Optional codesG51 scaling, G65/G66, G05.1, G07.1, G10, G68/G69, G72.1/G72.2 are flagged optional — presence depends on the machine builder

Tapping note: whether F in G74/G84 is treated as feedrate (G94/G95 style) or as thread lead is a machine-data setting ($MC_EXTERN_FUNCTION_MASK bit 8) — verify before running a tapped hole from a Fanuc post.

Macro Support in ISO Mode (G65/G66 and the $C_ Variables)

G65 (non-modal) and G66 (modal, canceled by G67) call macros just like Fanuc — but the argument plumbing is entirely Siemens underneath. Every address programmed in the call block is stored in a system variable $C_A through $C_Z; I, J, K can be programmed up to 10 times per block and land in the arrays $C_I[0..9], $C_J[0..9], $C_K[0..9] (counts in $C_I_NUM etc.).

The critical restriction: transfer parameters can only be read in Siemens mode. If the macro’s first line is a PROC instruction, the control switches to Siemens mode automatically; without it, the macro body runs in ISO mode and must issue G290 itself before touching any $C_ variable. There is no Fanuc-style #1#33 local-variable mapping and no ISO-mode IF/GOTO — conditional logic is written in Siemens syntax.

; Main program (ISO mode)
N30 G65 P10 F55 X150 Y100 S2000   ; call 0010.spf with arguments

; Macro 0010.spf written in Siemens mode
PROC 0010                          ; auto-switch to Siemens mode
N10 DEF REAL X_AXIS, Y_AXIS, S_SPEED, FEED
N15 X_AXIS = $C_X Y_AXIS = $C_Y S_SPEED = $C_S FEED = $C_F
N20 G01 F=FEED G95 S=S_SPEED
N80 M17

Two replacement mechanisms let ISO programs trigger custom routines the way Fanuc parameter 6050/6080 tables do: up to 50 G-numbers can call macros via MD10816/10817 $MN_EXTERN_G_NO_MAC_CYCLE(_NAME), and up to 10 M-numbers via MD10814/10815 (commonly used to hang a tool-change macro on M6). Only one replacement call per block; conflicts raise alarm 12722. The helper variables $C_TYP_PROG / $C_<addr>_PROG tell the macro whether each argument was programmed as integer or real — needed because of the decimal-point conversion factors above.

Run It in ISO Mode, or Translate?

If the program is straight posted CAM code — motion, canned cycles, cutter comp, work offsets, M98 subprograms — ISO mode will run it with minor cleanup (program-number file names, decimal-point machine data, cycle GUD settings). If the program leans on Fanuc Macro B — #-variables, IF/GOTO logic, probing math reading #5061 — there is no shortcut: that logic has to be rewritten in Siemens language anyway, so translate the whole program natively and skip the hybrid. Probing routines and tool-change macros are the usual tipping point.

References

  • Siemens, ISO Milling Programming Manual, SINUMERIK 840D sl / 828D, 6FC5398-7BP40-3BA0, 02/2012.

Have a question or want to contribute?

Contact us with corrections, additions, or topics you'd like covered.

Get in Touch