CNC Programming is not that difficult to learn and master, specially cnc programming for cnc lathe machines. Because cnc lathe machines have only two axis to work with X-axis and Z-axis.
X-axis of cnc lathe machine controls the diameter of the component.
Z-axis of cnc lathe machine controls the length of the component.
To learn cnc programming you better start from the easy to program drawings.
Here are some basic cnc programming examples
- CNC Programming for Beginners a Simple CNC Programming Example
- Lathe CNC Programming Example
- CNC Milling Machine Programming Example for Beginners
To start cnc programming for a cnc lathe machine the process is under.
You first have to call the proper cutting tool for the machining. This step is cnc machine dependent but on fanuc cnc control you will use following cnc programming command,
T5 or T0505
Now load workshift value, the following cnc programming commands are used to load the workshift,
G10 , G54
Rotate the main spindle of cnc lathe machine. The cnc programming command to rotate the main spindle is under,
G97 S1000
The above cnc programming command will not make the spindle to rotate this will actually only tell the cnc machine that I want to rotate the main spindle at 1000RPM (Revolution Per Minute),
but to actually rotate to spindle you have to give another cnc programming command or M-Code or M-Function to tell cnc machine to rotate the spindle in CW (Clockwise rotation) or CCW (Counter-Clockwise rotation).
M03 (Rotate spindle in CW ditection) M04 (Rotate spindle in CCW direction) M05 (Stop the spindle)
To turn the cnc machine Coolant ON, so our tool insert and component can’t get hot you need to turn on the coolant, the cnc programming commands or M functions are as under
M08 (Coolant ON) M09 (Coolant OFF)
Now the time to actually move the tool, there are multiple cnc programming commands (G-codes) to travel the tool.
To travel the tool at a fast feed or in cnc words we say it Rapid Traverse the tool we will use following cnc programming command or G-code,
G00 X... Z...
The X and Z values with G00 are the destination coordinates for the tool.
To travel the tool at a control feed or to Linear Traverse the tool, we will use following cnc programming command or G-Code,
G01 X... Z... F...
The X and Z values with G01 are destination coordinated in X and Z axis. The F value is the tool feed, This might be G95 (Feed Per Revolution).
To machine Arc or Circular Interpolation on component, the following cnc programming commands or G-codes are used,
G02 X... Z... R... G03 X... Z... R...
G02 cnc programming g-code is used to program a Clock-wise Arc, and G03 G-code is used to program a Counter-Clockwise Arc. The X and Z values are destination coordinates and R is the Arc Radius.
This way you will complete all the cnc program.
To make an end to the cnc program you will use following cnc programming command or M-code,
M30
M30 End the cnc program and brings the cursor to the program start.