Skip to main content
CNC.wiki

G56 Settable Zero Offset 3 Guide for Siemens SINUMERIK CNC

Master Siemens G56 settable zero offset 3. Configure parameters like MD28080 and MD24000, and resolve Alarm 18312 to prevent tool turret collisions on CNC machines.

Hakan Gündoğdu
Hakan Gündoğdu

CNC CARE Co-founder

Introduction

When a CNC program is aborted mid-cycle or reset before a zero offset cancellation is executed, active coordinate shifts remain resident in the control memory. If an operator performs a tool change on the turret or moves the axes without clearing these active offset registers, resuming the automatic cycle can cause the tool turret to travel along an unretracted path. Under these conditions, the spindle or turret can drive the tool directly into a table-mounted fixture clamp, a workpiece vise jaw, or the rotating jaws of the chuck, resulting in a catastrophic hard collision. The impact shatters the carbide cutting tool, damages the axis ball screws, triggers an axis overload alarm, and converts the raw stock into a ruined scrap part. Setting the Siemens G56 zero offset correctly is essential to preventing these expensive shop-floor failures.

Technical Summary

Technical AttributeSpecification
Command CodeG56
Modal GroupGroup 8 (Settable Work Offsets) / Modal
Supported BrandsSiemens (SINUMERIK)
Critical ParametersMD 28080 $MC_MM_NUM_USER_FRAMES (offsets allocation)
MD 24000 $MC_FRAME_ADD_COMPONENTS (enables fine zero offset component)
Main ConstraintRequires explicit compiler mode toggling (G291) to write offsets programmatically using ISO G10 commands. Attempting to write axial fine offsets when fine offset configuration is disabled triggers Alarm 18312.

Quick Read

  • Setup operators must clear the active zero offset registers before changing tools on the turret to prevent unretracted rapid path travel.
  • Siemens controls require toggling to ISO Dialect mode via G291 to execute G10 L2 P3 offset write operations.
  • The active workpiece coordinate system (WCS) is determined by mathematically adding the coarse offset and the fine offset.
  • Axial fine offsets are only available when the machine data parameter MD 24000 is set to 1.
  • Programmable working area limitations (G25/G26 or WALIMON/WALIMOF) should be used to establish protected zones around fixture clamps and vise jaws.
  • Non-modal suppression commands like G53 or SUPA temporarily deactivate G56 without clearing the offset registers from memory.

Basic Concepts

Practical programming of the G56 zero offset on Siemens controls shifts the program coordinate system origin from the machine's absolute zero point (MCS) directly to a localized workpiece zero (WCS), allowing programmers to evaluate toolpaths relative to the part geometry. The actual distance between the machine zero and the workpiece zero depends entirely on the workpiece type and how it is physically clamped. In turning applications, this zero offset is typically entered to compensate for the tightening clearance of the chuck.

For machining center applications, G56 is adjusted to define the physical distance from machine zero to the workpiece zero point located directly on a fixture clamp or vise jaw. Symmetrical contours or multiple setups can be machined dynamically by establishing independent coordinate origins. For example, three identical workpieces arranged on a pallet can be machined successively according to the zero offsets G54, G55, and G56, while executing a single subprogram (such as L47), drastically reducing program size.

Command Structure

The G56 command shifts the active reference to the third settable zero offset. This allows subsequent coordinates to be evaluated from the workpiece zero point. Siemens uses a bilingual toggled compiler to handle this offset natively or via external language styles.

When programming in native SINUMERIK mode (G290), G56 is called as a standalone command to activate the offset. In contrast, if legacy ISO code is being executed, G291 must first be programmed before G10 can write values directly to the offset register.

G56 ;
G90 G56 G00 X__ Y__ Z__ (D__) ;
G291 ;
G10 L2 P3 X__ Y__ Z__ ;
  • X, Y, Z: Absolute coordinate targets evaluated from the G56 zero point.
  • D: Optional tool cutting edge offset (D1 to D12 for compensation, D0 to cancel).
  • L2: Workpiece work offset data input register identifier (ISO mode only).
  • P3: Selects G56 (the third workpiece offset) as the destination for G10 data (ISO mode only).

Brand Applications

Siemens

Siemens SINUMERIK controls process workpiece offsets as dynamic frames in memory. The G56 offset functions as the baseline settable frame. Programmers configure memory allocation and interpreter behaviors using machine data parameters like MD 28080 and MD 24000.

To select G56 natively, use G290 followed by G56. To program G56 offset writes programmatically in ISO style, use G291 followed by G10 L2 P3.

Parameter / ComponentFunction and Value RangeOperational Role
MD 28080 $MC_MM_NUM_USER_FRAMESInteger (e.g., 6 to 100)Defines the total number of user-settable zero offsets (G54-G59, G505-G599) allocated in control memory.
MD 24000 $MC_FRAME_ADD_COMPONENTS0 (disabled) or 1 (enabled)Enables the axial fine zero offset component. Must be 1 to use G59 with G56.
MD 20734 $MC_EXTERN_FUNCTION_MASKBit 13: 0 or 1Forces an internal preprocessor stop (STPPRE) during G10 writes to ensure main run synchronization.
MD 18800 $MN_MM_EXTERN_LANGUAGE1 (active)Activates the external NC language interpreter for ISO Dialect modes (G291).
MD 20150 $MC_GCODE_RESET_VALUES[18]Group 8 Default: 1 (G500)Determines the default G Group 8 value active during Power-On or Reset.

