Mechanical Basics Production

63 G Codes and M Codes (28) of CNC Part Programming for GATE Exam

63 G Codes and M Codes (28) of CNC: Part programming is not a language programming but it is a coded programming method used for writing the programs for manufacturing of given components. Part Programming uses standard codes and code means the name given for the program written for a standard measurement of the tool.

These codes are used in part programming.G-Codes Stands for General Purpose Codes and M-Codes Stands for Miscellaneous or Machine Codes. Minimum 2 marks will come from this region. Therefore, In this article, I will be explaining about 20 G Codes and M Codes in a detailed manner.

Read: Iron-Carbon Phase Diagram for GATE exam

G Codes and M Codes
20 G Codes and M Codes(14) of CNC Part Programming-Especially for GATE Exam

20 G Codes and M Codes of CNC Part Programming:

20 G Codes and M Codes(14) of CNC Part Programming-Especially for GATE Exam is as follows.

1.G 00: Rapid Traverse: G00 Code stands for Rapid Traverse. It means that whenever the tool required to travel ideally without removing any material. It is required to travel at maximum possible speed, in such cases G00 Code will be used.

2.G 01: Linear Interpolation Whenever the tool required to travel in a straight line path, G 01 Code will be used.

3. G 02: Circular Interpolation (Clockwise)

4.G 03: Circular Interpolation (Counter Clockwise) Whenever the tool is required in a contour path, G 02 or G 03 will be used.

5.G 04: Dwell Dwell indicates temporary stoppage of a tool in the machine for a specified duration.

6.G 05: Hold Hold indicates stoppage of a tool in the machine for Unlimited Duration. Ex: G04 F120 Here F120 indicates temporary stoppage duration in seconds.

7.G 08: Acceleration Whenever the machine is getting started, it has to start at the lowest velocity and reaches to the maximum velocity in a specified duration. For this, the G 08 Code will be used.

8.G 09: Retardation Whenever the tool is nearing to the destination, it has to reduce its velocity so that it is possible to stop the tool exactly whenever it is required. For this G 09 Code will be used. G 08 and G 09 are the Default codes used in part programming.

9.G 17: Movement of Tool in XY Plane

10.G 18: Movement of Tool in YZ Plane

11.G 19: Movement of Tool in ZX Plane

12.G 33: Thread Cutting with Constant Pitch.

13.G 34: Thread Cutting with Increasing Pitch.

14.G 35: Thread Cutting with Decreasing Pitch.

15.G 41: Tool Radius Compensation Left

16.G 42: Tool Radius Compensation Right

17.G 70: English Programming (Inches)

18.G 71: Metric Programming (mm)

19.G 90: Absolute Mode If each and every movement of the tool is indicated with reference to the only one single reference point called a machine reference point named as Absolute mode of Programming.

20.G 91: Incremental Mode. If the Present position of the tool is taken as a reference point for programming the next position of the tool called as Incremental mode of programming. These are the 20 G-Codes of CNC Part Programming.

Note: Even though incremental mode of programming is easy to write and modify but according to Indian conditions, we prefer to use absolute mode of programming only because during running of the program for producing the components if the power failure occurs, after restoring the power, it is very easy to identify where the program has got stopped if it is an absolute mode of program. The M Codes required in Part Programming are as follows which are very important for GATE Exam.

