G68 and G69: Practical Guide to 2D Coordinate Rotation in CNC
Master G68 & G69 coordinate rotation on Fanuc, Siemens, and Mitsubishi CNC systems. Learn critical parameters, syntax, and how to prevent hard collisions.
Introduction to 2D Coordinate Rotation
A standard manual jog operation during a mid-cycle recovery on a Mitsubishi CNC can immediately plunge a high-speed milling cutter into a physical vise jaw, clamp, chuck, or turret, causing a severe servo overload alarm code and a devastating hard collision. When an operator stops the machining cycle midway through a rotated G68 feature due to tool breakage or a power outage, manual feed by default operates in the standard machine coordinate system rather than the rotated grid. Jogging what appears to be a safe, positive retract along the Z-axis actually moves the tool along a diagonal path, instantly destroying both the spindle alignment and the workpiece to create a ruined scrap part. This mechanical disaster highlights the critical necessity of understanding 2D coordinate rotation (G68 and G69) and its deep parameter-driven relationships across different control systems.
Technical Summary of G68 and G69
| Technical Specification | Details |
|---|---|
| Command Codes | G68 (Milling / Rotation ON), G69 (Rotation cancel) G68.1 (Lathe Rotation ON), G69.1 (Lathe cancel) |
| Modal Group | Modal. Group 16 in Fanuc and Siemens (milling); Group 04 on Fanuc lathes (mirror/balance). |
| Supported Brands | Fanuc, Siemens, Mitsubishi |
| Critical Parameters | Fanuc Parameter No. 5410 (default angle), No. 11600 (AX1 - single-axis calculation) Siemens SD42150 (default angle), MD28081 (base frames) Mitsubishi Parameter #19003 (PRG coord rot type), Parameter #1270 (R omission behavior) |
| Main Constraint | Plane selection G17/G18/G19 cannot be programmed in the same NC block as G68. Active coordinate rotation must be canceled with G69/G69.1 before changing working planes, initiating tool changes, or executing polar/cylindrical interpolation. |
Quick Read: Key Constraints and Decisions
- Plane Isolation: Establish your working plane (G17, G18, or G19) in a separate block before calling G68 to avoid immediate syntax faults.
- Lathe Commands: Use G68.1 and G69.1 for coordinate rotation on Fanuc and Mitsubishi lathe systems; standard G68/G69 on lathes is reserved for mirror imaging or balance cutting.
- First Linear Block: Program a linear positioning command (G00 or G01) immediately following G68/G68.1 to synchronize the physical axis positions with the new rotated grid before executing any circular interpolation (G02/G03).
- Default Angles: Verify parameters (Fanuc 5410, Siemens SD42150, Mitsubishi #1270) when omitting the R address, as controls automatically pull predefined background angles.
- Safety Retraction: Always cancel rotation (G69) before cancelling tool length compensation (G49) on Fanuc systems to prevent triggering alarm PS0049, or use a G28 reference return to bypass the alarm trap.
- Manual Jog Recovery: Switch the manual jog coordinates using the YD14 PLC signal on Mitsubishi systems during mid-cycle recovery to avoid diagonal tool movements.
Basic Concepts of Coordinate Rotation
The practical programming effect of utilizing 2D coordinate rotation (G68 and G69) is the ability to shift the CNC's internal mathematical grid to machine complex, angled features—such as bolt-hole patterns, angled pockets, or off-center tapping—without requiring the programmer to manually recalculate the trigonometry for every single movement block. This mathematical rotation allows complex part geometries to be processed dynamically without needing a CAM system to recalculate hundreds of individual endpoint coordinates.
However, programmers and operators must actively watch their modal plane selections and the mathematical sequence of single-axis absolute commands. When a coordinate system is rotated, any movement command in an unspecified axis can be interpreted differently depending on deeply embedded parameters. For instance, evaluating a single-axis absolute coordinate before or after applying the rotation matrix determines whether the tool moves in a straight expected line or swings into a dangerous diagonal vector.
For safe use during active rotation, maintaining a strict hierarchy between coordinate rotation and tool offsets is vital. Because the physical tool vectors mathematically shift during rotation, abruptly severing tool length compensation or changing interpolation planes while the rotation matrix is actively governing the axes will corrupt the toolpath, resulting in a physical crash or halting the machine with a hard system alarm.
Command Structure and Syntax
The syntax for coordinate rotation is designed around the active plane selection, ensuring that the control knows which axes to rotate. On standard machining centers (milling), the primary working plane is typically the X-Y plane (G17), and the coordinate rotation is initiated by the modal command G68. When G68 is called, the CNC establishes a temporary rotated coordinate system based on a specified rotation center and a defined angular displacement, which remains active until it is explicitly turned off by the cancel code G69.
On lathe and turning environments, the G-code assignments are segregated to prevent multi-path interference. For example, lathes run G68.1 to turn coordinate rotation ON, using the Z-X plane (G18), and G69.1 to cancel the mode. The rotation center coordinates must be programmed as absolute values, and any attempt to use incremental coordinates for the center will cause the CNC to ignore the incremental mode, resulting in a major coordinate shift.
; Standard Milling (X-Y Plane) G17 G68 X[X-center] Y[Y-center] R[Angle] ; ... (Rotated path) G69 ;
; Lathe Systems (Z-X Plane) G18 G68.1 X[X-center] Z[Z-center] R[Angle] ; ... (Rotated lathe path) G69.1 ;
| Address / Argument | Description | Usage Note |
|---|---|---|
| X, Y, Z | Rotation center coordinates. Represents the absolute coordinates of the pivot point. | If omitted in Siemens, the current actual position is used. Fanuc and Mitsubishi require explicit center definition. |
| R | Rotation angle (angular displacement). Positive values indicate counter-clockwise (CCW) rotation. | Specified in degrees (usually with a minimum command unit of 0.001 degrees). If omitted, default values from parameters are applied. |
| I, J, K | Spatial vector coordinates (Siemens 3D only). | Defines the axis vector in 3D space around which the rotation occurs. Must be non-zero to avoid Alarm 12560. |
Brand-Specific Applications and Parameters
Fanuc
Fanuc systems manage coordinate rotation through dedicated parameters. Parameter No. 5410 defines the default angular displacement applied when the R address is omitted in the G68 block. The mathematical sequence of single-axis absolute commands is controlled by Parameter No. 11600 (Bit 5 - AX1), which determines whether the CNC calculates unspecified axes in the un-rotated coordinate system or applies the rotation matrix first. Parameter No. 5400 (Bit 0 - RIN) also dictates whether the coordinate rotation angle command (R) is strictly specified by an absolute method or if it dynamically follows absolute/incremental modes via G90/G91, while Parameter No. 11630 (Bit 0 - FRD) defines the minimum command unit of the rotation angle as either 0.001 degree or 0.00001 degree.
To activate coordinate rotation at an angle of 45 degrees around X0 Y0, the G-code block is programmed as: G17 G68 X0.0 Y0.0 R45.0 ;. The cancel block is programmed simply as G69 ;.
| Parameter | Function | Alarms / Versions |
|---|---|---|
| Parameter No. 5410 | Sets default angle when R is omitted (-360000 to 360000 in 0.001 deg). | M Series: uses G68/G69. T Series: uses G68.1/G69.1 to prevent twin-turret mirror conflict. |
| Parameter No. 11600 (Bit 5) | AX1: 0 = calculate unrotated first; 1 = rotate first. | Alarm PS0049: Triggered when G49 is issued while G68 is still active. |
| Parameter No. 5400 (Bit 0) | RIN: 0 = strictly absolute R; 1 = absolute/incremental via G90/G91. | Alarm PS5462: local/workpiece coordinate shifts (G52/G92) inside active tilted plane. |
Siemens
Siemens controls map external ISO coordinate rotation directly into their native frame management. The system relies on machine data MD28081 ($MC_MM_NUM_BASE_FRAMES), which must be set to a value of at least 3 to permit coordinate rotation mapping. If the R address is omitted in a G68 block, the Siemens control retrieves a predefined fallback angle from setting data SD42150 ($SA_DEFAULT_ROT_FACTOR_R). Operators must also ensure the spatial vector definition during 3D rotations is mathematically valid; programming a zero-length vector instantly paralyzes the block preparation and outputs an alarm code (12560).
A 3D spatial rotation around X0 Y0 Z0 with a 90-degree angle using a vector along the Y axis (J=1) is written as: G68 X0 Y0 Z0 I0 J1 K0 R90 ;. A standard 2D rotation uses G17 G68 X10.0 Y10.0 R45.0 ;.
| Parameter | Function | Alarms / Versions |
|---|---|---|
| SD42150 $SA_DEFAULT_ROT_FACTOR_R | Fallback default rotation angle when R is omitted (-360.000 to 360.000 deg). | ISO Dialect M: G68 performs standard coordinate rotation. |
| MD28081 $MC_MM_NUM_BASE_FRAMES | Defines minimum background frames required (must be >= 3). | ISO Dialect T: G68 morphs into double slide or double turret processing. |
| SD42162 $SC_EXTERN_DOUBLE_TURRET_DIST | Defines linked tool distance for double turret mode. | Alarm 12728: Triggered if double turret is activated but distance is 0. |
Mitsubishi
Mitsubishi systems offer highly granular control over axis behaviors immediately following rotation. Parameter #19003 (PRG coord rot type) dictates whether the first axis movement after G68 calculates its endpoint from the unrotated local start point or from a virtually rotated position. Parameter #1270 (ext06/bit5) also governs whether omitting the rotation angle R uses the last modal value or the default value in Parameter #8081, while Parameter #8082 (G68.1 R INC) enables R to be commanded incrementally on Lathe systems when set to 1.
On a Mitsubishi lathe (L System), the rotation is commanded around X100.0 Z0.0 with a 60-degree angle using: G68.1 X100. Z0. R60. ;. It is subsequently canceled via G69.1 ;.
| Parameter | Function | Alarms / Versions |
|---|---|---|
| Parameter #19003 | PRG coord rot type: 0 = unrotated start point; 1 = virtually rotated start point. | Alarm P111: Plane selection (G17/G18/G19) commanded during active G68. |
| Parameter #1270 (Bit 5) | ext06: 0 = modal R value; 1 = uses Parameter #8081 default value. | Alarms P70/P71: Major arc end deviation or center calculation error if first block is circular. |
| Parameter #8082 | G68.1 R INC: 0 = absolute R; 1 = incremental R on Lathes. | Alarms P481/P485: Cylindrical/polar interpolation mixed with coordinate rotation. |
Cross-Brand Comparison
| Topic | Fanuc | Siemens | Mitsubishi |
|---|---|---|---|
| Lathe command | G68.1 / G69.1 | G68 / G69 (swaps behavior in ISO Dialect T) | G68.1 / G69.1 |
| Missing rotation angle R | Uses default value from Parameter No. 5410 | Uses default value from SD42150 $SA_DEFAULT_ROT_FACTOR_R | Uses last commanded value or Parameter #8081 based on parameter #1270 |
| 1-axis absolute calculation | Configurable via Parameter 11600 (Bit 5 - AX1) | Natively calculated in rotated frames | Configurable via Parameter #19003 |
| Separate pallet misalignment compensation | Typically done inside standard G68 or coordinate settings | Chained frames management in background base frames | Dedicated parameter-driven function G10 I_ J_ / K_ |
| 3D Rotation | Standard coordinate rotation using I, J, K vector on G68 | Support for spatial pivot vector I, J, K | Supported via standard programming/coordinates |
| Tool offset interactions | Strictly checks tool length cancel G49 sequence (alarm PS0049) | Integrated natively with background base frames | Arc center mismatch tracking checks (alarm P70/P71) |
In-Depth Technical Analysis
The architectural differences in coordinate rotation management reveal distinct design philosophies between Fanuc, Siemens, and Mitsubishi. Fanuc enforces a rigid G-code separation between its lathe and milling environments to prevent catastrophic multi-path collisions. By forcing lathes to use G68.1 for rotation, it entirely isolates the standard G68 command so that it can be safely used to synchronize the timing of a double turret in balance cutting mode. Fanuc strictly ties its tool length compensation memory into the rotation state matrix; rather than allowing a programmer to arbitrarily drop tool offsets during an active rotation and risking a skewed toolpath, the CNC actively monitors the cancellation sequence and throws a hard syntax alarm if the hierarchy is violated.
Siemens distinguishes its coordinate rotation architecture through three advanced behavioral traits. First, it features dynamic fallback parameterization; if a programmer issues a G68 command but omits the R address, the control does not fault out, but instead automatically pulls a predefined default angle directly from setting data SD42150 ($SA_DEFAULT_ROT_FACTOR_R). Second, Siemens structurally maps external ISO rotations natively into its backend frame management. Rather than isolating the ISO coordinate rotation in an external buffer, Siemens writes the G68 shift directly into the channel-specific basic frame 2 (or frame 3 for chained rotations), ensuring that the rotated plane interacts perfectly with native Siemens zero offsets and transformations. Siemens employs an extreme form of dialect-dependent function swapping; while G68 acts as a pure geometric rotation algorithm for milling, it natively morphs into a complex, hardware-level channel synchronization protocol for double-slide turning, allowing a single G-code to serve completely disparate machining technologies based on the active ISO dialect.
Mitsubishi controls exhibit several distinct behaviors that clearly separate them from competing CNC brands regarding coordinate rotation. First, Mitsubishi strictly divides programmatic rotation from hardware misalignment compensation. While G68 dynamically rotates the tool path for part features, Mitsubishi provides a completely separate function—Coordinate Rotation Input by Parameter (G10 I_ J_ / K_)—designed exclusively to rotate the global workpiece coordinate system to mathematically compensate for a physically crooked fixture or pallet, leaving the G68 command free for feature-level programming. Second, Mitsubishi features the highly granular #19003 PRG coord rot type parameter, which uniquely allows the programmer to control whether the first movement block after a G68 command calculates its end point by virtually swinging the current tool position through the rotation angle, or by ignoring the current position and strictly driving toward the new rotated local grid. Mitsubishi rigidly segregates the G-code assignments between machine kinematics; M-systems natively use G68/G69 for rotation, but L-systems protect G68 exclusively for twin-turret mirror imaging, forcing programmers to adapt to G68.1/G69.1 on lathes to prevent disastrous twin-spindle path inversions.
Program Examples and Dry Run Walkthroughs
Fanuc Example
G17 G90 G54 ;
G00 X0 Y0 Z10.0 ;
G68 X0.0 Y0.0 R45.0 ;
G01 X10.0 Y10.0 F6000 ;
G69 ;
During a dry run of the Fanuc block, the machine will first position to the unrotated coordinate X0 Y0. When the control executes G68, the rotation center is set at X0.0 Y0.0 and the coordinate grid is virtually swung 45 degrees counterclockwise. When the subsequent G01 absolute X10.0 Y10.0 is read, the CNC evaluates the active rotation and interpolates both axes simultaneously. The operator will observe the machine move along a 45-degree vector, positioning the physical axes at X0 Y14.142. Once G69 is executed, the coordinate grid is restored to its default unrotated orientation, and subsequent absolute moves will map directly to the original part zero.
Siemens Example
G17 G90 G54 ;
G00 X10.0 Y10.0 Z10.0 ;
G68 X10.0 Y10.0 R45.0 ;
G01 X20.0 Y10.0 F150 ;
G69 ;
During a dry run of this Siemens block, the machine positions to the coordinates X10.0 Y10.0, which acts as the physical rotation center. Upon executing G68, the rotation center is registered at this point with a 45-degree angle. When the G01 X20.0 Y10.0 command is processed, the control calculates the position in the rotated system. Instead of moving purely along the physical X-axis to X20.0, the machine interpolates both the X and Y axes to track a 45-degree line. The operator will see the machine move to physical coordinates X17.071 Y17.071. After G69 cancels the rotation, the base frames are cleared, returning the coordinate system to its standard, non-rotated state.
Mitsubishi Example
G17 G90 G54 ;
G00 X0 Y0 Z10.0 ;
G68 X40.0 Y0.0 R90.0 ;
G01 X40.0 Y20.0 F150 ;
G69 ;
During a dry run of the Mitsubishi program, the spindle positions to the coordinate X0 Y0. When the G68 block is executed, the rotation center is set at X40.0 Y0.0 with a 90-degree counterclockwise rotation. When G01 X40.0 Y20.0 is called, the machine calculates the movement relative to the rotated grid centered at X40.0 Y0.0. The operator will see the machine feed from X0 Y0 to the physical coordinates X20.0 Y0.0 (a 90-degree rotation of the coordinate point X40.0 Y20.0 around X40.0 Y0.0). Calling G69 cancels the rotation, restoring the standard machine grid.
Error and Alarm Analysis
| Brand | Alarm Code | Trigger Condition | Operator Symptom | Root Cause / Fix |
|---|---|---|---|---|
| Fanuc | PS0049 | G49 tool length cancel issued during active coordinate rotation (G68). | Machine stops instantly; CRT screen displays alarm PS0049. | Issue G69 to cancel rotation prior to G49, or use a G28 reference return. |
| Fanuc | PS5462 | Local or workpiece coordinate shifts (G52/G92) commanded during active tilted working plane indexing. | Machine stops, halts program execution, throws PS5462 alarm. | Cancel compensation vector or do not use local shifts in Tilted Working Plane mode. |
| Siemens | Alarm 12560 | 3D rotation called with zero-length spatial vector (e.g., I0 J0 K0). | CNC block preparation is paralyzed; the machine halts immediately and displays Alarm 12560. | Define a mathematically non-zero spatial vector for the pivot axis. |
| Siemens | Alarm 12728 | G68 double turret processing activated but physical offset SD42162 is 0. | Program execution aborts immediately with Alarm 12728. | Parameterize the physical tool offset distance correctly in setting data SD42162. |
| Mitsubishi | Alarm P111 | Plane selection code (G17, G18, G19) commanded during active G68. | Controller faults, displaying P111 and stopping spindle/movement. | Establish the plane selection before calling the G68 block. |
| Mitsubishi | Alarm P70 / P71 | Arc shape (G02/G03) commanded immediately after G68 while #19003 is 1. | Controller aborts the cycle, displaying P70 or P71. | Program a linear positioning block (G00/G01) immediately after G68 to synchronize coordinates. |
| Mitsubishi | Alarm P481 / P485 | Cylindrical/polar interpolation commanded during G68, or vice versa. | Axis movement stops immediately; Alarm P481 or P485 is displayed. | Avoid mixing coordinate rotation with cylindrical/polar interpolation modes. |
Application Note: Preventing Shop Floor Collisions
A ruined carbide cutter and a fractured spindle casing are the immediate consequences of performing an unaligned manual jog recovery on a Mitsubishi system after a mid-cycle tool breakage. When an operator stops the cycle within a rotated grid and attempts to manually clear the tool, the axes default to unrotated machine space. Jogging the tool along what is visually expected to be a straight exit vector instead drives it diagonally, slamming the tool post directly into the vise jaw or fixture clamps at high force. To prevent this hard collision, operators must trigger the YD14 PLC signal (Manual feed coordinates switch) to dynamically align manual jog motions with the active G68 coordinate grid. This ensures that a manual retract moves the tool along the correct, safe physical vector, preserving the turret and avoiding the creation of scrap parts.
Related Command Network
- G17, G18, G19 (Plane Selection): These plane selection commands must be established in a separate block prior to calling G68 to define the active rotation plane.
- G43, G44, G49 (Tool Compensation): Tool length compensation commands must remain active during G68, and any cancellation (G49) must only be issued after coordinate rotation is canceled (G69) on Fanuc systems to prevent Alarm PS0049.
- G90, G91 (Absolute / Incremental): These codes dictate whether the rotation angle R is processed as an absolute coordinate or as an incremental angular displacement.
- G52, G92 (Local Offsets): Local coordinate system settings must be carefully sequenced; commanding these shifts during active rotation on Mitsubishi can result in severe path displacement.
- G28 (Reference Return): A reference position return can be programmed to safely retract the tool and bypass the tool compensation cancel alarm trap during an active G68 mode.
- For high-precision corner control during angled paths, combine rotation with the G60 exact stop command.
- When threading or tapping on angled planes, transition behaviors should be monitored alongside G62 and G63 tapping override rules.
- To execute complex rotational transformations dynamically via subprograms, call standard coordinate rotation within G65, G66, or G67 macro calls.
Conclusion
Successful deployment of G68 coordinate rotation relies on a rigorous combination of G-code sequencing and parameter discipline. Machine shops must map their control-specific parameters—such as Fanuc's AX1 bit, Siemens' base frames, or Mitsubishi's #19003 arc synchronization—into standard operating procedures before running rotated NC programs. Establishing a strict program template that enforces linear positioning blocks immediately after rotation activation, and isolating lathe systems via G68.1, provides an absolute defense against diagonal path deviation and hard collisions on the shop floor.
Frequently Asked Questions
Why does my CNC move diagonally when I command a single-axis absolute position under G68?
This unexpected diagonal trajectory occurs because the control evaluates the unspecified axis position in the un-rotated coordinate system first before applying the rotation matrix. On Fanuc systems, this behavior is governed by Parameter No. 11600 (Bit 5 - AX1); when set to 0, a single-axis command like X10.0 causes the machine to calculate the start point using the old Y coordinate, producing a diagonal vector. To prevent this, programmers must explicitly write both coordinates in the first positioning block after G68, or toggle the AX1 parameter to rotate the coordinate system first before evaluating the coordinates.
How do I resolve a PS0049 alarm code on a Fanuc control when canceling tool compensation?
The Fanuc PS0049 alarm is triggered because the CNC restricts canceling tool length compensation (G49) while coordinate rotation is still active. The control requires a strict command hierarchy where G69 (rotation cancel) must always be executed before G49 is called. To fix or prevent this alarm, modify your post-processor or G-code program to place the G69 command in a block preceding the G49 command, or use G28 to return to the reference position, which safely retracts the tool and bypasses the compensation cancel alarm trap.
Why does my Mitsubishi CNC trigger a P70 or P71 alarm on the first block after G68?
Mitsubishi controls trigger a P70 or P71 alarm if the very first command programmed after G68 is a circular interpolation (G02 or G03) while parameter #19003 is set to 1. In this state, the CNC rotates the start point virtually, causing the center coordinates of the arc to deviate mathematically and making the circle impossible to calculate. To resolve this, always insert a linear movement block (G00 or G01) immediately after the G68 command to synchronize the physical axis positions with the new rotated coordinate system before executing circular moves.
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 - 2005)
- Ö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
Siemens CYCLE800 G-Code: Swivel Planes & Tool Alignment
Master Siemens CYCLE800 for 3+2 axis machining. Learn plane swiveling, tool alignment, parameter setup, and how to troubleshoot Alarm 61190 and 61153.
Siemens CYCLE72 Contour Milling: Guide to Sinumerik Path Milling
Master Siemens CYCLE72 for contour milling on Sinumerik CNC controls. Learn parameter setup, avoid simulation alarm 61123, and prevent machine collisions.
Siemens CYCLE952 Contour Turning Cycle Programming Guide
Master Siemens CYCLE952 contour turning on Sinumerik CNC controls. Learn parameter lists, resolve Alarm 61051, and configure balance cutting.
Siemens SLOT1 and SLOT2 Slot Milling Cycles Programming Guide
Master slot milling on Siemens Sinumerik controls using SLOT1 and SLOT2 cycles. Learn parameter configurations, alarm 61000 prevention, and optimal tool paths.