What is CNC ?

What is CNC? Basically, the CNC stands for Computer Numerical Control which refers to a computer controller that controls the movement of every axis of the machine using G codes instructions and drives the spindle or machine tool into a raw material to fabricate or to remove the unwanted material from workpiece more accurately without human intervention.

Centroid CNC milling machine controller
High performance and user-friendly CNC controller for milling applications
Photo by Centroid CNC


Fully integrated CNC machines will use G codes, M codes and others CNC programming languages codes such as F, S, N, X, Y, Z, A, B and C codes to control the overall machine.

G codes is a common name in the CNC programming language that begins with the letter G. Basically, the G codes tell the machine tool what type of action need to perform and trigger the CNC machine tools axis movement.

Typically, the CAM software such as Edgecam, Bob-CADCAM, Alphacam, MasterCAM, ProCAM 2, SurfCAM, Artcam and DelCAM may be used to generate the G codes files. The translators called post-processors will optimize the G codes output and it's user editable for further customization if needed.

The CNC milling machine simple programming language that use G codes and other CNC codes to perform drilling some holes and milling a circle pocket clean out.

; ICN_PATH = c:\intercon\test-run1.icn
; --- Header ---
N0001 ; CNC code generated by Intercon v2.61 Dev Test, Rev 8
; Description: test
; Programmer: vast
; Date: 11-Sep-2008
M25 G49 ; Goto Z home, cancel tool length offset
G17 G40 ; Setup for XY plane, no cutter comp
G21 ; millimeter measurements
G80 ; Cancel canned cycles
G90 ; absolute positioning
G98 ; canned cycle initial point return
; --- Tool #5 ---
;Tool Diameter = 6.0000 Spindle Speed = 1000
;d5
G49 H0 M25
G0 X0.0 Y0.0
N0002 T5 M6
S1000 M4
M8
G4 P1.00 ; pause for dwell
G43 D5
; --- Drill BHC ---
N0003 X20.0 Y0.0 Z2.54 H5
G81 X20.0 Y0.0 Z-1.0 R2.5 F100.0
X12.47 Y15.637
X-4.45 Y19.499
X-18.019 Y8.678
X-18.019 Y-8.678
X-4.45 Y-19.499
X12.47 Y-15.637
G80
; --- Circ Poc ---
N0004 X200.0 Y-1.0 Z2.54
G1 G91 X0.0 Y0.0 Z-2.54
X0.0 Y0.0 Z0.0 F300.0
X0.0 Y1.0 Z-1.0 F100.0
G2 X0.0 Y3.5 Z0.0 J1.75 F300.0
X-3.5 Y-3.5 Z0.0 J-3.5
X3.5 Y7.0 Z0.0 I8.75
X0.0 Y0.0 Z0.0 J-7.0 F400.0
X0.0 Y-7.0 Z0.0 J-3.5
G0 G90 X200.0 Y0.0 Z2.54
; --- End Prog ---
N0005 G49 H0 M25
X200.0 Y0.0
G40 ; Cutter Comp Off
M5 ; Spindle Off
M9 ; Coolant Off
G80 ; Cancel canned cycles
M30 ; End of program

The G codes generated by CENTROID's Intercon Conversational software used in Centroid CNC Milling Machine controller