STUDY OF G CODES M CODES USED IN CNC LATHE HMT CNC- T70
G CODES
G00   RAPID TRAVERSEPOSITIONING
G01   LINEAR INTERPOLATION
G02   CIRCULAR INTERPOLATION CLOCKWISE
G03   CIRCULAR INTERPOLATION COUNTERCLOCKWISE
G04   DWELL
G25   PROGRAM TRANSFER FROMSYSTEM.
G26   PROGRAM TRANSFER TO SYSTEM
G33   THREADING
G37   SUBROUTINE CALL
G38   SUBROUTINESTART
G39   SUBROUTINE END
G65   CASSETTE LOAD
G66   CASSETTE SAVE
G67   CASSETTE SEARCH
G70   INCH MODE
G71   METRIC MODE
G81   TURNINGCYCLE
G84   THREADING CYCLE
G83   DRILLING WITH DWELL
G90   ABSOLUTEPROGRAMMING
G91   INCREMENTALPROGRAMMING
G92   PROGRAM PRESET
G94   FEED PER MINUTE
G95   FEED PER REVOLUTION
M CODES
M00   PROGRAMSTOP
M02   PROGRAMEND
M30   PROGRAM END AND REWIND
VMC 200 T MACHINING CENTRE
G CODES
G00   RAPID TRAVEERSEPOSITIONING
G01   LINEAR INTERPOLATION
G02   CIRCULAR INTERPOLATION CLOCKWISE
G03   CIRCULAR INTERPOLATION COUNTERCLOCKWISE
G04   DWELL
G17   INTERPOLATION X-YPLANE
G18   INTERPOLATION X-ZPLANE
G19   INTERPOLATION Y-ZPLANE
G25   PROGRAM TRANSFER FROMSYSTEM
G26   PROGRAM TRANSFER TO SYSTEM
G37   SUBROUTINE CALL
G38   SUBROUTINESTART
G39   SUBROUTINE END
G40   CUTTER COMPONSATIONCANCEL
G41   CUTTER COMPONSATION LEFT
G42   CUTTER COMPONSATION RIGHT
G65   CASSETTE LOAD
G66   CASSETTE SAVE
G67   CASSETTESEARCH
G70   INCH MODE
G71   METRIC MODE
G80   CANNEDCYCLECANCEL
G82   DRILLING CYCLE
G83   DRILLING WITH DWELL CYCLE
G84   PECKDRILL/WITHDRAWLCYCLE
G85   BORING CYCLE
G86   PCD DRILLING CYCLE
G88   RECTANGULAR MILLINGCYCLE
G89   CIRCULAR MILLING CYCLE
G90   ABSOLUTE PROGRAMMING
G91   INCREMENTALPROGRAMMING
G92   PROGRAM PRE SET
M CODES
M00   PROGRAM STOP
M02   END OF PROGRAM
M03   SPINDLESTARTCW
M04   SPINDLESTARTCCW
M05   SPINDLE STOP
M06   TOOL CHANGE PROMPTING
M30   END OF PROGRAM&REWIND
               G-CODES
                                    G91:   INCREMENTAL
