Skip to main content
CNC.wiki

G68 Coordinate System Rotation: Fanuc, Siemens, Mitsubishi Guide

Learn how to program G68, G68.1, ROT, and AROT coordinate system rotation on Fanuc, Siemens, and Mitsubishi CNC controls to prevent hard crashes and scrap parts.

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

CNC CARE Co-founder

Introduction

Miscalibrated coordinates or rotation center offset errors on the control interface during milling setup send the spindle or tool indexing turret on a dangerously shifted trajectory. In high-speed milling environments, if coordinate rotation is active and absolute offsets are miscalculated, the tool post or spindle head can easily bypass software-defined travel limits and drive the cutting tool directly into physical workholding components. When a tool nose or milling cutter impacts table-mounted fixture clamps, a raw stock vise jaw, or the rotating steel jaws of a spindle chuck at high feedrates, the resulting hard collision (crash) instantly shatters the cutting tool, bends the axis ball screws, and converts the workpiece into a ruined scrap part. This sudden spatial deviation triggers high-current servo overload alarm codes, halting production and requiring expensive machine repairs.

Technical Summary

Technical SpecificationValue / Description
Command CodeG68 / G68.1 / ROT / AROT
Modal GroupGroup 16 modal (Fanuc / Mitsubishi), Group 3 / working area frame (Siemens)
Supported BrandsFanuc, Siemens, Mitsubishi
Critical ParametersFanuc Parameter No. 11600 Bit 5 (AX1), Mitsubishi Parameter #19003, Siemens MD 18800
Main ConstraintCutter radius compensation (G41/G42) direction changes under active rotation trigger Alarm PS0157 on Fanuc, plane selection changes (G17/G18/G19) under active rotation trigger Program Error P111 on Mitsubishi.

Quick Read

  • Coordinate rotation center absolute coordinates (X, Y, Z) must be defined relative to the active workpiece coordinate system (WCS) or left blank to default to the current physical tool position.
  • Active cutter radius compensation (G41 or G42) direction changes under rotation must be programmed only in G00 rapid motion blocks to prevent controller stops and Alarm PS0157.
  • Active rotation must be canceled by commanding G69, G69.1, or ROT with zero RPL before modifying the active working plane via G17, G18, or G19.
  • Tool length compensation (G43/G44 or Siemens tool offsets) remains referenced to the fixed, non-rotated working plane, requiring separate coordinate translation validation.
  • Dry run execution in single-block mode with the spindle off must be performed to verify tool clearance around vise jaws, chucks, and fixture clamps before automatic runs.
  • Parallel axes must be synchronized with a G90 absolute command in the preceding block to prevent parallel axis coordination errors (Alarm PS0508) during rotation activation.

Basic Concepts

Practical programming of coordinate system rotation commands on CNC controls provides programmers with the mathematical flexibility to rotate complex contours without manually recalculating toolpath coordinates. By allowing a single, standard subprogram to machine identical features at various rotated positions, coordinate rotation reduces both program length and development time. Working planes rotate automatically with the programmed frame, which ensures circular interpolations and arc center vectors (I, J, K) are resolved correctly in the rotated plane.

During machining center and lathe operations, coordinate rotation calculates complex trajectories on-the-fly, requiring setup operators to maintain absolute vigilance when setting up workpiece coordinate systems and workholding boundaries. Before starting automatic execution, the setup operator must physically locate and secure the raw stock within a workpiece fixture. This requires verifying workholding clearance, checking chuck jaws, and calibrating workpiece zero offsets on the setup screen to prevent tool path deviation.

Command Structure

Activation of coordinate system rotation requires the programmer to specify the rotation center and the rotation angle. For milling operations on machining centers, this is generally commanded via G68 or a programmable rotation frame ROT. When these commands are executed, the controller translates subsequent motion coordinates along the rotated axes. This enables programming contours relative to the feature's local orientation rather than the global machine axes.

The rotation angle R or RPL defines the orientation shift in degrees, where counterclockwise movements are treated as positive angles and clockwise movements are treated as negative angles. If the rotation center coordinates are omitted, the controller defaults to the tool's current position at the moment of activation. Deactivation is managed by executing G69 or resetting the active rotation frame, which restores the standard workpiece coordinate system.

