CNC Programming Tutorials Examples G & M Codes

G & M Programming Tutorial Example Code for Beginner to Advance Level CNC Machinist.

Sinumerik CYCLE89 Bore 5

Sinumerik CYCLE89 Bore 5

Sinumerik CYCLE89 Bore 5 In Sinumerik CYCLE89 “Bore 5” cycle, the inwards and the upwards movements are performed at the F value programmed before the cycle call. On reaching the final…

Sinumerik CYCLE88 Bore 4

Sinumerik CYCLE88 Bore 4

Sinumerik CYCLE88 Bore 4 In Sinumerik CYCLE88 “Bore 4” cycle, a dwell time is effected on reaching the final drilling depth together with a spindle stop without orientation and a programmed…

Sinumerik CYCLE87 Bore 3

Sinumerik CYCLE87 Bore 3

Sinumerik CYCLE87 Bore 3 In Sinumerik CYCLE87 “Bore 3” cycle, a spindle stop without orientation is effected on reaching the final drilling depth, followed by a programmed stop. By pressing the…

Sinumerik CYCLE86 Bore 2

Sinumerik CYCLE86 Bore 2

Sinumerik CYCLE86 Bore 2 In the CYCLE86 “Bore 2” cycle, an oriented spindle stop is performed on reaching the drilling depth. The tool then travels at rapid traverse to the…

Sinumerik CYCLE85 Bore 1

Sinumerik CYCLE85 Bore 1

Sinumerik CYCLE85 Bore 1 In the CYCLE85 “Bore 1” cycle, the inward and outward motions are performed at a feedrate that must be specified under the relevant parameters. Programming CYCLE85…

Sinumerik CYCLE840 Tapping with Floating Tapholder

Sinumerik CYCLE840 Tapping with Floating Tapholder

Sinumerik CYCLE840 Tapping with Floating Tapholder With Sinumerik CYCLE840 cycle, tapped holes can be produced with floating tapholder without encoder with encoder. For tapping without floating tapholder (rigid taping) CYCLE84…

Sinumerik CYCLE84 Rigid Tapping Cycle

Sinumerik CYCLE84 Rigid Tapping Cycle

Sinumerik CYCLE84 Rigid Tapping Cycle CYCLE84 produces tapped holes without using a floating tapholder. CYCLE84 can be applied only if the spindle designated for drilling is capable of working in the position-controlled spindle…

Okuma G76 Fine Boring Cycle

Okuma G76 Fine Boring Cycle

Okuma G76 Fine Boring Cycle G76 Fine Boring Cycle Programming G76 X__Y__Z__R__Q__(I__J__) P__F__ Parameters Parameter Description X,Y Coordinate values of hole position Z Hole bottom level R Point R level…

Okuma G74 Reverse Tapping Cycle

Okuma G74 Reverse Tapping Cycle

Okuma G74 Reverse Tapping Cycle G74 Reverse Tapping Cycle Programming G74 X__Y__Z__R__P__Q__F__ Parameters Parameter Description X,Y Coordinate values of hole position Z Hole bottom level In G90 mode: Position in…

Okuma G73 High Speed Deep Hole Drilling Cycle

Okuma G73 High Speed Deep Hole Drilling Cycle

Okuma G73 High Speed Deep Hole Drilling Cycle G73 High Speed Deep Hole Drilling Cycle Programming G73 X__Y__Z__R__P__Q__F__ Parameters Parameter Description X,Y Coordinate values of hole position Z Hole bottom…

Anilam G172 Rectangular Profile Cycle

Anilam G172 Rectangular Profile 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…

Anilam CNC G171 Circular Profile Cycle

Anilam G171 Circular Profile Cycle

G171 Circular Profile Cycle Anilam G171 Circular Profile Cycle cleans up the inside or outside profile of an existing circle. Programming G171 Xn Yn Hn Dn Zn An Rn Bn…

ANILAM CNC

Anilam CNC Program Comments

Comments in Anilam Programs In Anilam CNC programmer can use an asterisk (*) to make comments within a Program Listing or to mask all or part of a block from…

OSAI CNC Control

Osai DIS – Displaying a Variable Command

Osai DIS Command Osai DIS command allows values to be displayed to the operator. The control will show the value in the screen area that is reserved for communications with…

Osai CNC Control

Osai DGS (DCG) – Disable Graphic Scale Command

Osai DGS (DCG) Command Osai DGS command disables the graphic display, deletes the displayed profile, and removes the system of coordinates from the screen. After using the DGS command you…

OSAI CNC Control

Osai CGS (CLG) – Clear Graphic Screen Command

Osai CGS (CLG) Command Osai CGS command clears the profile from the screen leaving the system of coordinates. Programming (CGS)

Osai CNC Control

Osai UGS (UCG) Command – Use Graphic Scale (Machine plot) / Use 3D Graphic Scale

Osai UGS (UCG) – Use Graphic Scale (Machine plot) Osai 10 Series UGS command initialises the graphic display and establishes the limits and the orientation of the graphic display. Programming…