G00: POSITIONING                    G92:   COORDINATESYSTEMSETTINGOR
G01: LINEAR INTERPOLATION                  MAX. SPINDLE SPEED SETTING
G02: CIRCULAR INTERPOLATION CW      G94:   PER MINUTE FEED
G03: CIRCULARINTERPOLATIONCCW       G95:   PER REVOLUTION FEED
G04: DWELL                          G96:   CONSTANT SURFACE SPEED (O)
G10: OFF SET VALUESETTING(O)        G97:   REVOLUTION PER MINUTE (RPM)
G20: INCH
G21: METRIC                                       M-CODES
G22: STORED STROKE CHECK ON(O)
G23: STORED STROKE CHECKOFF(O)      M00: PROGRAM STOP
G25: SPINDLE SPEED DETECT OFF       M01: OPTIONAL STOP
G26: SPINDLE SPEED DETECT ON        M02: PROGRAM END AND RESTART
G27: REF. POINT RETURN CHECK        M03: SPINDLE ROTATION CW
G28: REF. POINT RETURN              M04: SPINDLE ROTATION CCW
G30: 2ND (3,4)REF.POINTRETURN       M05: SPINDLE STOP
G31: SKIP CUTTING                   M07: COOLANT ON
G33: THREAD CUTTING                 M09: COOLANT OFF
G34: VARIABLE LEAD THREAD CUTTING   M10: CHUCK DECLAMP
G36: AUTO TOOL OFF STE X-AXIS (O)   M11: CHUCK CLAMP
G37: AUTO TOOL OFF SET Z-AXIS (O)   M16: CHUCK 1D SELECTION
G40: TOOL NOSE RADIUS               M18: CHUCK 0D SELECTION
        COMPENSATION CANCEL         M19: SPINDLE ORIENTATION
G41: TOOL NOSE RADIUS               M20: SPINDLE ORIENTATION CANCEL
       COMPENSATION LEFT (O)        M30: END OF MAIN PROGRAM
G42: TOOL NOSE RADIUS               M32: TAILSTOCK QUIL FORWARD
       COMPENSATION RIGHT (O)       M33: TAILSTOCK QUIL RETRACT
