Learn CNC G-Code Programming by Examples

CNC Programming Tutorials, G-Codes, Courses for CNC Programmers Machinists Operators.

SINUMERIK 810T CNC Program Example Disk Machining

SINUMERIK 810T CNC Program Example Disk Machining

%MPF126 N0005 G95 G96 S100 M40 M4 N0010 G0 X205 Z30 T1 D1 N0015 G1 X30 F.25 M8 N0020 G00 X198 Z31 N0025 G1 Z16 N0030 G0 X200 Z31 N0035…

Selca CNC Programming Example

Selca CNC Programming Example

N1 [PROFILE 11 N2 $1M0X-158.I155.Y-84.6J115. N3 G17 N4 O1 N5 T1 N6 F1000S1200M3 N7 Z100R N8 X0Y-70R N9 Z2R N10 Z-10 N11 G49I5 N12 G41K2 N13 G20X0Y0I-52.5 N14 G21I15 N15…

Selca CNC Program Example Profile

Selca CNC Program Example Profile

N1 [PROFILE 9 N2 $1M0X-116.I119.Y-45.3J105. N3 G17 N4 O1 N5 T1 N6 F1000S1200M3 N7 Z100R N8 X0Y0R N9 Z2R N10 Z-10 N11 G49I2.5 N12 G42K2 N13 E1=G20X25Y-32I-12 N14 E2=G20X-65Y21I-12 N15…

Selca CNC Program Example Complete

Selca CNC Program Example Complete

N1 [PROFILE 6 N2 $1M0X-110.I150.Y-82.4J83.7 N3 G17 N4 O1 N5 T1 N6 F1000S1200M3 N7 G49I1 N8 Z100R N9 X-75Y-75R N10 Z2R N11 Z-10 N12 G42K2 N13 E1=G13X0Y-80J180 N14 E1 N15…

Selca CNC Program Example

Selca CNC Program Example

N1 [PROFILE 5 N2 $1M0X-54.8I205.Y-83.4J82.8 N3 G17 N4 O1 N5 T1 N6 F1000S1200M3 N7 G49I5 N8 Z100R N9 X50Y-80R N10 Z2R N11 Z-10 N12 G42K2 N13 G13Y-70J0 N14 G21I30 N15…

Socket with Thread Fanuc 21i CNC Program Exercise

Socket with Thread Fanuc 21i CNC Program Exercise

( CONTROL FANUC 21I) ( PART – CYLINDER D102.000 L121.000) ( G54 X+000.000 Z+0240.000) O11 N10 G40 G00 N20 G99 N30 M5 N40 M9 N60 T0101 (LEFT CORNER TOOLCL-SDJCL-2020 L…

Haas Mill G107 Cylindrical Mapping Program Example

Haas Mill G107 Cylindrical Mapping Program Example

(G170 parameters) (X X-axis command) (Y Y-axis command) (Z Z-axis command) (A A-axis command) (Q Diameter of cylindrical surface) (R Radius of rotary axis) % O0079 (G107 TEST) T1 M06…

Mitsubishi CNC G07.1 Cylindrical Interpolation Program Example

Mitsubishi CNC G07.1 Cylindrical Interpolation Program Example

N01 G28 XZC; N02 T0202; N03 G97 S100 M23; N04 G00 X50. Z0.; N05 G94 G01 X40. F100.; N06 G19 C0 Z0; N07 G07.1 C20.; N08 G41; N09 G01 Z-10….

Example of Fanuc G07.1 Cylindrical Interpolation Program

Example of Fanuc G07.1 Cylindrical Interpolation Program

O0001 (CYLINDRICAL INTERPOLATION ); N01 G00 G90 Z100.0 C0 ; N02 G01 G91 G18 Z0 C0 ; N03 G07.1 C57299 ; N04 G90 G01 G42 Z120.0 D01 F250 ; N05…

Heidenhain Flex K Programming Example Complete

Heidenhain Flex K Programming Example Complete

0 BEGIN PGM FK3 MM 1 BLK FORM 0.1 Z X+0 Y+0 Z-40 2 BLK FORM 0.2 X+100 Y+100 Z+0 3 TOOL DEF 1 L+0 R+5 4 TOOL CALL 1…

Fanuc G07.1 Cylindrical Interpolation Example

Fanuc G07.1 Cylindrical Interpolation Example

O0002 (Cylindrical Interpolation) N15 T0505 N25 M13 (Driven tool ON clockwise) N30 G97 S2000 N32 M52 (Positioning of the spindle C-axis ON ) N35 G07.1 C19.1 (Start of the interpolation…

DOOSAN PUMA Macro-B OD Jaw Program (FANUC Series 31i)

% O8999 ( BORE JAWS – !!!DO NOT ERASE!!!) (****** DEFINE JAW DATA ******) #100=5.5 (STARTING DIA X) #101=6.5 (FINAL DIA X) #102=0.1 (DIA DEPTH PER PASS) #103=-3.5 (FINAL DEPTH…

Fanuc Bolt Hole Circle Custom Macro (BHC)

Fanuc Bolt Hole Circle Custom Macro (BHC)

/*Parameters G65 P9100 Xx Yy Zz Rr Ff Ii Aa Bb Hh X: X coordinate of the center of the circle (#24) Y: Y coordinate of the center of the…

Heidenhain Conversational CNC Program Example

Heidenhain Conversational CNC Program Example

0 BEGIN PGM FK2 MM 1 BLK FORM 0.1 Z X+0 Y+0 Z-40 2 BLK FORM 0.2 X+100 Y+100 Z+0 3 TOOL DEF 1 L+0 R+5 4 TOOL CALL 1…

Centroid G65 Macro Program for Slots of varying Depth and Length

Centroid G65 Macro Program for Slots of varying Depth and Length

;The main program would call this macro five times, ;each time specifying the depth and length required. ;macro variables would handle the length in the Y direction ;and depth in…

Example Programming Instructions for Coolant Driven Bar-puller Grippex

Okuma Program Example for Coolant Driven Bar-puller Grippex

. ;SUB Program . G0 X0 Z55 T090909 ;Change to Grippex (example) G0 Z-2 ;Approach bar to be pulled M08 ;Coolant ON, Grippex clamp G04 F2 ;Dwell G0 M84 ;Chuck…

Example Programming Instructions for Coolant Driven Bar-puller Grippex

Fanuc Programming Instructions for Coolant Driven Bar-puller Grippex

O0001 ;SUB Program G0 T1212 M5 X0. Z30. G1 G98 Z-80. F3000 M8 ;Coolant ON, Grippex clamp G4 U1. ;Dwell M69 ;Chuck unclamp G4 U0.1 ;Dwell G1 Z-1. ;Pulling-out the…

Heidenhain Flex K Programming Exercise

Heidenhain Flex K Programming Exercise

0 BEGIN PGM FK2 MM 1 BLK FORM 0.1 Z X+0 Y+0 Z-40 2 BLK FORM 0.2 X+100 Y+100 Z+0 3 TOOL DEF 1 L+0 R+5 4 TOOL CALL 1…

Heidenhain Conversational Programming Example

Heidenhain Conversational Programming Example

0 BEGIN PGM FK1 MM 1 BLK FORM 0.1 Z X-10 Y+0 Z-40 2 BLK FORM 0.2 X+110 Y+100 Z+0 3 TOOL DEF 1 L+0 R+5 4 TOOL CALL 1…

Heidenhain Flex K Programming Example

Heidenhain Flex K Programming Example

0 BEGIN PGM FK1 MM 1 BLK FORM 0.1 Z X-10 Y+0 Z-40 2 BLK FORM 0.2 X+110 Y+100 Z+0 3 TOOL DEF 1 L+0 R+5 4 TOOL CALL 1…

Helical Milling Exercise Heidenhain Conversational Programming

Helical Milling Exercise Heidenhain Conversational Programming

0 BEGIN PGM 10131 MM 1 BLK FORM 0.1 Z X+0 Y+0 Z-40 2 BLK FORM 0.2 X+100 Y+100 Z+0 3 TOOL DEF 1 4 TOOL DEF 2 5 TOOL…

Nesting Labels Exercise Heidenhain Conversational Programming

Nesting Labels Exercise Heidenhain Conversational Programming

0 BEGIN PGM 10130 MM 1 BLK FORM 0.1 Z X+0 Y+0 Z-20 2 BLK FORM 0.2 X+120 Y+70 Z+0 3 TOOL DEF 1 4 TOOL DEF 2 5 TOOL…

Sub-Program Exercise Heidenhain Conversational Programming

Sub-Program Exercise Heidenhain Conversational Programming

0 BEGIN PGM 10129 MM 1 BLK FORM 0.1 Z X+0 Y-70 Z-20 2 BLK FORM 0.2 X+100 Y+0 Z+0 3 TOOL DEF 1 4 TOOL CALL 1 Z S1000…

Repeat exercise Heidenhain Conversational Programming

Repeat exercise Heidenhain Conversational Programming

0 BEGIN PGM 10128 MM 1 BLK FORM 0.1 Z X+0 Y+0 Z-40 2 BLK FORM 0.2 X+100 Y+50 Z+0 3 TOOL DEF 1 4 TOOL CALL 1 Z S1000…

Rotation Exercise Heidenhain Conversational Programming

Rotation Exercise Heidenhain Conversational Programming

0 BEGIN PGM 10127 MM 1 BLK FORM 0.1 Z X-50 Y-50 Z-40 2 BLK FORM 0.2 X+50 Y+50 Z+0 3 TOOL DEF 1 4 TOOL CALL 1 Z S1000…

Mirror Image Exercise Heidenhain Conversational Programming

Mirror Image Exercise Heidenhain Conversational Programming

0 BEGIN PGM 10126 MM 1 BLK FORM 0.1 Z X-65 Y-65 Z-20 2 BLK FORM 0.2 X+65 Y+65 Z+0 3 TOOL DEF 1 4 TOOL CALL 1 Z S1000…

Grid Pattern Exercise with Linear Pattern (Cycle 221) Heidenhain Conversational Programming

Grid Pattern Exercise with Linear Pattern (Cycle 221) Heidenhain Conversational Programming

0 BEGIN PGM 10125 MM 1 BLK FORM 0.1 Z X+0 Y+0 Z-20 2 BLK FORM 0.2 X+100 Y+100 Z+0 3 TOOL DEF 1 L+0 R+3 4 TOOL CALL 1…

Circular Pattern (Cycle 220) Heidenhain Conversational Programming Exercise

Circular Pattern (Cycle 220) Heidenhain Conversational Programming Exercise

0 BEGIN PGM 10124 MM 1 BLK FORM 0.1 Z X+0 Y+0 Z-20 2 BLK FORM 0.2 X+120 Y+70 Z+0 3 TOOL DEF 1 4 TOOL DEF 2 5 TOOL…

Multipass Milling Exercise Heidenhain Conversational Programming

Multipass Milling Exercise Heidenhain Conversational Programming

0 BEGIN PGM 10123 MM 1 BLK FORM 0.1 Z X0 Y0 Z0 2 BLK FORM 0.2 X100 Y100 Z40 3 TOOL DEF 1 4 TOOL CALL 1 Z S2000…

Contour Train Exercise Heidenhain Conversational Programming

Contour Train Exercise Heidenhain Conversational Programming

0 BEGIN PGM 10121 MM 1 BLK FORM 0.1 Z X0 Y0 Z-40 2 BLK FORM 0.2 X100 Y100 Z0 3 TOOL DEF 1 4 TOOL CALL 1 Z S1000…

Island Clearance Exercise Heidenhain Conversational Programming

Island Clearance Exercise Heidenhain Conversational Programming

0 BEGIN PGM 10120 MM 1 BLK FORM 0.1 Z X+0 Y+0 Z-40 2 BLK FORM 0.2 X+100 Y+100 Z+0 3 TOOL DEF 1 4 TOOL DEF 2 5 TOOL…

External Stud, Circular Pocket and Circular Slot exercise Heidenhain Conversational Programming

External Stud, Circular Pocket and Circular Slot exercise Heidenhain Conversational Programming

0 BEGIN PGM 10119 MM 1 BLK FORM 0.1 Z X+0 Y+0 Z-40 2 BLK FORM 0.2 X+100 Y+100 Z+0 3 TOOL DEF 1 4 TOOL DEF 2 5 TOOL…

Pocket Milling Exercise Heidenhain Conversational Programming

Pocket Milling Exercise Heidenhain Conversational Programming

0 BEGIN PGM 10118 MM 1 BLK FORM 0.1 Z X+0 Y+0 Z-40 2 BLK FORM 0.2 X+100 Y+100 Z+0 3 TOOL DEF 1 4 TOOL CALL 1 Z S1000…

Slotting Cycle Heidenhain Conversational Programming Example

Slotting Cycle Heidenhain Conversational Programming Example

0 BEGIN PGM 10117 MM 1 BLK FORM 0.1 Z X+0 Y+0 Z-40 2 BLK FORM 0.2 X+100 Y+100 Z+0 3 TOOL DEF 1 4 TOOL CALL 1 Z S1000…

Rigid Tapping Cycle Heidenhain Conversational Programming Example

Rigid Tapping Cycle Heidenhain Conversational Programming Example

0 BEGIN PGM 10116D MM 1 BLK FORM 0.1 Z X+0 Y+0 Z-20 2 BLK FORM 0.2 X+100 Y+50 Z+20 3 TOOL DEF 2 4 TOOL CALL 2 Z S100…