Professional Documents
Culture Documents
CNCProgrammingBasicsdoc PDF
CNCProgrammingBasicsdoc PDF
Programming Basics
Definitions
CAD COMPUTER-AIDED-DESIGN
Designing the part to be machined by CNC machine
CAM COMPUTER-AIDED-MANUFACTURING
Developing the toolpaths, feeds and speeds for the CNC Machines
CNC COMPUTER-NUMERICAL-CONTROLLED
Computer controlled machine controlled by a Machine Control Unit
(MCU)
Programming Process
CAD - DRAW PART IN AUTOCAD OR AUTODESK INVENTOR
Program Transfer
Advantages:
High Repeatability and Precision e.g. Aircraft parts
Volume of production is very high
Complex contours/surfaces need to be machined. E.g. Turbines
Flexibility in job change, automatic tool settings, less scrap
More safe, higher productivity, better quality
Less paper work, faster prototype production, reduction in lead times
Disadvantages:
Costly setup, skilled operators
Computers, programming knowledge required
Maintenance is difficult
How CNC works:
Controlled by G and M codes.
These are number values and co-ordinates.
Each number or code is assigned to a particular operation.
Typed in manually to CAD by machine operators.
G&M codes are automatically generated by the computer software.
The tool or material moves.
Tools can operate in 1-5 axes.
Larger machines have a machine control unit (MCU) which manages operations.
Movement is controlled by a motor (actuators).
Feedback is provided by sensors (transducers) Closed loop?
Tool magazines are used to change tools automatically.
Contour ToolPath
Contour toolpaths cut follow surfaces
Commands, which are also referred to as blocks, are made up of words which each begin
with a letter address and end with a numerical value.
Each letter address relates to a specific machine function. G and M letter addresses
O - Program number (Used for program identification)
N - Sequence number (Used for line identification)
G - Preparatory function
X - X axis designation
Y - Y axis designation
Z - Z axis designation
R - Radius designation
F Feed rate designation
S - Spindle speed designation
H - Tool length offset designation
D - Tool radius offset designation
T - Tool Designation
M - Miscellaneous function
G- CODES (Preparatory Functions) which cause some movement of the machine table
or head.
G00 Rapid Movement
G01 Linear Interpolation (movement)
G02 Circular Interpolation, CW
G03 Circular Interpolation, CCW
G17 XY Plane,G18 XZ Plane,G19 YZ Plane
G20/G70 Inch units
G21/G71 Metric Units
G40 Cutter compensation cancel
G41 Cutter compensation left
G42 Cutter compensation right
G43 Tool length compensation (plus)
G43 Tool length compensation (plus)
G44 Tool length compensation (minus)
G49 Tool length compensation cancel
G80 Cancel canned cycles
G81 Drilling cycle
G82 Counter boring cycle
G83 Deep hole drilling cycle
G90 Absolute positioning
Axis Codes: X,Y,Z - Used to specify motion of the slide along X, Y, Z direction
Program Example
O1234
N5
G90 G20
N10 M06 T3
N15 M03 S1250
N20 G00 X1 Y1
N25 Z0.1
N30 G01 Z-0.125 F5
N35 X3 Y2 F10
N40 G00 Z1
N45 X0 Y0
N50 M05
N55 M30
(Program Number)
(ABSOLUTE COORDINATE. IN INCHES)
(TOOLCHANGE TO TOOL #3)
(SPINDLE ON CW AT 1250RPM)
(RAPID OVER TO X1 Y1)
(RAPID DOWN TO Z0.1)
(FEED DOWN TO Z-0.125 AT 5IPM)
(FEED DIAGONALLY TO X3 Y2 AT 10IPM)
(RAPID UP TO Z1)
(RAPID OVER TO X0 Y0)
(SPINDLE OFF)
(PROGRAM END