CNC Programming
CNC Programming
Manual NC programming
Part program: A
The Aerospace Industries Association sponsored the work that led to the first part programming language, developed in MIT in 1955. This was called: Automatically Programmed Tools (APT). APT is an English like simple programming language which basically produce the Cutter Location (CL) data. Using the cutter location data, the program can generate the actual NC codes by using a postprocessor .
Two types of specifying tool position The programmer must determine the position of the tool relative to the origin. 1 FIXED ZERO The origin is always located at the same position on the machine table. Usually the position is the south west corner (lower left hand corner) of the table and all tool locations will be defined by positive x and y coordinates.
2.FLOATING ZERO
Modern N.C machine allows the machine operator to set zero point at any position on the machine table. The programmer is the one who decides where the zero point should be located. USEFUL FOR drilling holes, milling operations etc The programmer may have selected the target point as the zero point for tool positioning. If he presses the zero button , it tells the machine where the origin is located for susequent tool movements
The position of the tool is described by using a Cartesian coordinate system as (0,0,0).
In defining the motion of the tool from one point to another, either absolute positioning mode or incremental positioning mode can be used.
1. Absolute positioning. In this mode, the desired target position of the tool for a particular move is given relative to the origin point of the program.
2. Incremental positioning. In this mode, the next target position for the tool is given relative to the current tool position.
CUTTER COMPENSATION
CNC programming
Important things to know:
Coordinate System
Units, incremental or absolute positioning Coordinates: X,Y,Z, RX,RY,RZ Feed rate and spindle speed Coolant Control: On/Off, Flood, Mist Tool Control: Tool and tool parameters
1. Absolute positioning. In this mode, the desired target position of the tool for a particular move is given relative to the origin point of the program.
2. Incremental positioning. In this mode, the next target position for the tool is given relative to the current tool position.
13
G & M Codes
Example CNC Program
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
G-codes: Preparatory Functions involve actual tool moves. M-codes: Miscellaneous Functions involve actions necessary for machining (i.e. spindle on/off, coolant on/off).
14
G Codes
G00 Rapid traverse G01 Linear interpolation G02 Circular interpolation, CW G03 Circular interpolation, CCW G04 Dwell G08 Acceleration G09 Deceleration G17 X-Y Plane G18 Z-X Plane G19 Y-Z Plane G20 Inch Units (G70) G21 Metric Units (G71)
G40 Cutter compensation cancel G41 Cutter compensation left G42 Cutter compensationright G70 Inch format G71 Metric format G74 Full-circle programming off G75 Full-circle programming on G80 Fixed-cycle cancel G81-G89 Fixed cycles G90 Absolute dimensions G91 Incremental dimensions
15
M Codes
M00 M01 M02 M03 M04 M05 M06 M08 M09 M10 M11 M30 Program stop Optional program stop Program end Spindle on clockwise Spindle on counterclockwise Spindle stop Tool change Coolant on Coolant off Clamps on Clamps off Program stop, reset to start
16
N Codes
Gives an identifying number for each block of information. It is generally good practice to increment each block number by 5 or 10 to allow additional blocks to be inserted if future changes are required.
17
18
19
20
CNC sequence
The RS274-D is a word address format
Each line of program == 1 block Each block is composed of several instructions, or (words)
sequence no
preparatory function