Skip to main content
CNC.wiki

G07 Imaginary Axis Designation: High-Precision CNC Programming Guide

Learn how to program G07 imaginary axis designation on Fanuc, Siemens, and Mitsubishi CNC controls to map complex toolpaths and prevent turret collisions.

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

CNC CARE Co-founder

Introduction to Imaginary Axis Designation

Failing to deactivate the imaginary axis designation prior to engaging high-speed contouring modes can cause the tool turret to travel off-trajectory, leading to a catastrophic hard collision with the vise jaw or workpiece chuck. In active tool position compensation (G43.7), commanding G07 will immediately halt the system preprocessor, leaving the tool tip plunged in the material. Without physical feedback from the designated axis, the controller continues to distribute pulses, causing a severe deviation on the remaining active physical axes. The result is a shattered spindle, damaged turret gears, and a completely ruined scrap part.

To mitigate these physical risks, modern CNC controllers allow programmers to temporarily convert a physical NC axis into a virtual one. G07 imaginary (hypothetical) axis designation enables the CNC interpolation engine to calculate coordinates and generate interpolation pulses for a designated axis while preventing its servo motor from moving. This allows programmers to easily machine complex eccentric cams or sinusoidal profiles using pulse distribution without specialized CAM routines. Adhering to strict programming boundaries is essential to ensure safe transitions between virtual and physical movement.

Technical Summary of G07

SpecificationDetails
Command CodeG07 α0 (Activate hypothetical mode), G07 α1 (Cancel and return to physical travel)
Modal GroupGroup 00 (Non-modal, but designated axis remains hypothetical until canceled by G07 α1)
BrandsFanuc, Siemens (unsupported; uses TRANSMIT/TRACYL, G7 is grinding), Mitsubishi
Critical ParametersParameter No. 1013 (axname) / 1014 (incax) [Fanuc, Mitsubishi]; Parameter No. 5000 Bit 3 (GNI) [Fanuc]
Main ConstraintMust be programmed in an independent block alone. Cannot combine with G43.7 or G05 P10000.

Quick Read: Key Takeaways

  • Always command G07 in a separate independent block to avoid coordinate motion interference.
  • Ensure all active tool position compensations are cancelled before toggling the imaginary axis state.
  • Cancel the hypothetical axis interpolation before commanding advanced high-speed control modes such as G05.1 AI Contour Control.
  • Check the power-on default and reset settings, such as Fanuc Parameter No. 1013 or Siemens MD10000 axis names, to ensure correct axis assignments.
  • Use virtual Chuck and Tailstock barriers to establish soft-limit boundaries against physical collisions.
  • Use G10 parameter management to safely configure axis settings in the program.
  • Perform dry runs in the air to ensure the tool clears all physical clamps and fixtures.

Basic Concepts of Imaginary Axis Designation

Imaginary axis designation, commanded via G07, is a control-level feature that temporarily converts a physical machine coordinate into a virtual axis. When activated, the controller continues to generate interpolation pulses and execute math operations for the designated axis, but prevents the corresponding physical servo motor from moving. This technique allows the controller to distribute these mathematical pulses across the remaining active axes.

The primary application of this mode is the generation of complex, non-linear physical profiles—such as trigonometric sinusoidal or cosinusoidal curves—on a physical coordinate plane. By designating one of the active axes in a helical or spiral interpolation as hypothetical, the controller projects the helical path onto the remaining two-dimensional plane. This enables the machine to cut wave-like contours, undulating paths, or eccentric cam profiles on standard coordinate axes without requiring specialized CAM subprogram packages or multi-axis hardware.

Managing the transition between physical and virtual coordinate states requires careful synchronization of offsets and compiler modes. Under native G-code systems, the designated axis remains in hypothetical mode until a cancellation block is systematically parsed. If the programmer fails to cancel the mode before returning to normal machining cycles, the physical axis will remain stationary during subsequent coordinate commands, causing the tool to cut out-of-tolerance shapes or collide with fixtures.

Command Structure and Syntax

Activating imaginary axis designation requires an independent block containing the G07 code followed by the target axis address letter and a binary state modifier. The command must be written on its own, with no movement coordinates, tool calls, or auxiliary functions permitted in the same block. Programming coordinates alongside G07 will cause the interpreter to halt and trigger a syntax alarm.