Warning: Setup operators must verify that the active work offset does not mismatch physical workpiece coordinates. If a program reset occurs mid-machining, G56 remains active in the background, which can lead to unexpected tool movements and spindle damage upon resume.

Version and Series Comparison

Feature CategorySINUMERIK 840D / 840D slSINUMERIK 828DSINUMERIK 808D / 802D sl
Control Class & InterfacesHigh-end multi-channel system. Supports widescreen multi-touch panels, sidescreen windows, ABC keyboards, and the "Collision avoidance" software option.Mid-range single/dual-channel system. Supports standard operator panels and built-in cycles without widescreen sidescreens. No collision avoidance option.Entry-level/compact controls. Standard push-button screens. Option parameters and key settings (like MD 10604) are locked and cannot be changed.
Zero Offset AllocationsFully configurable up to 100 user frames (G54 to G59, G505 to G599) via MD 28080. Full coarse/fine offset structures.Standard zero offset memory (G54 to G57 plus up to 4 user offsets). Supports standard fine offsets.Fixed zero offset allocations (G54 to G57 standard). Locked machine parameters prevent expanding user frames.
Block Skip InterpreterTreats "/" and "/1" as entirely separate, independent block skip levels configured in channels.Treats "/" and "/1" as separate block skip levels that must be activated separately in the control.Basic block skip execution. Legacy ISO block skip levels are mapped directly to standard Siemens levels.

Technical Analysis

Every individual user zero offset (G54 to G599) consists of a coarse offset and a fine offset, and the coarse and fine offsets are mathematically added together to determine the active workpiece zero. Setup operators and programmers must maintain absolute vigilance regarding coordinate offset registration and active boundaries during program execution. If an operator performs a manual zero preset, moves the axis manually during an active shift, or executes a reset with incomplete axis arguments, the remaining axes will retain their shifted values.

Three key programmatic and architectural behaviors clearly distinguish Siemens controls from Fanuc and Mitsubishi controls during zero offset handling:

First, Siemens operates on a bilingual toggled compiler model (G290/G291). While Fanuc and Mitsubishi controls interpret coordinate offsets and register shifts natively within a single continuous program flow, Siemens requires the programmer to explicitly switch the compiler to ISO Dialect mode via G291 to compile blocks containing legacy ISO styles, such as G10 offset inputs or G56 selections. The program must then command G290 to switch back to native SINUMERIK mode to process advanced parametric frames (TRANS/ROT/SCALE/MIRROR) and native zero offsets.

Second, Siemens manages coordinate transformations as dynamic, modular components of a "frame" memory stack. G56 serves as the baseline settable frame. On top of this baseline G56 frame, programmers can dynamically chain programmable absolute offsets (TRANS/ROT/SCALE/MIRROR) or additive modifiers (ATRANS/AROT/ASCALE/AMIRROR) within the same program block. These frames can be suppressed globally or selectively using multi-level suppression commands (G53, G153, SUPA, or G500) depending on active parameters, providing much greater programming flexibility than Fanuc and Mitsubishi's rigid register selections.

Third, Siemens maps legacy block skip levels as separate, independent channels. Unlike the original ISO Dialect where the / and /1 skip characters represent the exact same level, Siemens treats / and /1 as separate skip levels that must be activated independently. If an operator runs a legacy program containing both skip styles on a Siemens control without separately configuring these skip levels, blocks designed to be skipped may execute, resulting in unexpected axis travel and catastrophic workpiece collisions.

Program Examples

; Siemens native and ISO toggling G56 example
G290                                          ; Switch compiler to native Siemens SINUMERIK mode
G56 G17 G90 G00 X100.0 Y50.0 Z10.0 T1 D1      ; Selects G56 coordinate offset, XY plane, absolute rapid positioning
TRANS X15.0 Y10.0                             ; Set absolute programmable zero offset frame relative to active G56 WCS
G291                                          ; Switch compiler to ISO Dialect mode to parse legacy blocks
G10 L2 P3 X-300.0 Y-150.0 Z-50.0              ; ISO Dialect: Programmably writes coordinates into G56 (P3) offset registers

dry run

During a dry run, the control executes the program blocks as follows: First, G290 sets the interpreter to native SINUMERIK mode. Next, the active coordinate system shifts from absolute machine zero to the G56 workpiece origin, moving the spindle rapidly to X100.0 Y50.0 Z10.0 with tool length compensation (D1) active. The TRANS block then introduces an absolute translation shift of X15.0 and Y10.0 relative to G56. When G291 activates, the controller compiles in ISO Dialect mode, executing the G10 L2 P3 block to update the G56 registers with X-300.0, Y-150.0, and Z-50.0 in the background registers without immediate axis motion, pending the next offset call.

