Anilam G172: Efficient Rectangular Profile Milling Cycle
Anilam G172 Rectangular Profile Cycle
Anilam G172 Rectangular Profile Cycle cleans up the inside or outside profile of a rectangle.
Programming
G172 Xn Yn Hn Mn Wn Zn An Rn Un Bn Sn In Jn Kn Pn
Parameters
| Parameter | Description |
|---|---|
| X | X coordinate of the center. If no coordinate is entered, the CNC centers the pocket at its present position. |
| Y | Y coordinate of the center. If no coordinate is entered, the CNC centers the pocket at its present position. |
| H | The Absolute Z position before beginning to mill the pocket. This must be 0.1 inch (or 2 mm) above the surface. |
| M | Finished length of rectangle. Required. |
| W | Finished width of rectangle. Required. |
| Z | Absolute depth of the finished profile. Value required. |
| A | 0 = Inside 1 = Outside |
| R | Radius of the ramping moves. Required. |
| U | Corner radius setting. If the programmer enters a negative value, both direction of cut and the starting and endpoints reverse. Optional. |
| B | Maximum Z-axis increment used for each pass. Optional. |
| S | Amount of stock left by the machine before the finish pass. Default: 0. If the programmer enters a negative value, the CNC will leave the stock without making a finish pass. Optional. |
| I | Z-axis feedrate. Optional. |
| J | Rough-pass feedrate. Optional. |
| K | Finish-pass feedrate. Optional. |
| P | Retract Hgt. |
Operation
When run, the CNC rapids to the Ramp #1 starting position, rapids to H (Z StartHgt), and then feeds to the depth of the first cut.
The machine feeds into the profile along Ramp #1, cuts the rectangle to the M (Length) and W (Width) specified then ramps away from the work along Ramp #2.
When cutting an inside profile, the Graphic Menu displays ramp moves.
When cutting an outside profile, the tool ramps into the profile along Ramp #1 and away from the profile along Ramp #2, as illustrated in Figure

Inside and Outside Profile Ramp Moves
The Rectangular Profile Cycle automatically compensates for tool diameter. Activate the correct tool diameter before the G172 block.
Notes
When you enter a value, the CNC executes the number of passes required to get from the H (Z Start HGT) to the Z (Z Depth), cutting the B (Z Max.cut) on each pass.
When you enter an S (Finish Stock) value, the CNC leaves the specified stock on the profile and depth for a finish pass. The CNC cuts the rectangle to the M (Length), W (Width), and Z (Z Depth) dimensions on the finish pass. Enter a negative S (Finish Stock) to leave the finish stock without making a finish pass.
When you do not enter a J (Rough Feed) or K (Finish Feed), the CNC executes feed moves at the current feedrate. J (RoughFeed) controls the feedrate of the roughing cycle. K (Finish Feed) controls the feedrate of the finishing cycle
CNC Machine
- Balancing Cycle Time and Surface Finish: Optimizing Productivity and Quality
- Fanuc G70 & G71 Roughing & Finishing Turning Cycle CNC Program Example
- Mastering the G90 Turning Cycle: A Comprehensive Guide to CNC Rough Turning and More
- Anilam CNC Mill 6000M G‑Code Reference – Complete Guide
- Anilam 4200T CNC Turning Controls: Master G Code Functions
- Comprehensive Haas G72 Type I Rough & G70 Finish Facing Cycle Program for Fanuc-Compatible Lathes
- Optimized Fanuc G71 Turning Cycle for CNC Lathe Precision
- Optimizing Fanuc G81 Drilling Cycle for Efficient Spot Drilling
- Mastering the Fanuc G82 Drilling Cycle: Precision Counterboring for Accurate Depths
- Anilam G171 Circular Profile Cycle – Efficient Interior & Exterior Circle Profiling