A Circle Milling Custom Macro | Modern Machine Shop
- Automation 4 Mar 2026 Physical AI Eases Automation of High-Mix Manufacturing
- Turn/Mill 2 Mar 2026 Why Setups Are the Real Bottleneck in High-Mix Machining
- SPONSORED 1 Mar 2026 Tool Presetters Reduce Downtime, Human Errors and Scrap
- Grinding 27 Feb 2026 Studer Motion Meeting 2026 Emphasizes Strong Foundations
- Workforce Development 25 Feb 2026 Bridging the Blue-Collar Skills Shortage
- Shop Management Software 23 Feb 2026 Quoting in a Changing Industrial Landscape
- Basics 20 Feb 2026 When ‘U’ Want to Turn on a Mill
- How I Made It 18 Feb 2026 How I Made It: Clint Smith
- Turning Machines 16 Feb 2026 Multitasking Machines Scale Up Setup
- Basics 13 Feb 2026 7 Steps to Optimize Aggressive Roughing Operations
Older model Fanuc controls and some current model Fanuc-compatible controls have a feature to help you machine round counterbores with an end mill (G12 and G13). For some reason, Fanuc stopped providing these helpful G codes.
Mike Lynch Founder and President, CNC Concepts Inc. Share
VISIT SITE VISIT SHOWROOM Haitian Precision USA
Haitian Precision USA has been selling industrial machine tools since 2000 under the Absolute Group of Companies. Absolute started by selling and s...READ MORE
Featured Content
View MoreFeatured Videos
View More
VISIT SITE VISIT SHOWROOM GROB Systems, Inc.
For almost 100 years, GROB has been known worldwide for the development and manufacturing of machines and production lines. GROB is a family-owned com...READ MORE
Featured Content
View MoreFeatured Videos
View More
VISIT SITE VISIT SHOWROOM PrecisionX Group
PrecisionX Group is a leading custom contract manufacturer specializing in precision metal fabrication for critical-use applications across growth-ori...READ MORE
Featured Content
View More
VISIT SITE VISIT SHOWROOM Phillips Corporation - Education
Featured Content
View More
VISIT SITE VISIT SHOWROOM Mayfran International
Mayfran International is the world’s leading provider of quality material handling, filtration, and chip removal solutions. With an unrivaled...READ MORE
Featured Content
View MoreFeatured Videos
View More
VISIT SITE VISIT SHOWROOM Phillips Corporation
Featured Content
View More
VISIT SITE VISIT SHOWROOM Komo Machine, Inc.
Komo Machine, Inc. is a leading U.S. manufacturer of advanced, precision CNC machining systems engineered for demanding manufacturing applications. Wi...READ MORE
Featured Content
View MoreFeatured Videos
View More
VISIT SITE VISIT SHOWROOM Jergens, Inc.
Manufacturing Efficiency for 75 Years In 1942, Jergens Inc. opened its doors and began its journey to grow into one of the world’s largest m...READ MORE
Featured Content
View MoreFeatured Videos
View More
Older model Fanuc controls and some current model Fanuc-compatible controls have a feature to help you machine round counterbores with an end mill (G12 and G13). For some reason, Fanuc stopped providing these helpful G codes. If your control has custom macro B, you can get them back. This column shows one of these custom macros—the clockwise circle milling custom macro (like G12). With minor modifications, you can create the counter-clockwise version. This drawing shows the arguments to be used in the G65 command.
Here is a calling program that uses the circle milling custom macro:
O0001 (Main program) . (Machine hole) .N075 T04 M06 (1.0 END MILL)N080 G54 G90 S1200 M03 T05 (Start spindle)N085 G00 X2.5 Y2.0 (Rapid to hole-center)N090 G43 H04 Z0.1 (Rapid approach in Z)N095 M08 (Turn on coolant)N100 G65 P1000 X2.5 Y2.0 D3.0 R0.1 Z-1.0 A1.25 T1.0 F5.0 H1.0(Mill circle)N105 G91 G28 Z0 M19 (Return to tool change position)N110 M01 (Optional stop) . (Program continues) .N200 M30 (End of main program)
The H word is used to specify whether a hole currently exists in the center of the circle to be milled. If it does, the end mill will fast feed to the work surface in Z. If not, it will feed at half the specified feed rate (F word in G65 command).
Here is the custom macro:
O1000 (Circle milling custom macro) (TEST FOR MISSING ARGUMENTS)N1 IF [#24 EQ #0] GOTO 95 (X) IF [#25 EQ #0] GOTO 95 (Y) IF [#26 EQ #0] GOTO 95 (Z) IF [#18 EQ #0] GOTO 95 (R) IF [#7 EQ #0] GOTO 95 (D) IF [#20 EQ #0] GOTO 95 (T) IF [#9 EQ #0] GOTO 95 (F) IF [#1 EQ #0] GOTO 95 (A) IF[#11 EQ #0] GOTO 95 (H)(A MUST BE BIGGER THAN HALF OF T)IF [#1 GT [#20/2 +0.1]] GOTO 2 #3000=101(APPROACH RADIUS TOO SMALL) (RAPID TO APPROACH POSITION)N2 G00 X#24 Y#25] Z#18
(TEST FOR HOLE IN CENTER)IF[#11 EQ 1.0] GOTO 5 G01 Z#26 F#9 GOTO 6 N5 G01 Z#26 F[#9 * 5]
(MOTIONS TO MILL CIRCLE)N6 G01 Y[#25 + #7/2 - #1] F#9 X[#24 - #1 + #20/2] G02 X#24 Y[#25 + #7/2 - #20/2] R[#1 - #20/2] J-[#7/2 - #20/2] X[#24 + #1 - #20/2] Y[#25 + #7/2 -#1] R[#1 - #20/2] G00 Z#26 X#24 Y#25 GOTO 99 N95 #3000=100 (INPUT VALUE MISSING) N99 M99 (End of custom macro)
Loading Từ khóa » G12 Y G13 Cnc
-
G12 Circular Pocket Milling CW / G13 Circular Pocket Millin...
-
Fresado Circular G12 Y G13 - YouTube
-
CNC Milling | G12 And G13 Codes | Circular Pocket Cycles
-
CNC Dictionary: G12/G13 To Knee Mill
-
CNC Milling | G12 And G13 Codes | Circular Cutting - CNCForum.Net
-
CNC Milling | G12.4 And G13.4 Codes | Groove Cutting
-
PROGRAMMING WORKBOOK - Manualzz
-
Circular Milling - G12/G13 - CNC Zone
-
G12-13 - LinuxCNC Documentation Wiki
-
Mirror Image (G11, G12, G13, G10, G14) - Fagor CNC ... - ManualsLib
-
SUMMARY OF G-CODES - MachMotion