G-code is a common name for the programming language that drives NC(Numerical Control) and CNC(computer numerical controlled)machine tools. G-code is also the name of any word in a CNC program that begins with the letter G, and generally is a code telling the machine tool what type of action to perform, such as rapid move and controlled feed move in a straight line or arc.
NC Codes that are commonly used are:
G00 Rapid traverse; point-to-point
G01 Linear interpolation
G02 Circular interpolation arc CW
G03 Circular interpolation arc CCW
G90 Absolute dimension input
G91 Incremental dimension input
M01 Program stop
M02 End of program
M03 Spindle on CW
M05 Spindle off
M06 Tool change
N Block number
F Feed rate (usually in IPM)
S Spindle speed
T Tool selection
Firstly I draw a sketch for designing product with dimensions. The co-ordinate points are then found out to develop a NC code. The product I am using is cylindrical shape wood with size of 2” length and .5” diameter.



After writing the code, we can check the code through a software LATHE. The development of software has helped to simulate the product before taking it to real design. This gives us opportunity to modify the code as required.


Type the code in note pad and then copy it and paste it to lathe software screen.
The code need to be verify first. Press verify button and arrange verify program. In verify setting, arrange tool position. Here the initial tool position is at x .25z1.6 .
And type the length of stock 1.5″ with diameter .5″. Then press run to verify the program.


After it is verified, the code is paste in CNC base software to print the final product.
In the machine, the material is kept inserting .5″ and projecting stock 1.5″. Then the tip of tool is kept just above the object and the position of tool at z is noted which is kept in SET POSITION BOX i.e z 1.4
The program is verified once again and then the product can be sent for final cut.