When integrating coordinate rotation with custom macro cycles, programmers can transfer coordinate variables dynamically. You can use the non-modal macro call G65 to execute a macro program at a single position, or use the modal macro call G66 to automatically call the macro after each motion block. To deactivate modal macro calls after completing the rotated machining features, command the modal macro call cancel G67.

Fanuc:
G68 X__ Y__ R__ ;
G69 ;

Siemens: ROT X__ Y__ Z__ ; ROT RPL=__ ; AROT X__ Y__ Z__ ; AROT RPL=__ ; ROTS Y__ Z__ ;

Mitsubishi Machining Center: G68 X__ Y__ R__ ; G69 ;

Mitsubishi Lathe: G68.1 X__ Z__ R__ ; G69.1 ;

Address / VariableDescriptionSupported Brands
X, Y, ZAbsolute coordinate values of the rotation center on the selected working plane. If omitted, defaults to the current tool position.Fanuc, Siemens, Mitsubishi
RRotation angle specified in degrees. Positive is counterclockwise, negative is clockwise.Fanuc, Mitsubishi
RPLRotation angle within the active plane (RPL=degrees).Siemens
I, J, KDirection vectors of the rotation axis for three-dimensional coordinate conversion.Mitsubishi
,ESelects coordinate system in lathe mode (0 for rotated, 1 for pre-rotation).Mitsubishi

Brand Applications

Fanuc

On Fanuc systems, coordinate rotation is modal and belongs to G-code Group 16. Trajectory calculations for unspecified axes are controlled by Parameter No. 11600 Bit 5 (AX1), while G-code group settings for single-direction positioning are handled by Parameter No. 5431 Bit 0 (MDL).

To initiate rotation on the XY plane, program G68 X__ Y__ R__ ; where X and Y are rotation center coordinates and R is the angle. Cancel coordinate rotation using G69 ;.

CategoryIdentifier / VersionDescription / Trigger Condition
ParameterParameter No. 11600 Bit 5 (AX1)Calculates unspecified axis motion: 0 (pre-rotated calculation) or 1 (rotated coordinate calculation).
ParameterParameter No. 5431 Bit 0 (MDL)Modal group assignment for single-direction positioning: 0 (Group 00) or 1 (Group 01).
ParameterParameter No. 19625Maximum number of look-ahead blocks read in compensation mode.
Alarm CodeAlarm PS0508G CODE TO NEED G90(PAC) - Triggered when parallel axes do not share the active coordinate system. Fix by commanding G90 in the preceding block.
Alarm CodeAlarm PS0082G37 SPECIFIED WITH T CODE - Tool offset change specified during tool length measurement.
Alarm CodeAlarm PS0157Cutter radius compensation direction reversal. Fix by changing compensation direction in G00 blocks.
Version DifferenceLegacy FS16i/18i/21iResolves unspecified axes differently; modern series emulate this using Parameter No. 11600 AX1 set to 1.

Reversing the direction of cutter compensation (G41/G42) while the tool is engaged in cutting feed will immediately trigger Alarm PS0157. Always execute tool offset changes outside the material to prevent scrap parts and hard collisions.

Siemens

Siemens SINUMERIK controls manage coordinate rotation using programmable frame rotations under G Group 3. Workpiece alignment and tool orientation resets are configured by MD 20150 $MC_GCODE_RESET_VALUES[1] and MD 20150 $MC_GCODE_RESET_VALUES[2].

Active rotations are programmed using ROT RPL=__ ; for absolute plane rotation or AROT RPL=__ ; for additive plane rotation. Spatial orientation uses solid angles through ROTS Y__ Z__ ;.

CategoryIdentifier / VersionDescription / Trigger Condition
ParameterMD 18800 $MN_MM_EXTERN_LANGUAGESet to 1 to enable the external NC language compiler for legacy ISO G68/G69 processing.
ParameterMD 10604 $MC_WALIM_GEOAX_CHANGE_MODEPreserves or deactivates active working area limitations during geometry axis switchover.
ParameterMD 20150 $MC_GCODE_RESET_VALUES[1] = 2Configures WCS alignment frame reset state (PAROT).
ParameterMD 20150 $MC_GCODE_RESET_VALUES[2] = 1Configures tool orientation frame rotation reset state (TOROTOF).
ParameterMD 20150 $MC_GCODE_RESET_VALUES[3] = 1Configures tool length compensation reset behavior (TCOABS).
Alarm CodeAlarm 61800External CNC system missing - Occurs during G291 compilation if MD 18800 is not configured.
Alarm CodeAlarm 61811ISO axis identifier not permitted - Triggered by invalid axis designations in the block.
Alarm CodeAlarm 14800Programmed path velocity is less than or equal to zero - Travel block executed with F0.
Version DifferenceSINUMERIK 802D sl vs. 840D slOn 802D sl, MD 10604 is locked, and advanced options like CYCLE800 are omitted.

