G58 Absolute Axial Zero Offset Guide for Siemens SINUMERIK
Learn how to program Siemens SINUMERIK G58 axial zero offsets. Compare this absolute coarse substitution with Fanuc and Mitsubishi coordinate system methods.
Introduction
If an operator aborts a CNC program mid-cycle, manually jogs the machine axes, or performs a reset without executing a frame suppression command, the absolute offset values programmed via G58 remain active in the background coordinate frames. Resuming the cycle under these conditions causes the axes to calculate coordinate paths from a shifted, incorrect origin. As the tool turret indexes or the spindle moves along this uncompensated path, the cutting tool bypasses physical safety margins, driving the tool carrier or spinning spindle directly into table-mounted fixture clamps, a workpiece fixture vise jaw, or the rotating jaws of a spindle chuck. This results in a catastrophic hard collision that shatters the cutting tool, damages the axis ball screws, triggers a high-current axis overload alarm, and converts raw stock into a ruined scrap part.
Technical Summary
| Technical Specification | Details / Values |
|---|---|
| Command Code | G58 |
| Modal Group | Group 3 (Programmable offsets, working area limitations, and pole programming) |
| Supported Brands | Siemens SINUMERIK (in native G290 mode) |
| Critical Parameters | MD 24000 $MC_FRAME_ADD_COMPONENTS (Frame fine offset active, must be set to 1) |
| Main Constraint | Must be programmed in a separate NC block without other movement commands |
Quick Read
- G58 is a substituting absolute axial frame command that overrides only the coarse translation component of the currently active zero offset.
- Program G58 in its own dedicated NC block to ensure the Siemens interpreter processes the frame shift before executing axis movements.
- Ensure machine data parameter MD 24000 is set to 1, or else executing G58 will immediately trigger Alarm 18312 and halt the control.
- Note that G58 modifies only the coarse translation component, preserving the active fine offset component that is updated via G59.
- Verify coordinate states after any cycle interruption and use SUPA to safely retract the machine to the physical machine zero.
- Set up active working area limitations using G25 and G26 to form an electronic safety boundary protecting the tool turret, chuck, and fixtures.
Basic Concepts
Implementing the G58 absolute axial zero offset on Siemens SINUMERIK controls provides a dynamic method for managing coordinate shifts during machining. Unlike Fanuc and Mitsubishi controls, where G58 is simply used to select a static workpiece coordinate system, Siemens evaluates G58 as a programmable absolute axial substitution frame. This allows programmers to temporarily swap out the absolute coarse translation components of specific axes within a block, relative to the active zero offset (such as G54). This is particularly useful for localized modifications of toolpaths on multi-cavity fixtures where minor coarse adjustments are required without shifting the baseline workpiece setup. Switch coordinates dynamically recalculate the active tool offsets without deactivating them.
Command Structure
In native Siemens SINUMERIK mode (G290), G58 operates as a modally active preparatory function that belongs to G-code Group 3. This command behaves as a substituting frame instruction rather than an additive one. When a G58 block is parsed, the control replaces the coarse translation component of the currently active zero offset for the designated axes, leaving fine offsets and unmodified axes untouched.
Because the command overrides existing coordinate translation levels, it must be carefully isolated. The interpreter requires that G58 be entered in a separate NC block. Mixing motion commands with coordinate substitution in the same block will lead to syntax validation errors or unpredictable axis paths during cycle execution.
Command Syntax
G58 X__ Y__ Z__ A__ ;
Command Parameters
- X, Y, Z, A: Specifies the absolute axial coordinate values to replace the programmable absolute coarse translation component of the active frame.
- MD 24000 $MC_FRAME_ADD_COMPONENTS: Machine data parameter that must be set to 1 to enable axial fine offset components. A value of 0 triggers a system fault upon parsing G58.
- MD 28080 $MC_NUM_USER_FRAMES: Configures the total number of user-settable zero offsets (G54 to G57, G505 to G599) allocated in control memory, ranging from 1 to 93.
- MD 10760 $MN_G53_TOOLCORR: Determines whether tool length and tool radius compensations are suppressed or maintained when suppressing coordinate frames.
Brand Applications
Siemens
Siemens SINUMERIK controls process G58 within native mode (G290) as an axial absolute translation substitution frame. This offset modifies the coarse component of the active zero offset for specific axes, while keeping the additive fine component intact. Operators must verify parameter MD 24000 is enabled before running the code.
Executing G58 shifts the coordinate origin by writing directly into the Group 3 frame stack. This is demonstrated when configuring multi-cavity setups, where individual axis shifts are programmed sequentially to route the spindle across different vise jaws.
| Control Element | Specification / Setting | Purpose & Alarm Behavior |
|---|---|---|
| MD 24000 $MC_FRAME_ADD_COMPONENTS | Value: 1 | Enables fine offset frames. If set to 0, G58 execution halts the system with Alarm 18312. |
| MD 28080 $MC_NUM_USER_FRAMES | Range: 1 to 93 | Sets the quantity of user-settable offsets stored in memory. |
| Turning Mode Versions | 840D sl vs. 802D sl | The advanced 840D sl supports Group 20 commands (G51.2/G50.2) for multi-edge turning; the compact 802D sl does not. |
| Alarm 14800 | Trigger: Feedrate = 0 | Fires if motion is commanded under a G58 frame while the path velocity evaluates to zero. |
Warning: Always isolate G58 in its own NC block. Combining G58 with motion G-codes (like G01 or G00) on the same line causes interpreter syntax faults or unexpected toolpath movements.
Brand Comparison
| Siemens Control Series | Multi-Edge Turning (Group 20) | User Frame Allocation (MD 28080) | Memory & Frame Stacking Capabilities |
|---|---|---|---|
| SINUMERIK 840D sl / ONE | Fully supported (G51.2 multi-edge turning ON, G50.2 OFF) | Up to 93 zero offsets (G54 to G57, G505 to G599) | High-capacity multi-level frame stack with dynamic coarse/fine translation splitting |
| SINUMERIK 828D | Limited / application-dependent support | Up to 93 zero offsets (G54 to G57, G505 to G599) | Standard frame stack supporting absolute coarse (G58) and additive fine (G59) offsets |
| SINUMERIK 802D sl | Omitted (Group 20 commands completely unsupported) | Basic frame memory allocation | Compact frame buffer; basic axial zero offset modifications only |
Technical Analysis
Three key programmatic and architectural behaviors clearly distinguish Siemens SINUMERIK 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). 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 zero offsets as dynamic, modular components of a multi-level frame memory stack. G58 is treated as a programmable axis-specific substitution component of G Group 3. It works in conjunction with G59 (axial additive fine offset) to split absolute and fine coordinate translations into independent stack layers, whereas Fanuc and Mitsubishi treat workpiece coordinate systems (WCS G54–G59) as monolithic, single-register absolute locations.
Third, Siemens features a dedicated absolute suppression command, SUPA. When programmed, SUPA suppresses all active zero offsets, programmed offsets, basic offsets, and handwheel offsets to retract axes safely to the machine coordinate zero. Fanuc and Mitsubishi controls lack a multi-level suppression block command like SUPA, relying instead on standard unmodal coordinate suppression commands like G53.
Program Examples
; N10 G290 ; Switch to native SINUMERIK mode
; N20 G54 ; Activate primary workpiece coordinate offset
; N30 TRANS X10 Y10 Z10 ; Set absolute coarse offset to X10 Y10 Z10
; N40 ATRANS X5 Y5 ; Add fine offset component X5 Y5 (Total active offset: X15, Y15, Z10)
; N50 G58 X20 ; Substitute coarse X offset with X20 (Total active offset: X25, Y15, Z10)
; N60 G59 X10 Y10 ; Substitute fine offsets with X10 Y10 (Total active offset: X30, Y20, Z10)
; N70 G01 X0 Y0 F150 ; Perform linear machining at feedrate 150
; N80 SUPA ; Suppress all coordinate offsets to retract axes safely
; N90 M30 ; End of program execution
Dry Run
During the program execution dry run, the N10 block toggles the compiler into native SINUMERIK mode. N20 loads the base zero offset. Block N30 applies a TRANS coarse coordinate shift, establishing the coordinate system origin at X10, Y10, Z10. Block N40 applies an additive ATRANS fine offset, accumulating a shift of X15 and Y15. Block N50 executes G58, which overwrites the coarse X offset of 10 with 20, shifting the active tool path origin to X25 while Y remains at 15. Block N60 calls G59 to substitute the fine offsets, resulting in a total shift of X30 and Y20. After G01 machining in block N70, block N80 calls SUPA to instantly suppress the G58, G59, and G54 shifts, safely returning the spindle carrier to machine zero.
Error Analysis
| Siemens Alarm Code | Alarm Description & Message | Trigger Condition | Root Cause / Operator Fix |
|---|---|---|---|
| Alarm 18312 | channel %1 block %2 frame: Fine offset not configured | NC interpreter parses G58 or G59 while MD 24000: FRAME_ADD_COMPONENTS is 0. | Frame fine offset is disabled in parameters. Set machine data parameter MD 24000 to 1, then restart the control. |
| Alarm 14800 | Channel %1 Set %2 programmed path velocity is less than or equal to zero | An axial movement command (e.g., G01) runs under active G58 offset, but path feedrate evaluates to F0. | Path feedrate is set to zero without fixed feedrates active. Specify a non-zero feedrate (e.g., F150) in the motion block. |
| Alarm 61000 | Tool offset not active | An offset shift or canned cycle runs without a valid active tool compensation D number. | Coordinate translation performed with unconfigured tool offset. Program a valid tool compensation code (e.g., D1) prior to machining. |
Application Note
Resuming a cycle under an uncompensated G58 frame after an operator aborts a program mid-cycle, manually jogs the axes, or performs a reset without executing a frame suppression command causes the axes to calculate coordinates from a shifted origin. As the tool turret indexes or the spindle moves along this uncompensated path, the cutting tool can bypass physical safety margins. The axes will drive the tool carrier or spinning spindle directly into table-mounted fixture clamps, a workpiece fixture vise jaw, or the rotating jaws of a spindle chuck, causing a catastrophic hard collision, shattering the cutting tool, damaging the axis ball screws, generating a high-current axis overload alarm (such as Alarm 14800), and converting the raw stock into a ruined scrap part. To prevent this, programmers must utilize working area limitations (G25/G26 or WALIMON/WALIMOF) to establish a secure electronic protection envelope around sensitive machine components, such as the tool turret, measuring stations, and spindle.
Related Command Network
- g53-suppress-current-frame: Suppresses active settable frames and programmable offsets to allow safe movements in machine coordinates.
- g54-settable-zero-offset: Establishes the workpiece coordinate origin upon which axial offsets (G58/G59) are applied.
- g52-local-coordinate-system: Operates as a local coordinate system shift, which works in a different hierarchy than the Siemens frame-based G58 stack.
Conclusion
Utilizing the Siemens G58 programmable offset provides a highly flexible, axis-specific coordinate substitution model for managing complex fixture offsets. By implementing separate-block programming and verifying parameter MD 24000, operators can easily control coordinate translation layers without risking axis overtravel or tool chuck collisions.
FAQ
What is the difference between G58 and G59 in SINUMERIK?
G58 acts as a programmable absolute zero offset that substitutes only the coarse translation component of the active frame. In contrast, G59 modifies the additive fine offset component. Operators should use G58 for major coarse adjustments on fixtures, followed by G59 for fine-tuning coordinate tolerances, ensuring that MD 24000 is set to 1 to enable both registers.
Why does the machine halt with Alarm 18312 when G58 is executed?
This error indicates that the machine's memory configuration has not allocated frames for fine offset components because machine parameter MD 24000 is configured to 0. To resolve this, access the system machine data settings, update MD 24000 to 1, and perform a control reset to allocate the required memory space.
How do I safely clear a G58 programmable offset after a program reset?
Programmable zero offsets can persist in the active frame memory after a reset or abort, which may lead to offset collisions during subsequent cycles. To safely purge these values, always program a SUPA or TRANS instruction at the beginning and end of your NC program to retract the axes and restore the baseline workpiece coordinates.
Still not resolved?
Ask our AI assistant about this topic in natural language. Grounded in verified sources, no hallucinations.

- 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
G71 Metric Dimensioning Guide for Siemens SINUMERIK Controls
Learn how to program G71 and G710 metric dimensioning on Siemens SINUMERIK controls, including parameter MD 10240, alarm codes, and G-code syntax errors.
G69 Balance Cut Cancel: Coordinate Recovery & Crash Prevention
Learn how to program the G69 balance cut cancel command for Fanuc, Siemens, and Mitsubishi turning centers. Cancel dual slide synchronization and prevent crashes.
G70 CNC Finishing Cycle Guide for Fanuc, Siemens, and Mitsubishi
Learn the G70 finishing cycle for CNC turning. Master syntax, parameters, and alarm codes for Fanuc, Siemens CYCLE95, and Mitsubishi controls to avoid crashes.
G69 Coordinate System Rotation Cancel: Modals, Alarms, and Setup
Learn to cancel G68 facing turret mirrors and coordinate rotations using G69 on Fanuc, Siemens, and Mitsubishi CNCs to prevent turret crashes.