G53: SUPPRSSION OFZEROOFFSET        M35: PARTS CATCHE RETRACT
G54: SETTABLE ZERO OFFSET           M46: DOOR OPEN
G55: SETTABLEZEROOFFSET             M47: DOOR CLOSE
G56: SETTABLEZEROOFFSET             M50: SPINDLE LOCK
G57: SETTABLEZEROOFFSET             M51: SPINDLE UNLOCK
G65: MACRO CALL (O)                 M78: STEADY REST OPEN
G68: DOUBLE TURRETS MIRROR ON (     M79: STEADY REST HOLD
G69: DOUBLE TURRETS MIRROR OFF      M82: TAIL STOCK BODY FWD /
G70: FINISHING CYCLE (O)            UNCLAMP
G71: ROUGH CUTTING (TURNING)        M83: TAILSTOCK BODY RET / CLAMP
(O) G72:   ROUGH CUTTING            M84: TOUCH PROBE ARM FORWARD
(FACING) (O) G73: ROUGH CUTTING     M85: TOUCH PROBE ARM RETRACT
(PROFILE) (O) G74:     GROOVING     M98: SUB PROGRAM CALL
(FACING) (O)                        M99: SUB PROGRAM END
G75: GROOVING TURNING (O)
G76: THREAD CUTTING CYCLE (MULTI)
(O) G77:   TURNING CYCLE
G78: THREAD CUTTING
CYCLE G79: FACING CYCLE
G90: ABSOLUTE
                             L Mill 55 VERTICAL MACHINIG
                                   CENTRE G CODES
G00   Rapid positioning                      G74   Reverse tapping cycle
G01   Linear interpolation                   G76   Fine boring cycle
G02   Circular interpolation CW              G80   Canned cycle cancel
G03   Circular interpolation CCW             G81   Drilling cycle
G04   Dwell                                  G82   Counter boring cycle
G09   Exact stop                             G83   Peck drilling cycle
G10   Data setting                           G84   Tapping cycle
G20   Inch input                             G85   Boring cycle
G21   Metric input                           G86   Boring cycle
G28   Zero return                            G87   Back boring cycle
G30   Second Reference Point                 G88   Boring cycle
G40   Tool nose radius compensation cancel   G89   Boring cycle
G41   Tool nose radius compensation left     G90   Absolute command
G42   Tool nose radius compensation right    G91   Incremental command
G43   Tool length offset                     G98   Initial point level return (canned
                                                   cycle)
G52   Location coordinate system             G99   Point R level return
G53   Machine coordinate system selection
G54   Work coordinate system 1 selection
G55   Work coordinate system 2 selection
G56   Work coordinate system 3 selection
G57   Work coordinate system 4 selection
G58   Work coordinate system 5 selection
G59   Work co ordinate system 6 selection
G73   Peck drilling cycle
              L Mill 55 VERTICAL MACHINIG CENTRE
                                M CODES
M00 Temporary program stop
M01 Optional stop
M02 Program end
M03 CW spindle rotation
M04 CCW spindle rotation
M05 Spindle stop
M06 Tool change
M07 Secondary coolant ON
M08 Coolant pump ON
M10 4th axis clamp
M11 4th axis unclamp
M19 Spindle oriented stop
M30 Program end and rewind
M50 Oil hole coolant on
M60 Loading pallet B
M62 Loading pallet A
M63 Unloading pallet A
M73 Y - Axis mirror image off
M74 Y - Axis mirror image on
M75 X - Axis mirror image off
M76 X - Axis mirror image on
M98 Sub-program call
M99 Sub-program end
PART PROGRAMMING MANUAL
CANNED CYCLE-G71-G76 (MULTIPLE REPETITIVE CYCLE) :
G71 STOCK REMOVAL IN TURING.
G71 U_R_;
G71 P_Q_U_W_F_;
G71 U∆d Re;
G71 pnsQnfU∆uW∆wFf;
∆d     =    Depth of cut in radius
e       =    Tool escape / tool retraction distance
ns      =   Sequence number of the first block of the program which specifies the finish
figure.
nf      =
        Sequence number of the last block of the program which specifies the finish figure.
∆u   = Finish allowance on “x”axis / diameter
F     =  Feed.
                           JOBBER XL CNC LATHE
                    G-CODES               G90: ABSOLUTE
G00:   POSITIONING                        G91: INCREMENTAL
G01:   LINEAR INTERPOLATION               G92: COORDINATE SYSTEM SETTING OR
G02:   CIRCULAR INTERPOLATION CW               MAX. SPINDLE SPEED SETTING
G03:   CIRCULAR INTERPOLATION CCW         G94: PER MINUTE FEED
G04:   DWELL                              G95: PER REVOLUTION FEED
G10:   OFF SET VALUE SETTING (O)          G96: CONSTANT SURFACE SPEED (O)
G20:   INCH                               G97: REVOLUTION PER MINUTE (RPM)
G21:   METRIC                                           M-CODES
G22:   STORED STROKE CHECK ON (O)         M00: PROGRAM STOP
G23:   STORED STROKE CHECK OFF (O)        M01: OPTIONAL STOP
G25:   SPINDLE SPEED DETECT OFF           M02: PROGRAM END AND RESTART
G26:   SPINDLE SPEED DETECT ON            M03: SPINDLE ROTATION CW
G27:   REF. POINT RETURN CHECK            M04: SPINDLE ROTATION CCW
G28:   REF. POINT RETURN                  M05: SPINDLE STOP
G30:   2ND (3,4) REF. POINT RETURN        M07: COOLANT ON
G31:   SKIP CUTTING                       M09: COOLANT OFF
G33:   THREAD CUTTING                     M10: CHUCK DECLAMP
G34:   VARIABLE LEAD THREAD CUTTING (O)   M11: CHUCK CLAMP
G36:   AUTO TOOL OFF STE X-AXIS (O)       M16: CHUCK 1D SELECTION
G37:   AUTO TOOL OFF SET Z-AXIS (O)       M18: CHUCK 0D SELECTION
G40:   TOOL NOSE RADIUS COMPENSATION      M19: SPINDLE ORIENTATION
        CANCEL                            M20: SPINDLE ORIENTATION CANCEL
G41:   TOOL NOSE RADIUS COMPENSATION      M30: END OF MAIN PROGRAM
       LEFT (O)                           M32: TAILSTOCK QUIL FORWARD
G42:   TOOL NOSE RADIUS COMPENSATION      M33: TAILSTOCK QUIL RETRACT
       RIGHT (O)                          M35: PARTS CATCHE RETRACT
G53:   SUPPRSSION OF ZERO OFFSET          M46: DOOR OPEN
G54:   SETTABLE ZERO OFFSET               M47: DOOR CLOSE
G55:   SETTABLE ZERO OFFSET               M50: SPINDLE LOCK
G56:   SETTABLE ZERO OFFSET               M51: SPINDLE UNLOCK
G57:   SETTABLE ZERO OFFSET               M78: STEADY REST OPEN
G65:   MACRO CALL (O)                     M79: STEADY REST HOLD
G68:   DOUBLE TURRETS MIRROR ON (O)       M82: TAIL STOCK BODY FWD / UNCLAMP
G69:   DOUBLE TURRETS MIRROR OFF          M83: TAILSTOCK BODY RET / CLAMP
G70:   FINISHING CYCLE (O)                M84: TOUCH PROBE ARM FORWARD
G71:   ROUGH CUTTING (TURNING) (O)        M85: TOUCH PROBE ARM RETRACT
G72:   ROUGH CUTTING (FACING) (O)         M98: SUB PROGRAM CALL
G73:   ROUGH CUTTING (PROFILE) (O)        M99: SUB PROGRAM END
G74:   GROOVING (FACING) (O)
G75:   GROOVING TURNING (O)
G76:   THREAD CUTTING CYCLE (MULTI) (O)
G77:   TURNING CYCLE
G78:   THREAD CUTTING CYCLE
G79:   FACING CYCLE
EX:NO: 1
DATE: 22.01.15
        PROGRAMMING, SIMULATION AND MACHINING PROFILE TURNING
        USING CNC - T70 LATHE
        AIM:
        To write a programme for the given component and execute the same in T70 Trainmaster Lathe.
        TOOLS REQUIRED:
        1. Tools
        2. Aluminium shaft
        3.vernier caliper
        PROCEDURE
        1.For the given dimensions of the work piece to be machined write the program using G codes
        and M codes
        2. Using the simulation software or by running the machine in test mode check the
        program and if there is any error make the correction in the program.
        3. Fix the work piece on the chuck
        4. Move the tool to the start point of the work piece by manual mode.
        5. Reset the Machine.
        6. Change the machine from manual mode to single block mode or auto mode.
        7. Execute the program to get the required shape of the work piece.
        8. Remove the machined work piece from the chuck
PROGRAM
  %
  N01 G90 – Absolute programming
  N02 G71 – Metric Mode
  N03 G92 X0Z0 Program pre set
  N04 G81 X-200 Z-6500 F200      (G81 – Turning cycle)
  N05 G81 X-400 Z-5500
  N06 G81 X-600 Z-4500
  N07 G81 X-800 Z-3500
  N08 G81 X-1000 Z-3400
  N09 G81 X-1200 Z-3300
  N10 G01 X-1500 Z0
  N11 G01 X-1300 Z-200
  N12 G01 X-1300 Z-3000
  N13 G02 X-900 Z-3500 I500 K0
  N14 G01 X-400 Z-5500
  N15 G01 X-400 Z-6500
  N16 G01 X0 Z-6500
  N17 G01 Z0
  N18 M30
  %
Result
         The part program for producing the given model is written and the given aluminium work
piece is machined to the given dimension
CNC Lathe: T70
       1.Profile Turning using CNC - T 70 lathe
Profile Turning 1
EX:NO: 2
DATE: 05.02.15
         PROGRAMMING, SIMULATION AND MACHINING PROFILE TURNING
              AND THREAD CUTTING USING ACE JOBBER XL CNC LATHE
        AIM:
        To write a programme for the given component and execute the same in ACE Jobber XL
        Lathe.
        TOOLS REQUIRED:
        1. Tool
        2. Mild Steel shaft
        3.Micro meter
        4. Vernier
        PROCEDURE:
        1.For the given dimensions of the work piece to be machined write the program using
          G codes and M codes
        2. Using the simulation software or by running the machine in test mode check the
          Program and if there is any error make the correction in the program.
        3. Fix the work piece on the chucks.
        4. Move the tool to the start point of the work piece by manual mode.
        5. Reset the Machine.
        6. Change the machine from manual mode to single block mode or auto mode.
        7. Execute the program to get the required shape of the work piece.
        8. Remove the machined work piece from the chuck.
PROGRAM: (Z)
  %O0004
  T0000
  G21
  (FACING)
  G0T0801
  G97S1200M04
  G0X55.0Z0M07
  G99G1X-1.0F0.2
  G0Z2.0
  (OD TURNING)
  G92S1250M04
  G96S210
  X51.0
  Z1.0
  G71U1.0R2.0
  G71P1Q3U0.2W0.12F0.15
  N1G0X21.0
  G01X21.0Z0
  G1X25.0Z-2.0
  Z-30.0
  G2X35.0Z-35.0R5.0
  G1X43.0Z-55.0
  Z-65.0
  N3X51.0
  G97M09
  T0000
  G00X0Z0
  (FINISHING)
  T0402
  G92S1200M04
  G96S240
  X55.0Z2.0M07
  G70P1Q3F0.1
  G97M09
  T0000
  G28U0W0
  (THREADING)
  T0304;
  G00X0Z-100.0;
  G97S100M04;
   G00X25.0Z5.0;
   G76P020060Q200R100;
   G76X23.268Z-25.0P866Q400F1.0;
   S0T0000;
   G0X0Z-100.0M09;
   M05
   M30
RESULT:
      The part program for the given model is written and the given Component is
machined to the given dimension.
Profile Turning
EX:NO: 3
DATE: 12.02.15
            PROGRAMMING, SIMULATION AND MACHINING LETTER
                           MILLING USING CNC VMC 200 T
        AIM:
                 To write a programme for the given component and execute the same in
        VMC200T Trainmaster.
        TOOLS REQUIRED:
        1. Tools
        2. Aluminium shaft
        3.vernier caliper
        PROCEDURE:
        1.For the given dimensions of the work piece to be machined write the program using G
        codes and M codes
        2. Using the simulation software or by running the machine in test mode check the
        program and if there is any error make the correction in the program.
        3. Fix the work piece on the vice.
        4. Move the tool to the start point of the work piece by manual mode.
         5. Reset the Machine.
        6. Change the machine from manual mode to single block mode or auto mode.
        7. Execute the program to get the required shape of the work piece.
        8. Remove the machined work piece from the vice.
PROGRAM:
    %
    N01    G90
    N02    M03S200
    N03    G17
    N04    G01 X2000 Y5000 F80
    N05    G18
    N06    G01Z-500
    N07    G17
    N08    G01 Y2000
    N09    G18
    N10    G01 Z500
    N11    G17
    N12    G01 Y3500
    N13    G18
    N14    G01 Z-500
    N15    G17
    N16    G01 X5000 Y5000
    N17    G18
    N18    G01 Z500
    N19    G17
    N20    G01 X3000 Y4000
    N21    G18
    N22    G01 Z-500
    N23    G17
    N24    G01 X5000 Y2000
    N25    G18
    N26    G01 Z500
    N27    G17
    N28    G01 X9000 Y5000
    N29    G18
    N30    G01 Z-500
    N31    G17
    N32    G01 X6000 Y5000
    N33    G01 Y2000
    N34    G01 X9000
    N35    G18
    N36    G01 Z500
    N37    G17
    N38    G01 X6000 Y3500
    N39    G18
    N40    G01 Z-500
    N41    G17
    N42    G01 X8000
    N43    G18
    N44    G01 Z500
    N45    G17
    N46    G01 X12600 Y2500
    N47    G18
              N48    G01 Z-500
              N49    G17
              N50    G02 X12600 Y4500 I-1100 J1000
              N51    G18
              N52    G01 Z500
              N53    G17
              N54    G01 X0Y0
              N55    M30
              %
   RESULT:
        The part program for producing the given model is written and the given aluminium work
piece is machined to the given dimension.
CNC Milling: 200T
         Letter Milling-1 using VMC 200 T
EX:NO: 4
DATE: 19.02.15
            PROGRAMMING, SIMULATION AND PECK DRILLING & BORING
                  USING CNC LMILL 55 VERTICAL MACHINING CENTRE
        AIM:
                 To write a programme for machining the given Component and execute the same
        in L MILL55 Vertical Machining Centre.
        TOOLS REQUIRED:
        1. Tool
        2. Mild Steel shaft
        3.Micro meter
        4. Vernier
        PROCEDURE:
        1.Study the Drawing Carefully to plan for the Machining operations.
        2. Use the Man Machine Interface to Programme for the given Geometry.
        3. Set the job and the offset for the given Workpiece.
        4. Use the Processor for the operation sequence and set the parameters of the operation.
        5. Select all the operations for the Simulation purpose and execute the program and verify
        the same in L MILL55 Vertical Machining Centre.
        6. Execute the Program and Remove the work piece from the Clamp.
PROGRAM:
O0020 (PECK DRILLING & BOARING);
N01
G0G91G28Z0
G28X0Y0
T04 (Centre drill)
M06
M03S800
G0G56G40G49X0Y0Z10.0
G01Z-10.0F5.0
G0Z0
M05
N02
G0G91G28Z0
G28X0Y0
T05(Drill dia 10.2mm)
M06
M03S800
G95G98G83X0Y0Z-140.0R-100.Q5.0F5.0
G80
M05
G91G28Z0
N03
T08 (U Drill dia22mm)
M06
M03S600
G0G58G40G49X0Y0Z0
G95G98G83X0Y0Z-140.R-100.Q5.F5.0
G80
M05
G91G28X0Y0
N4
T10 (Boring bar dia23)
M06
M03S800
G0G90G59G40G49X0Y0Z0
G95G98G86X0Y0Z-140.R-100.F5.0
M05
G80
G91G28Z0
G28X0M30
RESULT:
     The part program for the given model is written and the given Component is
machined to the given dimension
EX:NO: 5
DATE: 05.03.15
              NC CODE GENERATION USING MASTER CAM LATHE
 AIM:
 To generate the NC codes for given profile operation in master CAM lathe
 COMMANDS USED:
   1.    Lines
   2.    Fillet
   3.    Tool Path
   4.    Operation
   5.    Job Setup.
 PROCEDURE:
    1. Using lines command draw the basic given profile in the editor by using Multi
           points option.
    2. Use fillet wherever needed.
    3. Select Tool Path -> Rough -> Chain and select the lines at each extreme.
    4. Then choose Tool path -> Job setup -> Boundary -> Parameters -> OD and Length.
    5. Select Done.
 CODE GENERATION :
        1. Select Operation ->Regen Path -> Verify (iso) -> Post.
        2. To get the code select Save.
 RESULT:
           Thus for given profile the NC code has been generated using master
           camlathe.
                                            Profile Turning
EX:NO: 6
DATE: 19.03.2015
         NC CODE GENERATION USING MASTER CAM LATHE
 AIM:
            To generate the NC codes for given profile operation in master CAM lathe
 COMMANDS USED:
 Lines, Fillet, Tool Path , operation, job Setup.
 PROCEDURE:
 1. Select Create ->Rectangle ->I point ->Enter width and height in the dialog box which
 appears.
 2. Select Main menu ->Tool Path ->Contour or Pocketing ->Chain ->Select the required
     items and click on OK.
 3. select Tool Path dialog box give the tool diameter and depth.
 4. Select .fob Setup ->Enter x, y, z values and click on OK.
 CODE GENERATION :
     1. Select Operation ->Regen Path -> Verify (iso) -> Post.
     2. To get the code select Save.
 RESULT:
 Thus for given profile the NC code has been generated using Master CAM Mill.
     5
30