CNC machines are a widely used machine in modern manufacturing and machining process. Most Used G Codes And M Codes For CNC Machine play a main part in programming for CNC machines. They are like the body of a program where without these codes we can’t make the program for machining.
Here, I have mentioned top 20 Most Used G Codes And M Codes For CNC Machine with their function and applications. These 20 codes plays most important role in programming for CNC VMC and HMC machines.
What are actually G Codes And M Codes
G codes And M codes are just like language that helps to communicate or order the machines. Here some are predetermined to communicate with the machines. I worked with CNC machines like VMC, HMC A77, A55 with the experience I have listed the top 20 Most Used G Codes And M Codes For CNC Machines with how and why they are used.
20 Most Used G Codes In CNC Machines:-
1. GOO – Rapid Traverse:-
G00 is basically allowing the spindle to move rapidly. That means faster without feed. x, y, z movement is being done through this. we can also control the rapid speed of the machine manually from the feed controller. It saves time in spindle movement where feed is not required.
2. G01 – Linear Travel (FEED)
When we provide the G01 code spindle travels in a feed that means movement speed is controlled by the operator. The feed is given while machining, drilling, tapping, etc.
3. G02 – Circular Interpolution clockwise
We need to use G02 to run the interpolations in a circular direction. Here the tool rotates in giving dimension with a circular direction in clockwise. G03 provides to run circular interpolation in counterclockwise.
4. G20 – Input In Inches
When we add G20 in a program, it reads the value in Inches.
5. G21 – Input In MM
When G21 is provided in the program it takes the values in the mm unit.
6. G28 – Return To Reference Point
In the G28 spindle moves to the reference point in simple words, it moves to the home position of the machine zero.
7. G54 -WorkOffset 1
In G54 we keep the first work offset. when G54 is provided, it reads only the first offset.
8. G55 – Work Offset 2
G55 work offset 2
9. G56 – Work Offset 3
In work coordinate system G56 refers to the third work offset.
10. G57 – 4th Work Offset
Similarly G57 refers to a fourth work offset.
11. G63 – Tapping mode Or Tapping Cycle.
Tapping Mode. G63
12. G74- Left Hand Tapping Cycle
There are mainly two types of Tapping cycle one is right-hand tapping and another is left-hand tapping. We use G74 to run the left-hand tapping cycle.
13. – G76 Fine Boring Cycle.
Its used for the boring cycle. To do the fine boring we must use G76 code.
14. G81 Simple Hole Drilling.
There are many code available for drilling cycle. For simple holes we use G81 code in a CNC machine.
15. G84- Tapping Right Hand
For the tapping cycle G84 is used. Where the spindle rotation is right side.
16. G90 – Absolute Programming
There are two types of programming they are absolute and incremental, However, absolute programming defines with reference to zero. G90
17. G91 – Incremental programming
In incremental programming position is calculated or defined with reference to the previous position.G91
18. G94 – Feed Per Minute
To give a feed in a minute, we use G94 code.
19. G95 – Feed Per Revolution
When the operator wants to add a feed with revolution, it did with the help of G95 code.
20. G98 Return to Initial Point
G98 is used to send the spindle to initial point in milling machines.
20 Most Used M Codes In CNC Machines:-
1. M00 Mandatory Program Stop
By adding M00 program stops at this point in every way And optional stop is also turned off.
2. M01 Optional Program Stop
If M01 is present in the program it stops at that point. However, it can be temporarily turned off by turning off the physical button of the optional stop from HMC machine
3. M03 Spindle On Clockwise
This code is mostly used in program compare to above all code. M03 is used to turn the spindle on in a clockwise direction.
4. M04 Spindle On Anticlockwise
M04 is the same as above code the only difference is here spindle rotates in the anticlockwise direction.
5. M05 Spindle Stop
If the spindle is rotating at some speed we can stop it by adding the above code.
6. M06 Tool change
To change the tool of the machine we just need to add the tool number like T1 and enter M6 after that, By this tool changes in number 1 tool. If only M6 is entered that result in changing the next tool present in ATC.
7. M07 Mist Coolant On
By adding above code mist coolant will get turned on in the machine.
8. M08 Flood Coolant On
By adding above code flood coolant will get turned on in the machine.
9. M09 Coolamt Off
To turn off the program above code is added in the program so where coolant is not necessary.
10. M10 Chuck Open
To OPEN the chuck we use M10.
11. M11 Chuk Close
To close the chuck we use M11.
12. M13 Spindle Clockwise With Coolant On
To rotate the spindle in clockwise with coolant on simultaneously we have to use M13.
13. M14 Spindle Counter Clock Wise With Coolant On
To rotate the spindle in a counter-clockwise with coolant on simultaneously we have to use M14.
14. M19 Spindle Orientation
Also to stop the spindle with orientation we need to use M19.
15. M28 Through Tool Air On
To have an air through the tool, above code needs to use.
16. M30 End Of Program
At last of the program, we also do add M30 to end and restart the program.
17. M60 Pallet Change
However, M60 This code is another famous code in most used G codes and M codes for CNC machines. It basically changes the Bed which also known as a pallet.
18. M69 Pallet Ready
M69 Before changing the pallet it is mandatory to press the pallet ready button or we can enter the above code which also means that the pallet is ready.
19. M98 Sub Program Access
In a program there we make a subprogram to do some function to call them M98 is provided.
20. M99 Return to Main Program
After the end of the subprogram, we also add M99 so it comes back to the normal main program.
How These Codes Are Usefull
However, There are mainly two types of Tapping cycle one is right-hand tapping and another is left-hand tapping. G74 is used to run the left-hand tapping cycle. You must know these Most Used G Codes And M Codes For CNC Machine and their working before operating the machine. Above all codes are useful in some ways.
Final Word With Conclusion
Before operating the CNC machine its most important to know the basic code so this article Most Used G Codes And M Codes For CNC Machine aims to help with that. Hope you liked this article share with your friends who actually need to know about it. However, if you have any queries please feel free to mention in the comment section.