The syntax utilizes the numerical value zero to enable the hypothetical state and the value one to cancel it. If only the axis name is designated in the block without a trailing number, the control automatically defaults to zero and activates the hypothetical mode. If any number other than zero or one is programmed, the system defaults to one and cancels the hypothetical designation. Multiple axes can be designated as hypothetical simultaneously within a single block.

; Fanuc and Mitsubishi G07 Command Structure
G07 Y0;  ; Designates physical Y-axis as an imaginary axis (ON)
G07 Y1;  ; Cancels imaginary designation, returning Y-axis to physical travel (OFF)
G07 Y;   ; Omission defaults to 0, enabling imaginary mode
G07 Y2;  ; Invalid number defaults to 1, canceling imaginary mode

The following parameters define the configuration and behavior of geometry axes during G07 operations:

BrandParameterDescriptionValue Range
FanucParameter No. 1013 (axname)Sets the absolute axis name for each channel in the system.Permitted physical axis letters
FanucParameter No. 1014 (incax)Sets the incremental axis name for each channel in the system.Permitted physical axis letters
FanucParameter No. 1006 Bit 3 (DIAx)Toggles between radius (0) or diameter (1) programming on the axis.Binary (0 or 1)
FanucParameter No. 5000 Bit 3 (GNI)Dictates G40 vector look-ahead behavior in cancel blocks without motion.Binary (0 or 1)
FanucParameter No. 8300 to 8306Defines virtual coordinate boundaries for Chuck and Tailstock Barriers.Coordinate values / settings
SiemensMD10604 $MN_WALIM_GEOAX_CHANGE_MODEDetermines working area limitation behavior during geometry axis switchovers.0 (deactivate) or 1 (retain limitation)
SiemensMD20060 $MC_AXCONF_GEOAX_NAME_TABDefines channel geometry axis name strings.String names (e.g., "X", "Y", "Z")
SiemensMD20734 $MC_EXTERN_FUNCTION_MASKControls the behavior of the external ISO Dialect translator.Bit-coded values (e.g., Bit 3 for scanner bypass)
MitsubishiParameter #1013 axnameSpecifies the physical axis names configured in the system.Axis address letters
MitsubishiParameter #1014 incaxSpecifies the incremental axis names configured in the system.Axis address letters
MitsubishiParameter #1517 mill_CSpecifies the hypothetical axis name used for milling interpolation.Axis address letters
MitsubishiParameter #1210 RstGmdDictates whether modal G-codes reset or are retained upon system reset.Modal group configuration values

Brand Applications and Implementations

Fanuc

On Fanuc controls, the G07 code is used to designate imaginary axes. The controller relies on Parameter No. 1013 to set the absolute axis name and Parameter No. 1014 to set the incremental axis name.

To designate the Y-axis as an imaginary axis, programmers must command G07 Y0; in a separate block. The mode is canceled by executing G07 Y1; prior to any coordinate rotations.

