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.
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.
- G06 Spline interpolation
- G07 Hypothetical axis interpolation
- G11 Mirror image cancel
- G12 Mirror X-Axis values
- G13 Mirror Y-Axis values
- G14 Mirror XY Axis values
- G20 Inch input (equivalent to G70)
- G21 Metric input (equivalent to G71 )
- G28 Return to machine coordinate origin
- G29 Return from machine coordinate origin
- G43 Tool length compensation +
- G44 Tool length compensation –
- G49 Tool length compensation cancel
- G50 Scaling cancel
- G51 Scaling
- G53 Machine coordinate system selected
- G54 Work coordinate frame 1 selection
- G55 Work coordinate frame 2 selection
- G56 Work coordinate frame 3 selection
- G57 Work coordinate frame 4 selection
- G58 Work coordinate frame 5 selection
- G59 Work coordinate frame 6 selection
- G61 Exact stop mode (block by block)
- G64 Continuous mode (look-ahead)
- G73 Peck drilling cycle
- G74 Counter tapping cycle
- G76 Fine boring cycle
- G80 Canned cycle cancel
- G81 Drilling cycle, spot boring
- G82 Drilling cycle, counterboring
- G83 Peck drilling cycle
- G84 Tapping cycle
- G85 Boring cycle
- G86 Boring cycle
- G87 Back boring cycle
- G88 Boring cycle
- G89 Boring cycle
- G92 Work coordinates change
- G93 Inverse time feed
- G94 Feed rate per minute
- G95 Feed rate per revolution
- G98 Canned cycle initial level return
- 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 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.
- M12 Clamp/Misc. on
- M13 Clamp/Misc. off
- M19 Oriented spindle stop
- M47 Return to program start
- M48 Bypass feed rate override cancel
- M49 Bypass feed rate override
- M90 User defined DOS call 1
- M91 User defined DOS call 2
- M92 User defined DOS call 3
- M93 User defined DOS call 4
- M94 User defined DOS call 5
- M95 User defined DOS call 6
- M98 Call sub-program
- M99 Return from sub-program
What Others are Reading:
- Best 18 Govt PSU’s for Mechanical Engineering-Eligibility, Selection Process & Pay Scales
- 28+Domains of Mechanical Engineering Projects 2017-2018
Sharing is Caring. So please do Share…
The article is helpful…Please do share.