Error Analysis

Alarm CodeTrigger ConditionOperator SymptomRoot Cause / Fix
Siemens Alarm 18312Program attempts to write or execute an axial zero offset via G59 with G56 when MD 24000 is 0.The machine execution halts with an error message indicating that the fine offset is not configured.Set the machine data parameter MD 24000 $MC_FRAME_ADD_COMPONENTS = 1 to enable fine offset additions in memory.
Siemens Alarm 14800Linear feed movement (G01) is executed following G56 selection without a programmed path velocity (F) or active fixed feedrates.CNC movement stops instantly at the G01 block with a zero path velocity alarm.Program a feedrate word (F) before or within the G01 block, or activate the "Fixed feedrates" function in the control settings.
Siemens Alarm 61800The compiler attempts to switch to ISO Dialect mode (G291) while the external NC language interpreter MD 18800 is disabled.A system error halts execution immediately upon reading G291, preventing legacy G-code blocks from being compiled.Configure MD 18800 $MN_MM_EXTERN_LANGUAGE = 1 or verify the presence of option bit 19800 on the controller.
Siemens Alarm 12080Syntax error parsed by the interpreter, such as executing ISO G10 commands in native mode (G290) or using invalid block skip syntax.The screen displays a syntax error listing the unrecognized block or command name.Verify that G291 is active before issuing G10 commands, and check the syntax structure against SINUMERIK formatting guidelines.

Application Note

Setup operators must configure the fine offset memory parameters correctly before executing coordinate offsets on Siemens systems. If a program attempts to write or execute an axial zero offset via G59 with G56 when the machine data parameter MD 24000 is set to 0, the controller halts with Alarm 18312. To prevent this configuration error from stopping production, the operator must set MD 24000 to 1. Additionally, to ensure program-based register writes synchronize with the active machine run, MD 20734 Bit 13 should be set to 1, forcing an internal preprocessor stop (STPPRE) during G10 operations. Neglecting these settings can cause the tool turret to travel along unretracted paths and crash into the workpiece vise jaw, shattering tools and bending the ball screws.

Related Command Network

  • G53 / G153 / SUPA: Suppresses the active coordinate frames and settable zero offsets (like G56) at different levels without deactivating them permanently.
  • G54 to G57 (including the second settable offset G55) and G505 to G599: Standard settable zero offsets 1 to 99, used to define localized workpiece coordinate systems.
  • G500: Deactivates all active settable user frames (G54 to G599) and restores the default zero frame.
  • TRANS / ATRANS: Formulates absolute and additive zero offset translation frames, shifting the active WCS relative to the baseline G56 offset.
  • G58 / G59: Writes absolute and additive axial zero offsets to replace or modify active translation components.
  • G290 / G291: Toggles the bilingual compiler between native Siemens mode and external ISO Dialect mode.

Conclusion

Establishing the G56 zero offset correctly ensures safe and efficient machining setups. Programmers must ensure that active offset registers are cleared before tool changes to prevent axis crash hazards. Properly configuring machine parameters and utilizing compiler switches ensures that workpiece coordinate origins remain synchronized with the physical fixture clamp and chuck locations.

FAQ

How do you programmatically update G56 values on Siemens controls

To programmatically update G56 offsets, switch the controller compiler to ISO Dialect mode by programming G291 in a separate block. Once in ISO mode, execute a G10 L2 P3 block followed by the axis offsets (such as X-300.0 Y-150.0). Remember to switch back to native mode with G290 to execute parametric cycles.

Why does a program halt with Alarm 18312 when selecting G56

Siemens controls trigger Alarm 18312 when the program attempts to execute or write an axial fine offset (G59) in conjunction with G56, but the fine offset memory component is disabled. To fix this, change the machine data parameter MD 24000 ($MC_FRAME_ADD_COMPONENTS) to 1 and perform a control reset.

What happens to the G56 offset if the CNC program is aborted mid-cycle

If a program is aborted mid-cycle, the G56 zero offset remains active in the background. Resuming execution or initiating a manual movement without deactivating the offset via G500 or suppressing it can cause the spindle or tool turret to crash. Always verify the active coordinate state before running new tools.

Still not resolved?

Ask our AI assistant about this topic in natural language. Grounded in verified sources, no hallucinations.

Ask AI Assistant
Hakan Gündoğdu
Hakan Gündoğdu
  • CNC CARE Co-Founder (May 2025 - Present)
  • Mitsubishi Electric NC Sales & Service Section Manager (2008 - 2025)
  • Reis CNC Service Engineer (2003 - 2008)
  • Ören Kalıp CNC Mold Line Team Leader (1999 - 2002)

With over 25 years of experience working in all areas of the CNC machine industry, I continue my activities as a co-founder of CNC CARE, where we offer brand-independent consulting, engineering, and original spare parts services.

Related Articles

Other articles on this topic