Attempting to compile legacy G68/G69 commands on Siemens controls without configuring MD 18800 to 1 will generate Alarm 61800. Ensure the external language compiler is enabled before executing legacy ISO programs.

Mitsubishi

Mitsubishi systems utilize modal coordinate rotation under G-code Group 16. Single-axis movement calculations after rotation start are dictated by Parameter #19003, and reset status persistence is controlled by Parameter #1151.

Machining center programs use G68 X__ Y__ R__ ; to rotate coordinates and G69 ; to cancel. Lathe programs use G68.1 X__ Z__ R__ ; and cancel with G69.1 ;.

CategoryIdentifier / VersionDescription / Trigger Condition
ParameterParameter #19003 PRG coord rot typeMotion calculation on single axis startup: 0 (moves only commanded axis) or 1 (virtually rotates start point).
ParameterParameter #1151 rstintControls modal Group 16 reset persistence: 0 (retain modals) or 1 (reset state on startup).
ParameterParameter #1210 RstGmd/bitFModal G-code reset setting for Group 16.
ParameterParameter #1561 3DcdcDisplay absolute coordinate counters in the rotated frame (0 or 1).
ParameterParameter #1599 3DEndPointErrMaximum permissible end point deviation error during 3D conversion.
Alarm CodeProgram Error (P260)Coordinate rotation disabled in parameters, or 3D conversion option missing.
Alarm CodeProgram Error (P111)Plane selection code (G17/G18/G19) commanded while coordinate rotation is active.
Alarm CodeProgram Error (P70) / P71Arc end point deviation large - Circular arc commanded as the first block after G68. Fix by using a linear move first.
Alarm CodeProgram Error (P34)Workpiece coordinate preset (G92.1) commanded during rotation mode.
Version DifferenceLathe vs Machining CenterLathes use G68.1 / G69.1 to avoid conflicting with mirror image; machining centers use G68 / G69.
Version DifferenceM800/M80 Series (D4 or earlier)Triggers Program Error (P438) if G52 is programmed while G54.1 Pn is active. Later versions remove this.

Commanding G92.1 workpiece coordinate preset while coordinate rotation is active will immediately trigger Program Error (P34). Workpiece origin offsets must be preset prior to initiating G68 or G68.1 rotation blocks.

Brand Comparison

TopicFanucSiemensMitsubishi
Syntax / AddressG68 X__ Y__ R__ (milling), cancel with G69ROT / AROT (native), G68 / G69 (ISO Dialect G291 mode)G68 X__ Y__ R__ (M-system), G68.1 X__ Z__ R__ (L-system)
Unspecified Axis BehaviorControlled via AX1 (Parameter 11600 Bit 5)Handled by dynamic frame updatesControlled via Parameter #19003 (virtual rotation toggle)
Additive RotationUses G91 incremental angleUses separate AROT / AROTS commandsUses G91 incremental angle
Spatial Rotation— (no source)Supported using Solid Angles (ROTS / AROTS / CROTS)— (no source)
Reverse Tracing (G127)— (no source)Resets zero offsets on reverse runDynamically tracks and maintains active rotations under G127 reverse run
Bimodal Switch Compiler— (no source)Requires G291 toggle for legacy ISO G68/G69Switch dynamically between M-system and L-system via G188/G189

Technical Analysis

Program-driven coordinate rotation and frame handling exhibit clear architectural differences across Fanuc, Siemens, and Mitsubishi controls during milling operations.

First, Fanuc maps coordinate system rotation to standard G68 and G69 modal G-code Group 16 codes, enforcing a strict parallel axis coordination lock (Alarm PS0508) during coordinate rotation startup. This requires a G90 absolute command in the preceding block to synchronize parallel axes. To control unspecified axis trajectories during rotation, Fanuc utilizes Parameter No. 11600 Bit 5 (AX1), which toggles calculations between legacy FS16i/18i/21i-compatible specifications and modern calculations.