CategorySpecificationDetails
ParametersNo. 1013 / No. 1014Specifies physical and incremental names of axes.
ParametersNo. 5000 Bit 3 (GNI)Determines look-ahead tool path during G40 cancel blocks.
ParametersNo. 1006 Bit 3 (DIAx)Toggles between radius or diameter programming.
ParametersNo. 8300 to 8306Defines Chuck and Tailstock barrier setting coordinates.
AlarmsAlarm PS0325G07 or tool compensation within sequence blocks P and Q of cycles G71/G72.
AlarmsAlarm PS0082T code specified in the same block as G36 or G37.
AlarmsAlarm PS5330T code and auxiliary function output in moving axis G50.9 in same block.
VersionsSeries 15 vs 16PTE parameter (No. 12623#0) selects rigid tapping G84.2 on Series 15.
VersionsSeries 16i vs 30iOlder Series 16i uses a legacy cancel path, while Series 30i uses parameter 5000 Bit 3.

Warning: Entering a G07 hypothetical axis block while tool nose compensation is active can cause incorrect path calculations, driving the tool turret directly into the rotating chuck claws.

Siemens

Siemens SINUMERIK CNC controls do not natively support G07 as an Imaginary Axis Designation. Instead, the command G7 is defined as a non-modal travel command for oblique plunge-cut grinding compensation, while virtual axis calculations are handled via software geometry transformations.

Natively, the operator can switch to ISO Dialect mode using G291 to execute legacy programs, or write G7 F1500; in Siemens mode for grinding compensation.

CategorySpecificationDetails
ParametersMD10604Determines working area limitation during geometry axis switchover.
ParametersMD20734 Bit 3Bypasses scanner errors (1) or triggers alarms (0).
ParametersMD20060Defines string names of geometry axes valid in the channel.
AlarmsAlarm 14800Path velocity F is programmed as 0 or evaluates to zero on cutting path.
AlarmsAlarm 12080ISO scanner encounters unmapped commands G500/WAIT in G291 mode.
AlarmsAlarm 61816Programmed axes not positioned exactly on machine zero during G27 check.
AlarmsAlarm 61003No feedrate programmed before calling standard drilling/milling cycles.
Versions802D sl vs 840D slMD10604 WALIM_GEOAX_CHANGE_MODE is read-only on 802D sl.
Versions802D sl vs 840D slMulti-edge turning G51.2 and G50.2 are only available on 840D sl.

Warning: Programming G07 on Siemens controls expecting imaginary axis interpolation will result in syntax errors or activate grinding compensation, causing the tool to plunge directly into the clamping fixtures.

Mitsubishi

Mitsubishi controls fully support G07 hypothetical axis interpolation. The controller determines the axis addresses using Parameter #1013 and Parameter #1014 configured in the active part system.

The programmer commands G07 Y0; to activate the virtual axis mode and G07 Y1; to cancel it. The command must be written in an independent block without other movements.

CategorySpecificationDetails
Parameters#1013 / #1014Specifies physical and incremental axis names configured.
Parameters#1517 mill_CSpecifies the hypothetical axis name for milling interpolation.
Parameters#1210 RstGmdControls G-code reset setting upon system reset.
AlarmsProgram Error P33G07 commanded while Tool Position Compensation G43.7 is active.
AlarmsProgram Error P34G07 commanded while advanced pre-interpolation accel/decel is active.
AlarmsProgram Error P80G07 commanded on the specialized M80V TypeB control series.
VersionsM80V TypeB vs StandardG07 triggers compile-time Program Error P80 on TypeB, fully supported on standard.

Warning: Running G07 while tool position compensation G43.7 is active halts the system with Program Error P33, causing the tool to stop mid-cut and potentially damage the workpiece.

Brand Comparison Table

TopicFanucSiemensMitsubishi
Virtual Axis DesignationUses G07 α0/α1 to designate hypothetical axisG07 not supported for virtual axis; uses TRANSMIT/TRACYLUses G07 α0/α1 to designate hypothetical axis
Omission / Invalid Value Fail-safeG07 Y; defaults to Y0 (ON). Invalid numbers may cause alarms.G7 is grinding compensation. G07 is syntax error.G07 Y; defaults to Y0 (ON). Invalid numbers (e.g. Y2) default to Y1 (OFF).
Dynamic geometry switchoverManaged via parameter settings or coordinate shiftsManaged dynamically via machine data e.g. MD20060 geoax nameManaged via parameter settings or coordinate shifts
Bilingual translation modeStandard G-code systems, no dual compiler switchDual compiler mode G290 (Siemens) and G291 (ISO Dialect)Standard G-code systems, no dual compiler switch
Series Option blockingGenerally supported on standard controls— (no source)Blocked on M80V TypeB series with Program Error P80

Technical Analysis of Brand Differences

Analyzing the control system architectures reveals how each manufacturer handles virtual axis interpolation and coordinate mapping. Fanuc and Mitsubishi implement G07 as a modal state within Group 00, where the CNC's interpolation engine generates pulses for the designated axis but bypasses physical servo motor movement. In contrast, Siemens controls do not recognize G07 for virtual axis designation. The Siemens compiler interprets G7 as a grinding compensation command, and virtual movement must instead be managed using kinematic software transformations such as TRANSMIT or TRACYL, which mathematically map rotary motion onto linear coordinates.

The Omission and Invalid Number fail-safe rule also differs significantly between these systems. Mitsubishi utilizes a tolerant compiler approach; if the state modifier is omitted, it defaults to active mode (G07 Y0), and any invalid integer defaults to cancellation (G07 Y1). Fanuc's parser is less tolerant of syntax formatting changes, often triggering alarms if the syntax is not exactly matched. For Siemens, G07 remains an invalid command in native mode, and attempting to run it in ISO Dialect mode (G291) will trigger Alarm 12080 if the scanner error check parameter (MD20734 Bit 3) is enabled.

Series-level hardware options also introduce distinct functional limitations across different models. Mitsubishi blocks G07 at the compiler level on its M80V TypeB series, triggering Program Error P80. Fanuc manages backward compatibility between legacy Series 16i/18i/21i and modern Series 30i controls via Parameter No. 5000 Bit 3 (GNI), which changes G40 cancel vector math. Siemens restricts its SINUMERIK 802D sl control by locking parameter MD10604 as read-only, whereas the 840D sl series allows full modification of this geometry change mode during operation.

Program Examples and Dry Run Procedures

Fanuc Example

N01 G90 G54;
N02 G40 G49;                               ; Cancel tool radius and length compensation
N03 G07 Y0;                               ; Designates physical Y-axis as hypothetical axis
N04 G17 G02 X0. Y0. Z40. I10. J-10. P2 F50; ; Pulse distribution without physical Y movement
N05 G07 Y1;                               ; Returns Y-axis to normal physical operation
N06 M30;

Dry run: Verify that G40 and G49 are executed before G07 Y0. Perform the initial run in the air with the Z-axis offset set +100 mm above the workpiece. Confirm that the tool executes a smooth sine curve path on the physical X and Z coordinates, and verify that the Y-axis remains completely stationary during the cycle.

Siemens Example

N01 G18 G90 G01 X150.0 Z120.0 F0.25;          ; Standard absolute linear cutting in ZX plane
N02 G18 G7 F1500;                             ; Non-modal oblique plunge grinding compensation motion
N03 G291;                                     ; Switches to ISO Dialect mode
N04 M30;

Dry run: Verify that the machine is in native SINUMERIK mode prior to executing G7. Run the program with the feedrate override dial set to 10% and verify that the axis compensation movement is performed smoothly without triggering Alarm 14800 or Alarm 61816.

Mitsubishi Example

N01 G90 G54;
N02 G40 G49;                               ; Cancel active compensation modes
N03 G07 Y0;                               ; Designates Y-axis as hypothetical axis
N04 G17 G02 X0. Y0. Z40. I10. J-10. P2 F50; ; Pulse distribution without physical Y movement
N05 G07 Y1;                               ; Returns Y-axis to normal physical travel
N06 M30;

Dry run: Ensure that tool position compensation G43.7 is cancelled before G07 is commanded. Execute the program in dry run mode on a machine system with at least 4 active axes, and check that no Program Error P34 or P33 is triggered on the control screen.

Error Analysis and Troubleshooting

BrandAlarm CodeTrigger ConditionOperator SymptomRoot Cause / Fix
FanucAlarm PS0325G07 or tool radius compensation (G41/G42) programmed within sequence blocks P and Q of G71/G72 roughing cycles.Control halts execution immediately; cycle start light turns red, and the screen displays the alarm message.Shape program violation. Move the G07 axis toggle command outside the finish contour blocks defined by P and Q.
FanucAlarm PS0082T command specified in the same block as G36 or G37.Cycle start halts with alarm indicator.T code block conflict. Separate the T code selection and automatic tool length measurement commands into independent blocks.
FanucAlarm PS5330T code and auxiliary function output in moving axis (G50.9) specified in the same block.Control aborts execution with a format error.Format restriction. Program the tool call and axis offset movement in separate blocks.
SiemensAlarm 14800Path velocity F is programmed as 0 or evaluates to zero during cutting motions (G1, G2, G3).Machine halts axis travel immediately and displays "programmed path velocity is less than or equal to zero".Missing feedrate. Program a valid feedrate F > 0 before the motion block, or ensure the fixed feedrate function is active.
SiemensAlarm 12080ISO scanner encounters unmapped native Siemens commands (G500/WAIT) in ISO Dialect mode (G291).Execution interrupts immediately with "G500 unknown" or "WAIT unknown" error.Scanner formatting error. Remove unmapped Siemens commands from the ISO program, or configure MD20734 Bit 3 to 1 to bypass scanner errors.
SiemensAlarm 61816Programmed axes are not positioned exactly on machine zero reference point during G27 check.Automatic execution halts, showing reference failure.Position verification check failed. Run reference point return commands prior to performing the check.
SiemensAlarm 61003No feedrate (F-word) programmed before calling standard drilling/milling cycles.Cycle interrupts and does not execute travel.Missing cycle feedrate parameter. Define a valid feedrate modal value before calling the cycle.
MitsubishiProgram Error P33G07 is commanded while Tool Position Compensation (G43.7) is active.The controller preprocessor halts, and automatic operation is interrupted before the G07 block is executed.Active compensation conflict. Cancel G43.7 before commanding G07, separating tool position compensations from imaginary axis toggles.
MitsubishiProgram Error P34G07 commanded while advanced pre-interpolation acceleration/deceleration or high-speed control (G05 P10000) is active.Automatic operation stops at the G07 block with a mode error.Mutually exclusive mode active. Cancel G05 P10000 high-speed mode before executing G07 imaginary axis commands.
MitsubishiProgram Error P80G07 is commanded on the specialized M80V TypeB control series.The compiler rejects the program block and halts the cycle start instantly.Series-specific option blocking. Avoid using G07 on TypeB controls, as this function is blocked at the compiler level.

Practical Application Note

Failing to configure the Chuck and Tailstock Barriers (Parameter No. 8300 to 8306) on the Fanuc control panel can result in a catastrophic hard collision where the tool turret drives directly into the physical chuck claws. When executing G07 hypothetical axis interpolation, the controller generates mathematical pulses that distribute across the active physical axes without moving the designated axis. If the workpiece coordinate offsets are calculated incorrectly relative to the physical fixtures, the tool path will deviate off-trajectory. By setting up virtual protective boundaries using coordinate values in Parameters No. 8300 to 8306, the control system can detect if a tool attempts to cross these boundaries, immediately halting axis travel and triggering a stored stroke limit alarm before physical impact occurs.

Related Command Network

  • G02 / G03 (Circular Interpolation CW/CCW): These motion commands are used in combination with G07 to generate helical and spiral trajectories that map as sinusoidal curves.
  • G07.1 / G107 (Cylindrical Interpolation): This command develops a programmed cylindrical shape onto a flat plane by converting linear movements into rotational axis motion.
  • G290 / G291 (Siemens/ISO Mode Selection): These commands toggle the Siemens SINUMERIK compiler between native Siemens programming and standard ISO Dialect emulation.
  • G05 P10000 / G05.1 Q1 (High-Speed High-Accuracy Control): These advanced look-ahead pre-interpolation acceleration/deceleration control modes must be systematically canceled before activating G07.
  • G17 / G18 / G19 (Plane Selection): These preparatory codes select the active machining planes (XY, ZX, YZ) for coordinate interpolation and compensation center-point vectors.

Conclusion

Successful implementation of G07 imaginary axis designation depends on strict separation of mode activation from axis movement. Programmers must ensure G07 is commanded in an independent block and that all active compensations are cancelled before toggling the hypothetical axis state. Operators must configure Chuck and Tailstock Barriers on the control panel and verify first-article toolpaths using dry runs in the air to prevent catastrophic hard collisions with workholding fixtures.

Frequently Asked Questions

Why does the Mitsubishi control trigger Program Error P33 when commanding G07?

This error occurs because the controller prohibits active tool position compensation (G43.7) from being combined with hypothetical axis modes. To fix this, insert a G49 cancel command before G07 Y0; to clear active offsets, and then reactivate compensations only after the imaginary axis envelope is established.

Can Siemens controls run programs containing G07 in ISO Dialect mode (G291)?

No, Siemens controls do not support G07 for virtual axes, even in ISO Dialect mode. To emulate this behavior, you must rewrite the program to switch to native SINUMERIK mode (G290) and use kinematic transformations like TRANSMIT or TRACYL to map rotary and linear coordinates.

What happens if the numerical value is omitted after the axis letter in a G07 block?

Both Fanuc and Mitsubishi compilers will default to zero when the number is omitted (e.g. G07 Y;), which automatically activates the imaginary axis mode. To maintain clear, readable code and prevent operator confusion during setup, always program the explicit value (G07 Y0 for activation, G07 Y1 for cancellation) in independent blocks.

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