G82 Drilling Cycle with Dwell: Complete CNC Programming Guide
Learn to program the G82 drilling cycle with dwell on Fanuc, Siemens, and Mitsubishi CNC controls. Configure parameters and resolve common alarm codes.
Introduction to the G82 Drilling Cycle
When an operator resumes a machining program after a manual reset or emergency stop while a G82 counterboring cycle is modally active, misconfigured tool offset registers can cause the tool-carrying gantry or indexing turret to travel along a dangerously shifted path. If the control's preprocessor initiates a rapid traverse stepover to the next coordinate before the tool retracts completely from the hole—often due to an in-position check effective area configured too large relative to the clearance distance—the spindle head will drive the rotating tool directly into physical workholding components. This sudden path deviation causes a catastrophic hard collision against table-mounted fixture clamps, a machine vise jaw, or spindle chuck jaws. The impact shatters the carbide cutting tool, damages the axis ball screws, halts axis motion with high-current overload alarm codes, and turns a precision-machined casting into a ruined scrap part.
G82 Technical Summary
| Technical Detail | Specification |
|---|---|
| Command Code | G82 (Fanuc, Mitsubishi, Siemens ISO Dialect), CYCLE82 (Siemens Native) |
| Modal Group | Group 09 (Fanuc, Mitsubishi, Siemens G291 ISO Dialect), Group 10 (Siemens G291 / Fanuc turning lists) |
| Supported Brands | Fanuc, Siemens, Mitsubishi |
| Critical Parameters | Dwell Time (P in milliseconds for Fanuc/Mitsubishi, DTB in seconds/revolutions for Siemens), Final Depth (Z / DP) |
| Main Constraint | Requires a pre-activated spindle rotation (M03 or M04) and must be canceled (using G80 or G290) before axis switching or coordinate rotation commands to prevent drive errors. |
Quick Read: G82 Key Takeaways
- Select G82 when flat-bottom holes, spotfaces, or counterbores require precise surface finishes and depth control.
- Calculate bottom dwell time based on spindle RPM to guarantee at least one full tool revolution at final depth.
- Verify that tool radius compensation (G41/G42) is deactivated (G40) before calling G82 to avoid axis errors.
- Ensure the spindle is rotating normal (M03) or reverse (M04) before executing the canned cycle.
- Cancel G82 with G80 (or empty MCALL block on Siemens) before executing plane changes, coordinate rotation, or axis switching.
- Test new G82 programs using single-block mode and verify the active coordinate positions on the HMI screen before cutting raw stock.
Basic Concepts of Counterboring and Dwell
The primary programming purpose of the G82 cycle is to optimize flat-bottom hole machining, counterboring, and center drilling. By pausing the tool's axis feed at the bottom of the cut while the spindle continues to rotate, the canned cycle allows the cutting edge to complete its rotation and clean up any remaining stock material. This dwell action breaks chips, corrects depth deflection caused by spindle compliance, and ensures a flat, smooth, and highly accurate bottom surface finish.
Programmers must calculate the minimum required dwell time (Dm) using the standard spindle speed formula: Dm = 60 / RPM. This calculation ensures the spindle completes at least one full revolution at the final depth. In standard workshop practice, programmers double this calculated value, especially during slow spindle speeds or heavy feedrate operations, to ensure the tool removes all face material and leaves a clean finish.
Command Structure and Syntax
The G82 command structure specifies the coordinate locations, depth, feedrate, clearance plane, and dwell period. The coordinates define where the hole will be drilled, and the Z or depth value specifies the final position. The clearance plane, or Point R, defines the safety position where rapid travel changes to the programmed cutting feedrate.
To execute the cycle, the controller first executes rapid positioning along the primary axes to the hole coordinates, followed by a rapid movement along the drilling axis to the safety clearance level. The tool then feeds at the programmed feedrate to the bottom of the hole. After dwelling for the specified duration, the tool retracts at rapid traverse back to either the initial plane level (G98 return mode) or the Point R clearance plane (G99 return mode).
; Fanuc/Mitsubishi/Siemens ISO Syntax: G98 (or G99) G82 X_ Y_ Z_ R_ P_ F_ K_ ;
; Siemens Native Mode Syntax: CYCLE82 (RTP, RFP, SDIS, DP, DPR, DTB) ;
| Address / Parameter | Description | System / Units |
|---|---|---|
| X_ Y_ | Coordinates of the hole center | Fanuc, Mitsubishi, Siemens ISO (mm or inches) |
| Z_ | Final depth coordinates (absolute or incremental) | Fanuc, Mitsubishi, Siemens ISO (mm or inches) |
| R_ | Point R clearance plane coordinate | Fanuc, Mitsubishi, Siemens ISO (mm or inches) |
| P_ | Dwell time at the bottom of the hole (strictly positive integer) | Fanuc, Mitsubishi, Siemens ISO (milliseconds, no decimal) |
| F_ | Cutting feedrate | Fanuc, Mitsubishi, Siemens ISO (mm/min or inch/min) |
| K_ / L_ | Number of repetitions (K for Fanuc Series 16/30i, L for Series 15) | Fanuc, Mitsubishi, Siemens ISO (Integer 0 to 9999) |
| RTP | Absolute coordinate of retraction plane | Siemens Native (CYCLE82 parameter) |
| RFP | Absolute coordinate of reference plane | Siemens Native (CYCLE82 parameter) |
| SDIS | Safety clearance distance | Siemens Native (CYCLE82 parameter, positive real) |
| DP | Absolute depth coordinate | Siemens Native (CYCLE82 parameter) |
| DPR | Relative depth distance (relative to reference plane) | Siemens Native (CYCLE82 parameter, positive real) |
| DTB | Dwell time at final depth | Siemens Native (CYCLE82 parameter in seconds or revolutions) |
Brand Applications: Fanuc, Siemens, and Mitsubishi
Fanuc
Fanuc controls configure canned cycle compatibility using Parameter No. 0001 (Bit 1 FCV) and modal dwell retention via Parameter No. 5209 (Bit 2 DWP).
Programmers command G82 using standard G98 or G99 return modes: G98 G82 X400.0 Y-350.0 Z-153.0 R-97.0 P300 F120 ;.
| Category | Value / Code | Description / Details |
|---|---|---|
| Parameters | Parameter No. 1681 | Controls modal block overlap settings (Bit 0 DPS, Bit 1 DRL, Bit 5 DZL). |
| Alarms | Alarm PS0206 | AXIS SWITCHING IN RIGID MODE: Switching the drilling axis without canceling G82. |
| Alarms | Alarm PS0003 | OVERFLOW: INTEGER: Overlap `,Q` command value outside of the valid 0 to 2 range. |
| Alarms | Alarm PS0200 | ILLEGAL S CODE COMMAND: Spindle speed exceeds maximum active gear limits. |
| Versions | Series 15 vs 16/30i | Series 15 uses L for repetitions; Series 16/30i uses K. Configured via Parameter FCV. |
| Versions | C-Axis Clamping | Disabled during specification of the Fanuc Series 15 program format. |
Warning: Do not write a decimal point in the P address (such as P1.5) on Fanuc controls. The preprocessor will fail to parse the decimal, causing the dwell to be ignored or interpreted as a 1 millisecond pause, which leads to tool rubbing and rapid edge wear.
Siemens
Siemens native programming uses machine parameter MD 18800 to enable external G-code compilers.
Under native Siemens mode, the cycle is called modally using MCALL: MCALL CYCLE82 (50.0, -10.0, 1.0, -25.0, , 1.5) ; followed by hole patterns.
| Category | Value / Code | Description / Details |
|---|---|---|
| Parameters | RTP, RFP, SDIS | Coordinates for the retraction plane, reference plane, and safety clearance. |
| Parameters | DP, DPR, DTB | Absolute depth, relative depth, and dwell time at the bottom of the hole. |
| Alarms | Alarm 61101 | Reference plane defined incorrectly: RTP, RFP, and depth are inconsistent. |
| Alarms | Alarm 61003 | No feed programmed in the cycle: Missing feedrate F. |
| Alarms | Alarm 61102 | No spindle direction programmed: Missing M03 or M04. |
| Alarms | Alarm 61815 | G40 not active: Cutter compensation active before calling the cycle. |
| Versions | 840D sl vs 802D sl | 840D sl provides advanced modal display; 802D sl uses write-protected reset variables. |
Warning: Tool radius compensation must be deactivated using G40 before calling CYCLE82. Leaving G41 or G42 active will trigger Alarm 61815 and stop program execution.
Mitsubishi
Mitsubishi CNC utilizes Parameter #1265 to enable the special format and Parameter #19417 to define axis deceleration check rules.
Mitsubishi controls support both standard G-code cycles and special block formats: G82 X100.0 Z-40.0 R-5.0 F120.0 P500 LI1, I0.2, J0.1 ;.
| Category | Value / Code | Description / Details |
|---|---|---|
| Parameters | Parameter #1271 | Toggles whether repetition commands are enabled in the program interpreter. |
| Alarms | Program Error (P411) | Axis Name Switching command (G111) issued while G82 is active. |
| Alarms | Program Error (P33) | Machining Condition Selection I (G120.1) commanded while G82 is active. |
| Alarms | Program Error (P128 / P923) | Machining Condition Selection I cancel (G121) or Coordinate Rotation commanded while G82 is active. |
| Versions | Lathe Series 15-T | G82 belongs to Group 09 standard, but Group 10/09 on lists 6 and 7. |
| Versions | G188 / G189 Switch | Bimodal format compiler that dynamically switches and translates G-code lists. |
Warning: Coordinate rotation (G68) or 3D coordinate conversion (G68.1) cannot be activated while a G82 cycle is modal. Doing so will trigger program errors such as P923 or P261, terminating operations immediately.
Brand Comparison Analysis
| Feature / Capability | Fanuc | Siemens | Mitsubishi |
|---|---|---|---|
| Dwell Programming (P / DTB) | Specified strictly as positive integers in milliseconds (no decimal point allowed) e.g., P500. | Real seconds (e.g., DTB=1.5) or spindle revolutions in native mode; milliseconds in ISO. | Milliseconds integer; decimal points are ignored or truncated in special format. |
| Modal Cycle Cancellation | Cancelled by G80 or any Group 01 motion command (G00, G01) in subsequent blocks. | Native CYCLE82 requires an explicit empty MCALL block to cancel the modal state. | Cancelled by G80, any Group 01 motion command, or dynamic switches like G188. |
| Bimodal Switching | Bimodal format switches are not supported. | Dual interpreter model toggling via G290 (Native Siemens) and G291 (ISO Dialect) commands. | Format switches G188 / G189 dynamically translate and switch active G-code tables on-the-fly. |
| In-position / Deceleration Checks | Managed globally via system parameters. | Managed by safety clearance and cycle parameters. | Special Format allows inline ,I and ,J tolerances. Deceleration check parameter #19417. |
Technical Analysis of Compiler and Coordinate Behaviors
Analyzing the architectural differences between controls reveals how preprocessors interpret program structures. Fanuc parses dwell values (P) and repeat counts (K) strictly as positive integers, whereas Siemens uses decoupled parameter lists with real numbers. In a G82 cycle, Fanuc requires the dwell duration to be written in milliseconds as an integer (P500) without a decimal point. On native Siemens controls, the G82 cycle is deactivated in favor of the parameter-driven technology cycle CYCLE82. Its parameters—retraction (RTP), reference (RFP), safety clearance (SDIS), and absolute depth (DP)—are separate real numbers, and the dwell time (DTB) is specified in decimal seconds or revolutions, eliminating integer interpretation issues.
Canned cycle deactivation also shows major compiler variations. Fanuc controls manage cycle deactivation through Group 01 motion command overrides. Specifying a Group 01 motion command such as G00 or G01 in a subsequent block cancels the modal canned cycle, behaving identically to a G80. Mitsubishi turning systems feature a dynamic bimodal G188/G189 compiler that reallocates G82 modal tables on-the-fly and handles cancellation through unified group tables. Native Siemens controls bypass motion-based deactivation entirely; modal cycles called via MCALL remain active across subsequent coordinate blocks, ignoring G00 and G01 motion codes until the operator programs a standalone, empty MCALL block.
Finally, Mitsubishi's compiler supports a specialized parameter-locked format (#1265 ext01/bit2 ON) that allows programmers to output positioning and drilling axis in-position widths directly inside the cycle block using inline tolerance parameters (,I and ,J). Mitsubishi also features a dedicated paraxial deceleration check select parameter (#19417) to prevent axis lag by forcing drive check sv024 in-position width verifications before reversing axis feed. Fanuc controls lack this parameter-level customization, managing exact-stops and continuous-path acceleration globally or through pre-allocated G-codes, while Siemens manages these transitions via safety clearance distances and native cycle parameter settings.
CNC Program Examples with Dry Run
Fanuc G82 Example
G90 G99 G82 X400.0 Y-350.0 Z-153.0 R-97.0 P300 F120 ;
Dry Run
The controller coordinates are absolute (G90). The machine rapids the tool in the X-Y plane to position X400.0 Y-350.0. The drilling axis rapids down to the Point R clearance plane at Z-97.0 (G99). The Z-axis begins a controlled linear feed (G01) at 120 mm/min down to the final depth of Z-153.0. Upon reaching Z-153.0, feed halts, and the tool dwells for 300 milliseconds (P300) while the spindle continues rotating to clean the bottom face of the hole. The Z-axis rapids (G00) back up to the Point R level of Z-97.0 because of the G99 retraction code.
Siemens CYCLE82 Example
G290 ;
MCALL CYCLE82 (50.0, -10.0, 1.0, -25.0, , 1.5) ;
X20.0 Y30.0 ;
X40.0 Y50.0 ;
MCALL ;
Dry Run
The control switches to native Siemens mode (G290). The technology cycle CYCLE82 is loaded into modal memory via MCALL. The parameters are set as: Retraction Plane RTP = 50.0, Reference Plane RFP = -10.0, Safety Clearance SDIS = 1.0 (implied clearance is RFP + SDIS = -9.0), Absolute Depth DP = -25.0, and Dwell Time DTB = 1.5 seconds. When the first coordinate block X20.0 Y30.0 is processed, the machine rapids the tool to X20.0 Y30.0. The spindle rapids to the safety clearance level of -9.0 and then feeds at the active feedrate to Z-25.0. The tool dwells at Z-25.0 for 1.5 seconds with the spindle rotating, then retracts at rapid traverse to Z50.0. The machine rapids to the second coordinate X40.0 Y50.0 and repeats the drilling cycle. The final empty MCALL block cancels the modal cycle registration, resetting the system for normal motion blocks.
Mitsubishi G82 Example
G82 X100.0 Z-40.0 R-5.0 F120.0 P500 LI1, I0.2, J0.1 ;
Dry Run
The machine interprets the block in Mitsubishi turning special format. The X-axis positions to 100.0 while the tool rapids along the Z-axis to the Point R clearance plane at Z-5.0. The Z-axis feeds linearly at 120.0 mm/min down to the final depth of Z-40.0. The tool dwells for 500 milliseconds (P500) at the bottom of the cut while the spindle continues to rotate. The preprocessor evaluates the in-position tolerances of 0.2 mm (I0.2) and ,J0.1 (J0.1) to verify axis alignment. The tool retracts at rapid traverse (G00) back to the clearance plane, executing the repetition count LI1 once.
Error Analysis and Alarm Troubleshooting
| Brand | Alarm Code | Trigger Condition | Operator Symptom | Root Cause / Fix |
|---|---|---|---|---|
| Fanuc | Alarm PS0206 | Axis switching in rigid mode: Programmer attempts to switch active drilling axis without canceling the canned cycle. | The CNC program halts immediately during execution, displaying the alarm code on the HMI screen and freezing axis motion. | G82 modal cycle is still active in the system state. Insert a G80 command to cancel the G82 cycle before changing axes. |
| Fanuc | Alarm PS0003 | Overflow: Integer: Overlap `,Q` command value is programmed outside the valid range of 0 to 2. | The control generates an integer overflow fault, halts execution of the cycle block, and triggers a system fault state. | The overlap command value is too large or invalid. Correct the `,Q` value in the block to be within 0 to 2. |
| Siemens | Alarm 61101 | Reference plane defined incorrectly: Retraction plane (RTP), reference plane (RFP), and final depth coordinates are inconsistent. | The compiler stops the program run before executing the block, preventing physical axis movement and displaying a coordinate error. | The coordinates are logically incorrect (e.g., RFP is below depth). Modify the RTP, RFP, and depth values to ensure a proper retraction path. |
| Siemens | Alarm 61815 | G40 not active: Tool radius compensation (G41 or G42) is active when calling the technology cycle. | The technology cycle fails to compile, triggering a compensation alarm and locking axis movement. | Tool radius compensation is not supported during CYCLE82 execution. Insert a G40 command prior to the CYCLE82 call. |
| Mitsubishi | Program Error (P411) | Axis Name Switching command (G111) is commanded while G82 is active. | The interpreter aborts program parsing, displaying program error P411 and bringing the machine axes to an emergency stop. | Commanding axis changes while a canned cycle is active is illegal. Cancel the G82 modal cycle with a G80 command before issuing G111. |
| Mitsubishi | Program Error (P923) | Coordinate rotation ON or 3D coordinate conversion (G68.1) is commanded while G82 is active. | The controller halts execution of the rotation command, displaying error P923, and stays in a feed hold state. | Coordinate transformations cannot be initialized while the cycle is modal. Cancel G82 with G80 prior to calling G68 or G68.1. |
Practical Application Note
Ruining expensive workpiece castings and causing catastrophic tool failure is the immediate result of preprocessor positioning errors during canned cycle execution. When the in-position check effective area is configured too large relative to the Point R clearance distance, the controller initiates a rapid traverse stepover to the next coordinate before the tool has completely retracted from the hole. This sudden path deviation drives the tool-carrying turret or spindle head directly into physical workholding components, including table-mounted fixture clamps, machine vise jaws, or the rotating jaws of a spindle chuck. The resulting hard collision shatters the indexable tooling, damages the axis ball screws, and triggers high-current axis overload alarms. To prevent converting raw blanks into scrap parts, setup operators must run the G82 program in single-block mode and verify the active coordinates on the HMI screen before engaging automatic feed.
Related Command Network
- G80: Cancels all active canned cycles, resetting the control to normal motion interpolation mode.
- G81 (or CYCLE81): Performs standard drilling without dwell, suitable for simple through-holes where bottom surface finish is not critical.
- G76: Multi-pass threading cycle on lathe configurations.
- G89 (or CYCLE89): Executes drilling with dwell at the bottom but retracts at cutting feedrate rather than rapid traverse, preventing wall scratch marks.
- G04: Commands a standalone dwell pause in a program block, decoupled from any canned cycle movement.
- MCALL: Activates Siemens native modal cycles, allowing separate coordinate patterns to be executed without repeating the cycle block.
Conclusion
Achieving high-accuracy counterboring and spotfacing relies on programming the correct dwell duration and ensuring clean modal cycle deactivation. Calculating dwell based on spindle RPM provides the required time for the cutting edge to clean up the hole bottom, while rigid workholding alignment and single-block verification prevent collision hazards. Proper use of G80 or MCALL cancellation block structures ensures safe transition to subsequent machining coordinates without risking axis errors or machine damage.
Frequently Asked Questions
Why does the spindle dwell time ignore my decimal point on Fanuc controls?
Fanuc controllers parse the dwell parameter P strictly as an integer representing milliseconds, meaning a value like P1.5 is misinterpreted or truncated to 1 millisecond. To correct this and prevent tool rubbing, programmers must convert the desired pause into a whole number of milliseconds, writing P1500 for a 1.5-second dwell.
How does G82 differ from G89 when machining high-precision counterbores?
While both cycles execute a dwell at the bottom of the cut, G82 retracts the tool at rapid traverse (G00), which can cause the cutting edge to drag and leave a helical scratch mark on the hole wall. For high-precision finishes, switch to G89, which retracts the tool at cutting feedrate (G01) to protect the bore's surface finish.
What causes Siemens Alarm 61815 during a CYCLE82 call?
Siemens Alarm 61815 is triggered when tool radius compensation (G41 or G42) is active before the technology cycle is called. To resolve this error and enable successful compilation, insert a G40 command in the program block immediately preceding the CYCLE82 call to deactivate compensation.
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
G83 Deep-Hole Peck Drilling Cycle: Complete CNC Programming Guide
Learn how to program the G83 peck drilling cycle on Fanuc, Siemens, and Mitsubishi CNC controls. Optimize parameters, prevent alarms, and avoid crashes.
How to Program the G81 Drilling Cycle on CNC Milling Machines
Master the G81 spot drilling canned cycle for Fanuc, Siemens, and Mitsubishi CNC systems. Learn parameter setups, diagnostic alarms, and G-code syntax.
How to Use the G80 Canned Cycle Cancel Command in CNC Programming
Master the G80 canned cycle cancel command for Fanuc, Siemens, and Mitsubishi. Learn parameters, avoid tool collisions, and troubleshoot system alarms.
G76 Threading Cycle (Turning): CNC Programming & Setup Guide
Master the G76 thread cutting cycle on Fanuc, Siemens, and Mitsubishi controls. Prevent crashes, avoid Alarm 61815, and set parameters without decimals.