The above mentioned 20 codes are important for GATE point of View. I will write a few more but those may not be important for GATE Exam.

  1. G06 Spline interpolation
  2. G07 Hypothetical axis interpolation
  3. G11 Mirror image cancel
  4. G12 Mirror X-Axis values
  5. G13 Mirror Y-Axis values
  6. G14 Mirror XY Axis values
  7. G20 Inch input (equivalent to G70)
  8. G21 Metric input (equivalent to G71 )
  9. G28 Return to machine coordinate origin
  10. G29 Return from machine coordinate origin
  11. G43 Tool length compensation +
  12. G44 Tool length compensation –
  13. G49 Tool length compensation cancel
  14. G50 Scaling cancel
  15. G51 Scaling
  16. G53 Machine coordinate system selected
  17. G54 Work coordinate frame 1 selection
  18. G55 Work coordinate frame 2 selection
  19. G56 Work coordinate frame 3 selection
  20. G57 Work coordinate frame 4 selection
  21. G58 Work coordinate frame 5 selection
  22. G59 Work coordinate frame 6 selection
  23. G61 Exact stop mode (block by block)
  24. G64 Continuous mode (look-ahead)
  25. G73 Peck drilling cycle
  26. G74 Counter tapping cycle
  27. G76 Fine boring cycle
  28. G80 Canned cycle cancel
  29. G81 Drilling cycle, spot boring
  30. G82 Drilling cycle, counterboring
  31. G83 Peck drilling cycle
  32. G84 Tapping cycle
  33. G85 Boring cycle
  34. G86 Boring cycle
  35. G87 Back boring cycle
  36. G88 Boring cycle
  37. G89 Boring cycle
  38. G92 Work coordinates change
  39. G93 Inverse time feed
  40. G94 Feed rate per minute
  41. G95 Feed rate per revolution
  42. G98 Canned cycle initial level return
  43. G99 Canned cycle R point level return

These are the codes of CNC Part Programming. The Aim of speaking about these codes is to solve the problems related to the CNC programming in GATE Exam in an effective manner.

14 M Codes that GATE Student must know in CNC programming:

M codes play a vital role in the CNC Part Programming. Majorly M codes are used to write the main programs and Sub-Programmes in CNC Part Programming. Along with these M Codes, I will be writing about the Main Programmes and Subprograms which are used in CNC Part Programming. But before these, as the GATE Exam is coming by, you should have to focus on those things which are really important i.e. 14 M Codes that GATE Student must know in CNC Programming.

14 M Codes A GATE Student must know in CNC Programming
14 M Codes A GATE Student must know in CNC Programming

14 M codes in CNC Part Programming:

However, there are 100 M codes starting from (M00 to M99). But only 14 M codes which are really important in GATE Exam are presented below.
1. M 00 – Program Stop = G05
2. M 01 – Planned Stop = G04
Ex: G 04 F & M 01 F

In both cases, the Stoppage duration was in secs.

3. M 02 – End of Main Program written without the use of Subprogram.
4. M 30 – End of Main Program written with the use of Subprogram.
5. M 17 – End of Sub Program.
6. M 03– Spindle Start (Clockwise)
Ex: M 03 S 500

Where S 500 represents the rpm of the spindle.

7. M 04 – Spindle Start (Counter Clockwise)
8. M 05 – Spindle Stop.
9. M O6 – Tool Change
Ex: M 06 T 13

Here T 13 Represents that the Existing Tool is replaced by T 13 and T can be up to T 32.

10. M 07 – Coolant Pump No.1 ON
11. M 08 – Coolant Pump No.2 ON
12. M 09 – Coolant Pump No.1&2 OFF
13. M 10 – Clamping (Tightening Chuck)
14. M 11 – De Clamp (Releasing Chuck)

These are the 14 M codes that a GATE Aspirant must know for getting good marks in GATE exam.

A few which are not so important for GATE Exam are as follows.

  1. M12 Clamp/Misc. on
  2. M13 Clamp/Misc. off
  3. M19 Oriented spindle stop
  4. M47 Return to program start
  5. M48 Bypass feed rate override cancel
  6. M49 Bypass feed rate override
  7. M90 User defined DOS call 1
  8. M91 User defined DOS call 2
  9. M92 User defined DOS call 3
  10. M93 User defined DOS call 4
  11. M94 User defined DOS call 5
  12. M95 User defined DOS call 6
  13. M98 Call sub-program
  14. M99 Return from sub-program

What Others are Reading:

Sharing is Caring. So please do Share…

The article is helpful…Please do share.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.