G12.1 Polar Coordinate Interpolation Programming on CNC Lathes
Learn how to program G12.1 Polar Coordinate Interpolation on Fanuc, Siemens, and Mitsubishi CNC lathes to avoid turret collisions and Alarm 14800.
Introduction: Production Risks of Incorrect Polar Interpolation
Failing to verify spatial clearances during G12.1 face milling can drive the tool turret off-trajectory during rapid transitions, leading to a catastrophic hard collision where the turret plunges directly into the workpiece chuck or a table fixture clamp. Such high-impact events can shatter the tool spindle, crack the turret gears, and immediately result in a ruined scrap part. This production risk is a constant concern for programmers and operators setting up polar coordinate interpolation on CNC lathes. When virtual coordinate origin counters reset without pre-positioning or safety bounds, physical tool interference halts production. This guide outlines how to configure G12.1 sequences on Fanuc, Siemens, and Mitsubishi controls safely.
Technical Summary of G12.1 Polar Coordinate Interpolation
| Attribute | Specification |
|---|---|
| Command Code | G12.1 (Polar Coordinate Interpolation ON), G13.1 (Polar Coordinate Interpolation OFF) |
| Modal Group | Group 21 (Fanuc / Siemens / Mitsubishi Group 19 or 21) |
| Supported Brands | Fanuc, Siemens, Mitsubishi |
| Critical Parameters | Fanuc Parameter No. 5040 Bit 3, Siemens MD18800, Mitsubishi Parameter #1516 |
| Main Constraint | G12.1 and G13.1 must be programmed in independent blocks. Constant surface speed (G96) is mathematically incompatible. |
Quick Read: Core Constraints and Actions
- Pre-position the Rotary Axis: Index the C-axis to C0 before activating G12.1 to prevent rotational offsets and misaligned face contours.
- Maintain Feedrate Commands: Program a non-zero F-value immediately after G12.1 because the system forcibly switches from G95 (feed-per-revolution) to G94 (feed-per-minute).
- Cancel Cutter Compensation: Deactivate tool nose radius compensation (G41/G42) using G40 before calling G13.1 to avoid corruption of the look-ahead parser.
- Provide Double Clearance: Ensure approach and retraction coordinates exceed double the tool nose radius (four times on diameter programming) to prevent compensation alarms.
- Avoid Constant Surface Speed: Cancel G96 and switch to G97 constant RPM before entering polar coordinate mode to avoid coordinate preprocessor conflicts.
- Configure Barrier Envelopes: Enable Chuck and Tailstock Barriers (G22/G23) on the control panel to stop axis travel before physical collision occurs.
Basic Concepts of Polar Coordinate Interpolation
G12.1 polar coordinate interpolation allows programmers to program complex profiles on the face of a turned part as if they were standard flat Cartesian coordinates on a machining center. The preprocessor dynamically translates virtual flat commands into real synchronized linear and rotary axis movement pulses. This removes the need for complex trigonometric calculations to coordinate C-axis angles with X-axis movements.
When setting up and executing G12.1 profiles, strict discipline regarding feed rate modals and tool radius compensations must be maintained. Upon executing a G12.1 block, the control forcibly switches the feed modal to asynchronous feed per minute (G94), making any previous synchronous feed per revolution (G95) inactive. If no feedrate value F is declared within the G12.1 mode, the feedrate can drop to zero, immediately triggering an alarm and leaving a deep dwell mark on a ruined workpiece.
Command Structure and Syntax
The G12.1 preparatory command establishes a virtual coordinate plane on the workpiece face. In this mode, the rotary spindle axis (C-axis) acts as a virtual linear axis perpendicular to the physical linear X-axis, allowing standard Cartesian coordinates to define the tool path. The coordinate origin of the virtual plane is anchored to the workpiece zero point.
The G12.1 mode remains active until canceled by G13.1 or deactivated by a system reset. Both the activation and cancellation commands must be programmed in independent blocks, meaning no movement commands or other auxiliary functions can occupy the same block. This syntax isolation ensures the preprocessor can switch plane calculation modes safely.
On Fanuc and Siemens controls, the basic activation is G12.1; and deactivation is G13.1;. Mitsubishi controls support an extended syntax: G12.1 D_ E=_; where D specifies the hypothetical axis and E= assigns the physical rotary axis. Typical parameters that influence this behavior are detailed below.
| Brand | Parameter | Description |
|---|---|---|
| Fanuc | Parameter No. 5040 Bit 3 (TCT) | Active tool length compensation shift type |
| Fanuc | Parameter No. 5431 Bit 0 (MDL) | Modal group assignment of G60 |
| Fanuc | Parameter No. 0001 Bit 1 (FCV) | Legacy Series 15 program format switch |
| Siemens | MD18800 ($MN_MM_EXTERN_LANGUAGE) | Enables external ISO Dialect compiling system |
| Mitsubishi | Parameter #1516 mill_ax | Physical name of the rotary axis for milling |
| Mitsubishi | Parameter #1293 ext29/bit0 | Allows G95 synchronous feed to remain active |
Brand Applications: Fanuc, Siemens, and Mitsubishi
Fanuc
Fanuc systems manage polar coordinate interpolation via Group 21 modal codes, utilizing Parameter No. 5040 (TCT) for tool compensation shifts and Parameter No. 5431 (MDL) for G60 unidirectional modal group assignments.
A typical Fanuc activation block consists of G12.1; in an independent block, followed by Cartesian moves using X and C coordinates, and terminates with G13.1;.
| Type | Identifier | Description / Setting |
|---|---|---|
| Parameter | Parameter No. 0001 Bit 1 (FCV) | Switches interpreter compiler to legacy Series 15 program format (0 or 1) |
| Parameter | Parameter No. 1017 / No. 1019 | Defines rotation and diameter configuration per-axis (0 or 1) |
| Parameter | Parameter No. 1041 (I_inch) | Sets initial dimension unit (0 for metric, 1 for inch) |
| Alarm | Alarm PS0041 | Interference in G41/G42: start/end points identical under compensation |
| Alarm | Alarm PS0306 | Mismatch axis with CNR/CHF: invalid movement axis combination |
| Alarm | Alarm PS0050 | CHF/CNR not allowed in thread block: chamfer/rounding in threading |
| Alarm | Alarm PS0051 | Missing move after CNR/CHF: chamfer/rounding block not followed by motion |
| Alarm | Alarm PS0052 | Code is not G01 after CHF/CNR: chamfer/rounding block not followed by G01 |
| Alarm | Alarm PS0325 | Unavailable command is in shape program: invalid code in canned cycles |
| Alarm | Alarm 14800 | Programmed path velocity is less than or equal to zero |
Warning: Programming G90 on a Fanuc System A lathe initiates a turning cycle instead of absolute mode, which can cause unexpected tool movements.
Siemens
Siemens controls run G12.1 under ISO Dialect Mode via G291, requiring Machine Data MD18800 and option bit 19800 to compile the preparatory codes.
In ISO Dialect Mode, G12.1; activates TRANSMIT kinematic transformations, allowing coordinate moves like G01 G42 X40.0 C-20.0 F150; before cancelling via G13.1;.
| Type | Identifier | Description / Setting |
|---|---|---|
| Parameter | MD18800 ($MN_MM_EXTERN_LANGUAGE) | Enables external ISO Dialect compiling system (0 or 1) |
| Parameter | Option Bit 19800 ($MN_EXTERN_LANGUAGE) | Option parameter enabling external ISO Dialect compiling system (0 or 1) |
| Parameter | MD20050-20080 | Geometry axis assignments and channel-specific axis definitions |
| Alarm | Alarm 61815 | G40 not active: Tool radius compensation active during transformation call |
| Alarm | Alarm 61800 | External CNC system missing: MD18800 or 19800 parameter not set |
| Alarm | Alarm 14800 | Programmed path velocity is less than or equal to zero |
| Alarm | Alarm 61811 | ISO axis identifier not permitted: unmapped or impermissible ISO axis |
Warning: Attempting to call G12.1 while tool radius compensation (G41/G42) is active will trigger Alarm 61815 and immediately halt the turret.
Mitsubishi
Mitsubishi CNCs configure milling interpolation with Parameters #1516 and #1517, while Parameter #1293 dictates if G95 feed per revolution remains active.
Mitsubishi programs can declare the physical rotary axis dynamically using G12.1 D0 E=C;, contouring face features before terminating with G13.1;.
| Type | Identifier | Description / Setting |
|---|---|---|
| Parameter | Parameter #1516 mill_ax | Physical name of the rotary axis used for milling interpolation |
| Parameter | Parameter #1517 mill_c | Name of the hypothetical milling interpolation axis |
| Parameter | Parameter #8111 Milling Radius | Dictates if linear coordinate addresses follow radius or diameter programming |
| Parameter | Parameter #1533 mill_Pax | Linear coordinate axis to determine polar coordinate plane |
| Parameter | Parameter #1293 ext29/bit0 | Dictates if synchronous feed per revolution (G95) remains active |
| Parameter | Parameters #1026 to #1028 | Basic geometry axes I, J, K definition for coordinate conversions |
| Parameter | Parameter #1078 Decpt2 | Minimum command unit configuration (Type I or Type II) |
| Alarm | Program Error P32 | Coordinate value programmed after E= (e.g. E=C90.0) |
| Alarm | Program Error P33 | G12.1/G13.1 not written in independent block or missing comma delimiter |
| Alarm | Program Error P35 | Numerical value other than 0 or 1 written after D address |
| Alarm | Program Error P128 | Executing G120.1/G121 while G12.1 is active (on software version A8 or earlier) |
| Alarm | Program Error P481 | Executing tool length compensation G43/G44 or commanding G10.9 switching |
| Alarm | Program Error P482 | Axis name defined after E= does not exist within active part system |
| Alarm | Program Error P485 | G12.1 commanded while G96 is active or G13.1 cancel attempted before G40 |
| Alarm | Alarm E98 | Manual reverse run (G127) or program restart attempted during G12.1 |
Warning: If the C-axis is not pre-positioned to C0 prior to activating G12.1, the workpiece face counter resets to zero and angularly offsets the entire profile.
Brand Comparison Table
| Topic | Fanuc | Siemens | Mitsubishi |
|---|---|---|---|
| Kinematic implementation | Basic coordinate mapping calculation loop. | Built on TRANSMIT kinematic transformation engine. | Coordinate mapping calculation loop (with axis naming arguments). |
| Bilingual syntax | Rigid standard ISO compilation. | ISO Dialect compiled seamlessly via G291 mode. | Rigid standard ISO compilation. |
| Parameter activation | Standard compiler activation. | MD18800 and option bit 19800 compile parameters required. | Standard parameter settings. |
| Synchronous feedrate (G95) | Strictly prohibited, G94 feed-per-minute only. | ISO Dialect restricts to G94. | Supported via Parameter #1293 ext29/bit0 toggle. |
| Direct axis configuration | Fixed system configuration. | Axis parameters set in MD20050-20080. | Dynamic block arguments G12.1 D_ E=_; within program. |
Technical Analysis of Brand Variations
Analysis of these control systems reveals distinct architectural choices. Fanuc uses a G-code System A address structure that avoids G90/G91 modal codes, interpreting coordinate variables by address letters. Siemens employs a bilingual architecture, allowing transitions between native SINUMERIK cycles (G290) and ISO Dialect (G291) where G12.1 maps to the TRANSMIT engine. Mitsubishi bridges these philosophies by supporting G12.1/G13.1 directly, but adds block arguments for dynamic axis assignment.
Further variations occur in look-ahead execution and tool offset manipulation. Fanuc shuts down execution and causes vector errors if more than two consecutive non-motion blocks occur in compensation mode. Siemens and Mitsubishi handle complex look-ahead queues dynamically. Additionally, Mitsubishi permits feed-per-revolution G95 modal retention if Parameter 1293 is enabled, whereas Fanuc strictly limits G12.1 to G94, generating Alarm 14800 if feedrate values are omitted.
Program Examples and Dry Run Verification
Example 1: Fanuc G12.1 Face Milling
G97 S1200 M03;
G00 X40.0 C0 Z3.0;
G12.1;
G01 G42 X20.0 C10.0 F150.0;
G01 X-20.0;
G01 C-10.0;
G01 X20.0;
G01 C10.0;
G40 X40.0 C0;
G13.1;
dry run analysis: The control indexes the spindle C-axis to C0, switches the coordinate plane to virtual XY mode, activates tool nose compensation G42 on the approach path, mills a square face profile, cancels tool compensation G40, and exits polar mode.
Example 2: Siemens G12.1 Face Milling
G291;
G97 S1200 M3;
G0 X40.0 C0 Z3.0;
G12.1;
G1 G42 X20.0 C10.0 F150;
G1 X-20.0;
G1 C-10.0;
G1 X20.0;
G1 C10.0;
G40 X40.0 C0;
G13.1;
G290;
dry run analysis: The controller enters ISO dialect compilation mode G291, runs G12.1 to activate the TRANSMIT kinematic solver, executes square milling, cancels cutter compensation G40, cancels polar mode G13.1, and returns to Siemens native mode G290.
Example 3: Mitsubishi G12.1 Face Milling
G17 G90 G00 X40.0 C0 Z3.0;
G12.1 D0 E=C;
G01 G42 X20.0 C10.0 F150;
G01 X-20.0;
G01 C-10.0;
G01 X20.0;
G01 C10.0;
G40 X40.0 C0;
G13.1;
dry run analysis: The machine sets the XY plane, pre-positions the spindle, commands G12.1 with dynamic axis mapping for virtual Y-axis and physical C-axis, runs linear moves, disables radius compensation G40, and disables polar mode G13.1.
Error Analysis and Alarm Troubleshooting
| Brand | Alarm Code | Trigger Condition | Operator Symptom | Root Cause / Fix |
|---|---|---|---|---|
| Fanuc | Alarm PS0041 | Programmed circular arc center is mathematically identical to start/end point under G41/G42. | Execution stops, turret halts, and alarm displays on screen. | Ensure clearance coordinates are programmed with sufficient clearance (larger than double the tool nose radius). |
| Siemens | Alarm 61815 | Tool radius compensation (G41/G42) is active when G12.1 is called. | Cycle preprocessor halts execution before first motion. | Program G40 to cancel tool radius compensation before calling G12.1. |
| Mitsubishi | Program Error P485 | G12.1 commanded while constant surface speed control (G96) is active. | Control displays P485 program error and refuses to execute block. | Ensure G96 is cancelled and constant RPM G97 is active before G12.1. |
Application Note: Consequence-First Face Milling Setup
Neglecting the C-axis pre-positioning routine on a Mitsubishi control resets the virtual C-axis position counter to zero, angularly shifting the entire face contour. If the tool starts machining at an unverified rotary position, the finished profile will be misaligned, producing a scrap part and potentially colliding with fixture clamps. Programmers must enforce pre-positioning blocks like G00 C0 prior to calling G12.1. In addition, verifying Chuck and Tailstock Barriers on the control panel prevents physical contact if coordinates exceed travel limits.
Related Command Network
- g07.1-cylindrical-interpolation: Acts on a cylindrical surface wrapper whereas G12.1 interpolates on a flat virtual plane.
- g08-look-ahead-control: Prepares tool path vectors and prevents feedrate dropouts during complex contouring transitions.
- g09-exact-stop-non-modal: Forces the machine to decelerate to a complete stop at corner coordinates, preventing rounding errors.
G13.1: Cancel command that terminates polar coordinate interpolation mode and returns the control system to standard turning coordinates.
Conclusion and Operational Takeaways
Operational success with G12.1 depends on setting explicit plane selections, pre-indexing the rotary spindle, and verifying feedrate modals. Operators must test setups via dry runs and program virtual barrier limits to prevent collision damage.
Frequently Asked Questions
What triggers Alarm 14800 during polar coordinate interpolation?
Alarm 14800 is triggered if the programmed path velocity (feedrate F) evaluates to zero or is omitted after executing G12.1. Since G12.1 forces the feedrate mode to asynchronous feed per minute (G94), you must program a non-zero F-value in the G12.1 sequence to maintain axis motion.
Why must G40 be commanded before G13.1?
Deactivating polar coordinate interpolation with G13.1 while tool radius compensation (G41/G42) is still active corrupts the controller's look-ahead parser. Always program a G40 cancel block before G13.1 to retract tool compensation vectors and prevent overcutting or alarms.
How does Parameter 1293 affect G12.1 on Mitsubishi controls?
Parameter 1293 ext29/bit0 enables feed-per-revolution (G95) to remain active during G12.1 polar interpolation. By default, G12.1 forces feed-per-minute (G94), but configuring this parameter to 1 allows programmers to maintain G95 feedrates throughout the cycle.
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
G27 Reference Position Return Check: CNC Guide for Multi-Brand Systems
Master the CNC G27 reference position return check on Fanuc, Siemens, and Mitsubishi controls. Learn parameters like MD 34100 and fix Alarm 61816.
Siemens SINUMERIK G26 Upper Working Area & Spindle Speed Limit
Master the Siemens SINUMERIK G26 command for upper working area and spindle speed limits. Learn syntax, parameters like SD 43420, and alarms to avoid crashes.
G26 Spindle Speed Fluctuation Detection ON: CNC Programming Guide
Learn how to configure G26 on Fanuc, Siemens, and Mitsubishi CNC controls to prevent spindle speed fluctuations, set travel limits, and avoid tool crashes.
G25 Lower Working Area and Spindle Speed Limit: Siemens CNC
Master G25 lower working area and spindle speed limits on Siemens SINUMERIK controls. Avoid chuck collisions and configure safety parameter SD 43430.