Osai SSL - Spindle Speed Limit Command

Osai SSL – Spindle Speed Limit Command

Osai 10 Series command SSL is used with G96 to set the maximum rpm that the spindle is allowed to run during CSS. Programming SSL=value Parameters Parameter Description value Is…

ECS G89 Boring with Dwell Cycle

ECS G89 Boring with Dwell Cycle

ECS G89 Boring with Dwell Cycle This cycle differs from the standard Boring cycle G85 allowing to program a dwell time (TIM sec) between the arrival to the ENT quote,…

ECS G87 Boring with Retraction Cycle

ECS G87 Boring with Retraction Cycle

ECS G87 Boring with Retraction Cycle This cycle differs from the “Boring with Spindle Stop” G86 because in this case, when tool reaches the ENT quote, the spindle is not…

ECS G86 Boring with Spindle stop Cycle

ECS G86 Boring with Spindle stop Cycle

ECS G86 Boring with Spindle stop Cycle The only difference between this cycle and the Standard Drilling G81 is that the spindle, reached the ENT quote is stopped It will…

ECS G85 Boring Cycle

ECS G85 Boring Cycle

ECS G85 Boring Cycle The only difference between this cycle and the Standard Drilling G81 is that the tool return to RAL quote is done at working feed, between ENT…

ECS G84 Tapping

ECS G84 Tapping Cycle

ECS G84 Tapping This cycle is used to tap when the Milling Machine spindle is not equipped with of a position transducer. In this case it is suggested also to…

ECS G83/r Deep Drilling with Dwell for chip breaking

ECS G83/r Deep Drilling with Dwell for chip breaking Cycle

ECS G83/r Deep Drilling with Dwell for chip breaking The differences between this cycle and the deep drilling G83 are: At the end of every drilling step it is executed…

ECS G83 Deep Drilling with clearing

ECS G83 Deep Drilling with clearing Cycle

ECS G83 Deep Drilling with clearing This cycle is normally used to drill deep holes. The first drill the bit will reach the quote defined with the parameter INI. After…

ECS G82 Drilling with Dwell for chip breaking

ECS G82 Drilling with Dwell for chip breaking Cycle

ECS G82 Drilling with Dwell for chip breaking The only difference between this cycle and the standard drilling G81 is the dwell done by the bit after it reached the…

ECS G81 3 Layers Drilling

ECS G81/3 – 3 Layers Drilling Cycle

ECS G81/3 – 3 Layers Drilling With this cycle it is possible to drill holes defining two zones where the bit will advance at different feeds ( normally lower) than…

ECS G81 Standard Drilling

ECS G81 Standard Drilling Cycle

ECS G81 Standard Drilling The  cycle Data Entry is activated, in MDI and Edit modes, through this keys sequence: Programming G81 <ENT=..> <RAP=..> <RAL=..> Parameters Parameter Description ENT Depth  quote…

Haas Corner Rounding and Chamfering Program Example

Haas Corner Rounding and Chamfering Program Example

O00025 T2 M06 (.5 END MILL) (D=.5) G00 G90 G54 X-1.5 Y0 S5000 M03 G43 H02 Z1. M08 G01 Z-0.5 F80. G01 G41 D02 Y-0.5 F80. G03 X-1. Y0 R0.5…

Fanuc G43 G44 G49 Tool Length Compensation

Fanuc G43 G44 G49 Tool Length Compensation

G43 Tool Length Compensation positive With G43 a value from the offset register (OFFSET) can be called up and added to tool length. To all following Z movements (with active…

Fanuc G33 Thread Cutting

Fanuc G33 Thread Cutting – CNC Mill

Fanuc G33 Thread Cutting With a fitting tool (boring or facing head) threads can be cut. Notes •Feed and spindle override switch are not active while G33 (100%). Programming N… G33…

Fanuc G28 Approach Reference Point Example

Fanuc G28 Approach Reference Point

Fanuc G28 Approach Reference Point With G28 the reference point will be approached via an intermediate position (X, Y, Z). First is the movement to X, Y and Z, then…

Fanuc G17 G18 G19 Plane Selection

Fanuc G17 G18 G19 Plane Selection

Fanuc G17 G18 G19 Plane Selection With G17 G18 G19 the plane will be defined, in which circular interpolation and polar coordinate interpolation can be proceeded and in which the…

Fanuc G15 G16 End Begin Polar Coordinate Interpolation

Fanuc G15 G16 End / Begin Polar Coordinate Interpolation

G15 End Polar Coordinate Interpolation G15 End Polar Coordinate Interpolation Programming G15 G16 Begin Polar Coordinate Interpolation G16 Begin Polar Coordinate Interpolation Programming G16 Between G16 and G15 points can…

Okuma M203 Turret Unclamp Command (NC turret)

Okuma M203 Turret Unclamp Command (NC turret)

Okuma M203 is one of the Operation Time Reduction Function. Note: Use M203 with care. Okuma M203 Turret Unclamp Command The NC simultaneously unclamps the turret and causes axis travel…