Second, Siemens separates absolute and additive rotations into distinct, explicit commands. While Fanuc and Mitsubishi use a single modal G68 code and switch between absolute or incremental rotation center inputs using G90/G91, Siemens utilizes completely separate preparatory frame commands (ROT for absolute substituting rotation and AROT for additive rotation). This frame-based architecture prevents accidental coordinate accumulations. Siemens also natively supports spatial orientation rotation using Solid Angles (ROTS/AROTS/CROTS) to orient a machining plane in space relative to active work offsets (G54 to G599).

Third, Mitsubishi dynamically integrates G68/G68.1 coordinate rotations with its manual arbitrary reverse run (G127) function. When manual arbitrary reverse run is active, the operator can manually turn the handwheel backward to retract the tool. Mitsubishi's motion kernel tracks and maintains active coordinate rotations and tool compensations using its specialized modal information storage block, preventing axis drift. Mitsubishi also integrates coordinate rotation with a bimodal Program Format Switch compiler (G188/G189) to dynamically switch between machining center and lathe G-code formats. For unspecified axes, Parameter #19003 determines whether single-axis motion projects relative to the pre-rotation system (setting 0) or calculates a virtually rotated start point (setting 1).

Program Examples

Fanuc G-Code Example

N10 G92 X0 Y0 G69 G01 ;
N20 G42 G90 X1000 Y1000 F1000 D01 ;
N30 G68 R-30000 ;
N40 G91 X2000 ;

Dry run execution analysis: The operator activates single-block mode and sets the feedrate override to a low value with the spindle off. Block N10 cancels any active coordinate rotation and resets the workpiece coordinates. Block N20 absolute positioning establishes coordinate zero reference at (1000, 1000) and enables cutter radius compensation right (G42) with tool offset D01. Block N30 initiates coordinate rotation ON by −30.000 degrees (30 degrees clockwise) around the current tool position (1000, 1000). Block N40 commands an incremental movement of 2.000 mm along the X-axis. Due to active rotation, the controller calculates the toolpath trajectory along the rotated axis, and the machine axes interpolate X and Y simultaneously to move the tool to the rotated coordinates.

Siemens SINUMERIK Example

N10 G17 G54 G00 X0 Y0 Z10 ;
N20 ROT RPL=45 ;
N30 G01 X50 Y0 F1000 ;
N40 AROT Y30 ;
N50 AROTS Y30 Z90 ;

Dry run execution analysis: The operator initiates the path check. Block N10 selects the XY working plane (G17), activates the settable work offset G54, and positions the tool to (0, 0, 10) in rapid traverse. Block N20 applies absolute coordinate rotation (ROT) on the XY plane by 45 degrees counterclockwise (RPL=45). Block N30 commands a linear feed rate movement of 50 mm along the rotated X-axis, meaning the machine interpolates both X and Y axes to move the cutter to a physical coordinate position. Block N40 adds an additive rotation of 30 degrees around the Y-axis. Block N50 applies an additive spatial frame rotation (AROTS) around the Y and Z axes using solid angles, updating the active orientation frame dynamically.

Mitsubishi G-Code Example

N10 G17 G90 G00 X0 Y0 ;
N20 G68 X100.0 Y100.0 R45.0 ;
N30 G01 X200.0 Y0 F1000 ;
N40 G69 ;
N50 G68.1 X100.0 Z0 R60.0 ;

Dry run execution analysis: The operator monitors axis counters on the screen. Block N10 selects the XY working plane and absolute programming (G90) to position the tool to (0, 0). Block N20 activates coordinate rotation ON by 45 degrees counterclockwise about the absolute center (100.0, 100.0). Block N30 commands a linear feed block of 200.0 mm along X. The tool interpolates along the rotated coordinate plane. Block N40 cancels the rotation, restoring default local coordinates. Block N50 executes lathe coordinate rotation ON on the selected ZX plane by 60 degrees about (100.0, 0), setting up the lathe system rotation.

Error Analysis

