CNC Machine Control Software and Computer Requirements
Overview:
CNC Machine control software is the program that runs on a PC, and will communicate with the motor controller to command the correct amount of steps and the direction to the motor controller, and eventually to the machine. A CNC control program is also capable of storing the machine specifications to correctly calibrate the amount of steps to equal the linear movement commanded, and at the same time will also do other functions like manual jogging, zero points, and conversion in inch and metric units.
ARTSOFT Mach3: (Windows)
CNC Control software is the most common control software, it can run from Windows, and control up to six motors. It also includes lazycam which will convert CAD dawing to motion, and has many features required in CNC Machine tools, we will use Mach3 for our make a part and cut tutorial. Computer Requirements for Mach3 is Windows XP with a parallel port.
Buy it now
EMC (Linux) Enhanced Machine Control (EMC) is a CNC software system for computer control of machine tools such as milling machines and lathes, EMC is free software with open source code, It can simultaneously move up to 6 axes and supports a variety of interfaces. The control can operate true servos (analog or PWM) with the feedback loop closed by the EMC software at the computer, or open loop with "step-servos" or stepper motors. Motion control features include: cutter radius and length compensation, path deviation limited to a specified tolerance, lathe threading, EMC runs on Linux using real time extensions. Computer Requirements for EMC is a PC with a parallel port.
TurboCNC (DOS)
Turbocnc is another great stable CNC Control Program it runs from DOS (Disk Operating System) and will run gcode Computer Requirements for Turbocnc is a PC running DOS with a parallel port. Turbocnc is good low cost alternative for using a lower speed PC that cannot run Windows and is used by many.
CNC G-Code
G-code is the name for the programming language that controls CNC machine tools. It was invented by the Electronic Industries Alliance in the early 1960s, and is still used today, and is the programming language, that we will be using in our example.
M-Code
M-Codes are mostly used to operate external devices within the program, turning coolant on and off, or spindle on off, they are also used to end the program.
Fanuc G and M Codes used for Mach3 Control Software

M-codes

Start To Finish
CAD
A cnc machine router, can move all 3 axis's at the same time, this allows any combination of moves, straight compound cutting or circular, even complex tool paths like a helical spring could be cut, in a downward circular spiral, Programming, flat cutout shapes are really considered 2D or 2.5D while shapes like a ball are 3D, you will need some sort of CAD program to draw your shapes, artwork, and parts. Depending on what your finished part is, there are many 2D and 3D drawing programs called (CAD)
CAM
Once you have your artwork or drawing file, it needs to be transformed to a tool path file, with a CAM program, This process is called (CAM) the cam program will take the artwork or drawing, and generate the tool path file, which is called GCODE
The GCODE file can then be loaded into Mach for control and cutting of the part.
Drawing a Simple Part With CAD
Convert Drawing To G-CODE
Load G-CODE into Mach3
Cut the Part
Draw a Part With CAD
Any Part that you want to cut with CNC must first be drawn with a CAD program the drawing made with CAD will then be converted to G-Code this is the language that most CNC use to convert commands into motion, there are many CAD programs on the market to select from, we will start with two very simple shapes one will be a 1" x 2" rectangle and the second will be a 1" diameter circle, we have started with these simple shapes to grasp the simplest concept and programming language,
CAD Drawing
Circle 1" Diameter Home Position 0,0 Center of Circle

Rectangle Y=1" and X=2" Home Position 0,0 Lower Left
Most CAD programs can save a drawing with different file extensions, .dwg .dxf both these file extensions can be imported into Mach3 Lazycam to generate a g-code file, we saved our drawings as .dxf (drawing exchange file) format
Rectangle drawing saved as a .DXF file extension rectangle.dxf
Circle drawing saved as a .DXF file extension circle.dxf
Start Mach3 Control software under file menu click Import DXF's load Rectangle.dxf then click generate GCODE the g-code is generated click Done, you will taken back to the original screen and you will see the GCODE in the top left corner, and you will see the tool path on the right top corner, your part is ready to cut.
GCODE for Rectangle automatically generated from Mach3 Lazycam
(rectangle )
G90G80G49
G0 Z1.0000
G90.1
S100
G0 Z1.0000
G0 X0.0000 Y0.0000
M3
F1.000G1 Z0.0000
F1.000G1 X2.0000 Y-0.0000
G1 X2.0000 Y1.0000
G1 X0.0000 Y1.0000
G1 X0.0000 Y0.0000
M5
G0 Z1.0000
G0 X0 Y0
M5M30
GCODE for Circle automatically generated from Mach3 Lazycam
( circle )
G90G80G49
G0 Z1.0000
G90.1
S1000
G0 Z1.0000
G0 X-0.5000 Y0.0000
M3
F50 G1 Z0.0000
G2 X-0.5000 Y0.0000 I0.0000 j0.0000
M5
G0 Z1.0000
G0 X0 Y0
M5M30
GCODE loaded into Mach3 and cycle Start
Generate G-Code With CAM
The Cam Program we are going to use comes with Mach3 and is called LazyCam
Run the G-Code on the Machine
As shown the part has been drawn with 0,0,0 coordinates, before starting the cut your cnc machine will have to be moved to the same start position and the control software will have to be zeroed, this is done with mach3 by clicking reference all home, and zero axis with all first cuts, you should always do a test run of the motion with no cutter, and be ready with the e-stop incase of problems.