BrandAlarm CodeTrigger ConditionOperator SymptomRoot Cause / Fix
FanucAlarm PS0508Parallel axes configured in the system do not share the active workpiece coordinate system.The controller halts execution, axes stop moving, and the alarm light flashes.Specify G90 absolute command for all parallel axes in the block immediately preceding G68.
FanucAlarm PS0157Tool path command causes a reversal of the cutter compensation direction while engaged in feed.Machine halts feed immediately, and Alarm PS0157 is displayed on the screen.Re-program direction changes only within rapid traverse G00 blocks, or use G53 to temporarily suppress compensation vectors.
SiemensAlarm 61800ISO Dialect Mode (G291) is commanded when the external language option is not enabled.The CNC generates Alarm 61800 "External CNC system missing" and stops cycle execution.Configure machine data parameter MD 18800 ($MN_MM_EXTERN_LANGUAGE) to 1 to enable the compiler.
SiemensAlarm 14800Travel block is executed with a programmed path velocity less than or equal to zero (F0).The system halts, display shows Alarm 14800 "programmed path velocity is less than or equal to zero".Specify a valid feedrate F greater than zero in the block or activate fixed feedrates.
MitsubishiProgram Error (P111)Plane selection code (G17, G18, or G19) is commanded while coordinate rotation mode is active.The program execution halts with a preprocessor error code on the control display.Cancel coordinate rotation with G69 or G69.1 before modifying working planes.
MitsubishiProgram Error (P70) / P71Circular interpolation arc (G02 or G03) commanded as the first motion block immediately following G68.The feed stops, displaying "Arc end point deviation large" error on the HMI.Insert a linear motion block (G00 or G01) first to align the start and end vectors before commanding arcs.

Application Note

Catastrophic hard collisions, shattered cutting tools, and ruined scrap parts occur when setup operators run G68 or G68.1 coordinate rotations with miscalibrated workholding coordinates. Before initiating automatic execution, the setup operator must physically secure the raw stock in the workpiece workholding, such as clamping it in a machine vise jaw, securing it in a lathe spindle chuck, or mounting it on table clamps. If the rotation center is mathematically offset or the workpiece coordinate zero offset is incorrectly calibrated on the setup screen, the spindle or indexing tool turret will travel along a dangerously shifted trajectory. The tool nose, post, or turret head can easily bypass soft travel limits and drive the cutting tool directly into physical components, converting the workpiece into a ruined scrap part and throwing high-current overload alarm codes. Operators must run dry runs in single-block mode with the spindle off to visually verify that the rotated tool envelope clears all physical structures before starting production.

Related Command Network

  • G69 / G69.1: Used to cancel modal coordinate rotation and restore the standard workpiece coordinate system.
  • G51 / SCALE: Integrates with coordinate rotation by scaling center coordinates, though the rotation angle remains completely unscaled.
  • TRANS / ATRANS: Provides programmable absolute and additive zero offsets that can be combined with rotation frames in Siemens systems.
  • G53: Selects the machine coordinate system and temporarily suppresses active tool compensation vectors to prevent crashes during rotation setup.
  • G127: Mitsubishi manual arbitrary reverse run function that dynamically tracks active coordinate rotations and tool compensations during handwheel rollback.

Conclusion

Successful implementation of coordinate system rotation relies on precise parameter configuration, correct command selection, and careful workholding verification. By standardizing coordinate rotation syntax across programs and verifying tool envelopes through single-block dry runs, machine shops can safely execute complex multi-axis geometries while protecting spindle assemblies and workholding fixtures from collision damage.

FAQ

How does Parameter No. 11600 AX1 affect coordinate rotation on Fanuc systems?

This parameter determines whether unspecified axis coordinates are calculated in the pre-rotation system (setting 0) or the rotated coordinate system (setting 1). To prevent unexpected axis drift when executing legacy programs, operators should verify that AX1 is configured according to the original programmer's system setup.

Why does commanding G02 or G03 immediately after G68 trigger a Program Error (P70) on Mitsubishi controls?

A circular arc command immediately following coordinate rotation start causes an arc end point deviation because the tool has not yet established a linear starting vector relative to the rotated plane. Programmers must write a linear G00 or G01 move immediately after the G68 block to resolve coordinates before invoking circular paths.

How can Siemens ROT and AROT commands be programmed without losing zero offset frames?

The ROT command is absolute and completely replaces any active rotations or translations, while AROT is additive and overlays rotation onto the existing frame. To avoid accidental frame cancellations, programmers must use AROT for relative geometry shifts and reserve ROT for resetting the base alignment.

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