Introduction to CNC machines
Conventional Machine Tool
NC Machines
• Numerical Control is a system in which actions are controlled by the
direct insertion of numerical data at some point.
Numerical Part Programming
• Numerical control part programming is the
procedure by which the sequence of processing
steps to be performed on the NC machine is
planned and documented.
• It involves the preparation of a punched tape (or
other input medium) used to transmit the
processing instructions to the machine tool.
• There are 2 methods of part programming:
□ Manual part programming
□ Computer assisted part programming
Manual Part Programming
• The programmer writes the machining instructions on
a special form called a part programming manuscript.
• The manuscript is a listing of the relative tool and w/p
locations.
• It also includes other data, such as preparatory
commands, miscellaneous instructions, and
speed/feed specifications, all of which are needed to
operate the machine under tape control
• Manual programming jobs can be divided into 2
categories: point-to-point and contouring jobs.
CNC Machining
Basic Component of CNC machine
Machine Control Unit (MCU)
• It consists of some electronic hardware that reads the NC programme,
interprets it and conversely translates it for mechanical actions of the
machine tool.
Data Processing Unit:
Input device [RS-232 port/ Tape Reader/ Punched Tape Reader]
Data Reading Circuits and Parity Checking Circuits
Decoders to distribute data to the axes controllers.
Control Loops Unit:
Its connected to Servo Motors
Interpolator to supply machine-motion commands between data points
Position control loop hardware for each axis of motion
Data Processing Unit (DPU) with
memory
Control Loop Unit (CLU) circuit
The MCU may be of three types :
• Housed MCU
Machine Control Unit may be mounted on the machine tool or may
be built in the casing of the machine.
• Swing Around MCU
Machine Control Unit is directly mounted on the machine, which
can swing around it and can be adjusted as per requirement of the
operator’s position.
• Stand Alone MCU
Machine Control Unit is enclosed in a separate cabinet which is
installed at some remote or same place near to the machine.
Machine Tool
• Machine tool is the main components of a numerical control system,
which executes the operations.
• It may consist of worktable, cutting tools, jigs and fixtures, motors
for driving spindle and coolant and lubricating system.
• The latest development in the numerical control machine tool is the
versatile machining [Link]: VMC
• This is a single machine capable of doing a number of operations
such as milling, boring, drilling, reaming, and tapping by Automatic
Tool Changer (ATC) under the control of tool selection instruction.
Other Components of an NC Machine Tool
WORKING PRINCI[PLE
1) The controller issues a position command.
2) The servo drive amplifies the signal.
3) The servo motor rotates
4) Motion is transmitted through gearbox and leadscrew.
5) The machine table moves.
6) The position transducer measures actual position.
7) Feedback is send back to the controller.
8) Any error between command and actual position is corrected automatically.
Types of Numerical Control
• Conventional Numerical Control (NC)
• Direct Numerical Control (DNC)
• Computer Numerical Control (CNC)
Conventional Numerical Control (NC)
• Numeric control is a programmable automation in which process
is controlled by numbers, letters and symbols.
• Data is sent to the machine tool by means of punch cards or tapes.
• The program is entered on
the tape in the form of
punched holes. The holes are
punched with the help of
punching machine.
Punched Tapes
• Perform a set of operations without human assistance
ADVANTAGES DISADVANTAGES
• Higher productivity reduction • High investment cost.
in time of set up, work piece • High maintenance effort.
handling time, tool changing • Need for skilled programmers.
time. • High utilization required.
• Reduced non-productive time.
• Reduced fixturing.
• Greater accuracy and
repeatability
• Reduced inventory
• Reduced floor requirements.
• Operator skill level reduced
• NC machine are safer to
operate.
Direct numerical control (DNC)
• Control of multiple machine tools by a single (mainframe) computer
through direct connection and in real time
1960s technology
Two way communication
• The computer and machines communicate to each other in real time.
Data and diagnostics are sent back from the machines
Computer Numerical Control (CNC)
• The idea of computer numerical control is to position a computer
right at the machine tool.
• This means a computer converts the design produced by Computer
Aided Design Software (CAD), into numbers. The numbers can be
considered to be the coordinates of a graph and they control the
movement of the cutter. In this way the computer controls the
cutting and shaping of the material.
• CNC can control the motions of the work piece or tool, the input
parameters such as feed, depth of cut, speed, and the functions such
as turning spindle on/off etc.
ADVANTAGES DISADVANTAGES
• Easier to program • Costly setup than manually
• Easy storage of existing programs operated machines.
• Easy to change program • Skilled operators
• Avoid human error •Computers, programming
• CNC machines are safe to operate knowledge required
• Complex geometry is produced as • Maintenance is difficult.
cheaply as simple ones
• Short production time
• Greater manufacturing flexibility
• Contour machining
Classification of Numerical Control
Based on Motion control:
1. Point to point (PTP)
• To move the machine table or spindle to a specified position so
that machining operations may be performed at that point.
• Moving at maximum rate from point to point
• Accuracy of the destination is important but not the path.
• Drilling is a good application.
2. Straight cut NC system
3. Continuous (contouring) control
• To control not only the destinations, but also the paths
through which the tool reaches these destinations.
• In the process of machining, the tool contacts the work piece.
• Use linear and circular interpolators
control loops
1. Open loop systems:
• Programmed instructions are fed into the controller through an
input device.
• These instructions are then converted to electrical pulses (signals)
by the controller and sent to the servo amplifier to energize the
servo motors.
• The primary drawback of the open-loop system is that there is no
feedback system to check whether the program position
and velocity has been achieved.
• If the system performance is affected by load, temperature,
humidity, or lubrication then the actual output could deviate from
the desired output
2. Closed loop systems:
• The closed-loop system has a
feedback subsystem to monitor
the actual output and correct
any discrepancy from the
programmed input.
• These systems use position and velocity feed back.
• The feedback system could be either analog or digital.
• The analog systems measure the variation of physical variables such
as position and velocity in terms of voltage levels.
• Digital systems monitor output variations by means of electrical
pulses.
• To control the dynamic behavior and the final position of the
machine slides, a variety of position transducers are employed.
Based on the number of axes ' 2, 3, 4 & 5 axes CNC machines.
1. 2& 3 axes CNC machines:
• CNC lathes will be coming under 2 axes machines. There will be
two axes along which motion takes place.
• The saddle will be moving longitudinally on the bed (Z-axis) and
the cross slide moves transversely on the saddle (along X-axis).
• In 3-axes machines, there will be one more axis, perpendicular
to the above two axes.
• By the simultaneous control of all the 3 axes, complex surfaces
can be machined.
2. 4 & 5 axes CNC machines:
• 4 and 5 axes CNC machines provide multi-axis machining
capabilities beyond the standard 3-axis CNC tool path
movements.
• A 5-axis milling centre includes the three X, Y, Z axes, the A
axis which is rotary tilting of the spindle and the B-axis,
which can be a rotary index table.
Importance of higher axes machining :
• Reduced cycle time by machining complex components using a
single setup.
• In addition to time savings, improved accuracy can also be
achieved as positioning errors between setups are eliminated.
Based on the power supply ' Electric, Hydraulic & Pneumatic
systems
Based on Positioning System
NC PART PROGRAMMING
Coordinate System
Z AXIS
• workpiece-rotating machine:
Z is parallel to the spindle Z
• tool-rotating machine:
Z is parallel to the tool axis
Z
Z
Coordinate System
X AXIS
● workpiece-rotating machine:
X
X is the direction of tool movement Z
● horizontal milling machine :
X axis is parallel to the table
● vertical machine :
+X axis points to the right
when the programmer X
Z Z
is facing the machine.
X
Y Y
Basic Programming of a CNC Milling Machine
Machine coordinate system
• The point that is specific
to machine and serves as
the reference of the
machine is referred to as
the machine zero point
• Machine tool builder
sets a machine zero
point for each machine
Work co- ordinate system
• A coordinate system used for
machining a workpiece is
referred to as a workpiece
coordinate system
• A workpiece co-ordinate
system is also called as work
reference zero or work datum.
• The work datum will be set
by the user before the
machining process begins
Part Programming examples
NC Codes
• N, G, X, Y, Z, A, B, C, I, J, K, F, S, T, M
● N: Specify the sequence number
● G: Preparatory word to prepare for control functions (the motion
of each axis, coordinate system, coordinate plane, cutter radius
compensation, tool length offset……)
● M: Miscellaneous word to control miscellaneous functions
(spindle on/off, start/stop the machine, turn on/off the coolant,
change the tool, and rewind the program tape)
● F: Feed rate, S: Spindle speed,
● T: Tool identification/ tool change
NC Words
G54-G59: Work coordinate system selection
G codes
• Unit selection:
– G20 (inch), G21(metric)
• Coordinates selection:
– G90(absolute), G91(incremental)
• Working plane selection:
– G17(X-Y), G18(Z-X), G19(Y-Z)
Rapid traverse: G00
• G00:
– to make the machine move at maximum speed.
– It is used for positioning motion.
G90 G00 X20.0 Y10.0
End
G90:
(20,10)
absolute
coordinates (10,10)
Start (0,0)
Linear interpolation: G01
• G01:
– linear interpolation at feed speed.
G91 G01 X200.0 Y100.0 F200.0
Y
G91:
End
incremental 100.0
coordinates
Start 200.0 X
Circular interpolation: G02, G03
• G02, G03:
– For circular interpolation, the tool destination and the circle
center are programmed in one block
– G02 is clockwise interpolation, G03 is counterclockwise
interpolation
End point Circle center, radius
Circular interpolation: G02, G03
N0010 G92 X200.0 Y40.0 Z0;
– N0020 G90 G03 X140.0 Y100.0 R60.0 F300;
– N0030 G02 X120.0 Y60.0 R50.0;
G92:
To define working
coordinate
G90: absolute 100
R50
coordinates
R60
60
40
X
O 90 120 140 200
Return to Machine Zero: G28
G91: incremental
G28 coordinates
• The machine passes by the specified point, and then move
to the machine zero.
G91 G28 X_, Y_, Z_
• X,Y,Z are the coordinate of specified point that is saved in memory of
machine.
• Usually this instruction is used in the beginning and end of program.
Machine
Zero
Specified
A
point
Return to the Specified point : G29
G29
The machine passes from the machine zero by the point that is
specified in G28, and then move to the new specified point.
G29 X_, Y_, Z_
X, Y, Z are the coordinate of new specified point
G28,G29 are usually used to change tool
Machine
Specified point Zero
in G28
A
New specified point in
G29
NC Words
M CODES
M00 Program stop M06 Tool change
M01 Optional stop M07 Flood coolant on
M02 End of program M08 Mist coolant on
M03 Spindle CW M09 Coolant off
M04 Spindle CCW M30 End of tape
M code: M00, M01
M00 and M01 both stop the machine in the middle of a program.
M01 is effective only when the optional stop button on the
control panel is depressed. The program can be resumed
through the control panel.
M code: M03, M04, M05
M03 turns on the spindle clockwise.
M04 turns the spindle on counterclockwise.
(The spindle rpm must be specified in the same line or in a
previous line. )
M05 turns off the spindle.
M code: M07, M08, M09
M07 and M08 turn on different modes of coolant.
– M07: flood coolant on
– M08: mist coolant on
M09 turns off the coolant.
M code: M06, M02
M06 signals the tool-change operation.
On a machine equipped with an automatic tool changer, it stops
the spindle, retracts the spindle to the tool-change position, and
then changes the tool to the one specified in the T-code.
M02 marks the end of the program.
NC Words
• Modal codes and non modal codes/
– modal functions/ modal G code
Modal functions stay active until some other command
(other G code of the same group) changes it. Modal
commands are arranged in sets called “modal groups”, and
only one member of a modal group may be in forces at any
given time.
– non-modal functions/ one-shot G code
Non-modal functions have effect only on the lines on which
they occur.
NC Words
modal groups
NC Words
M CODES modal groups
M00 Program stop M06 Tool change
M01 Optional stop M07 Flood coolant on
M02 End of program M08 Mist coolant on
M03 Spindle CW M09 Coolant off
M04 Spindle CCW M30 End of tape
NC Words
N, G, X, Y , Z, A, B, C, I, J, K, F, S, T, R, M
● F: feed rate of the tool motion
● S: cutting-speed
● T: tool number
NC Words
N, G, X, Y , Z, A, B, C, I, J, K, F, S, T, R, M
• X, Y, Z, A, B, C:
Provide the coordinate positions of the tool. X, Y, and Z
define the three translational (Cartesian) axes of a
machine. A, B and C are used for the three rotational axes
about the X, Y, and Z axes.
• I, J, K: specify the center for circular motion
• R: Radius of the arc
Sample NC Program Block
N00 G90 G01 X.50 Y.50 Z0 F10
FEED RATE (mm/min)
Z COORDINATE
Y COORDINATE
X COORDINATE
PREP CODE - LIN INTERPOL
PREP CODE - ABSOLUTE
BLOCK SEQUENCE #
Programming Example-1
Making 150 mm* 150 mm square
for a depth of 5mm in a given Billet
Assumptions
Work offset = G54
Tool length compensation =
H01
G21
N01 G71 G94 ; Metric input, Feed in mm/min.
N02 G91 G28 X0 Y0 Z0 ; The tool is moved to home position
N03 M06 T01 ; (Tool change)
N04 G90 G54 G43 H01 Z100.0 ; Work offset, Tool length compensation call
N05 M03 G42 S1000 M08; ; Positioning above the reference and spindle
starts rotating at 1000 rpm
N06 G01 X25.0 Y25.0 ; Rapid movement to point 1
N07 G01 Z-5.0 F400 ; The tool is moved inside work of 5.0 mm
N08 Y175.0 ; The tool is moved to second corner
N09 X175.0 ; The tool is moved to third corner
N10 Y25.0 ; The tool is moved to fourth corner
N11 X25.0 ; The tool is moved back to first corner
N12 G00 Z100.0 G40 M05 ; The tool is taken out of the work and spindle
stop
N13 G91 G28 X0 Y0 Z0 ; The tool is moved back to home position
N14 M 0 9 M30 ; Program stop and rewind
NC Words
G54-G59: Work coordinate system selection
NC Words
M CODES
M00 Program stop M06 Tool change
M01 Optional stop M07 Flood coolant on
M02 End of program M08 Mist coolant on
M03 Spindle CW M09 Coolant off
M04 Spindle CCW M30 End of tape
Example-2
N00 G90 G71 G94 ; Ab. coordinates, Metric, Feed-mm/min
N01 M06 T1 ; Load Tool 1
N02 G00 Z 10 ; Rapid to 10mm above part
N03 M03 S3000 ; Turn spindle on to 3000 rpm
N04 G00 X20Y20 ; Rapid to point A
N05 G01 Z-2 F10 ; Plunge to -2mm at 10mm/min.
N06 X20Y60 ; Straight line interp. to B
N07 X35Y40 ; Straight line interp. to C
N08 X50Y60 ; Straight line interp. to D
N09 G01 X50Y20 ; Straight line interp. to E
N10 G00 Z10 ; Retract Cutting Tool
N11 X70Y20 ; RAPID TO POINT H
N12 G01 Z-2 F10 ; Plunge to -2mm at 10mm/min.
N13 X70Y60 ; Straight line interp. to F
N14 G02 X60 Y20 I70 J40 ; CW Circle interp.
N15 G00 Z10 ; Retract Cutting Tool
N16 M05 ; Turn off Spindle
N11 G91 G28 X0 Y0 Z0 ; The tool is moved back to home position
Example-3
N0000 G20 G94 inch input, Feed in inch/min.
N0010 G41 S1000 F5 M03 Begin compensation(left), set feed and
speed, spindle on (CW)
N0020 G00 X6.000 Y6.000 Move to lower left corner
N0030 G01 Z-1.000 Plunge down the tool
N0040 G01 Y8.000 Cut to upper left corner
N0050 G01 X8.000 M96 Cut to upper right corner with external curve
N0060 G01 Y6.000 M96 Cut to lower right corner with external curve
N0070 G01 X6.000 M96 Cut to lower left corner with external curve
N0080 G01 Z1.000 Lift the tool
N0090 G40 M30 End the composition, stop the machine
20
Ø10
30
(0,0)
10
All dimensions in mm
N01 G90 G54G21 G94 ; absolute mode, input in mm, feed mm/min
N02 M03M6T1 S1000 M08 ; spindle rotates in clockwise at 1000rpm, coolant on
N03 G00 Z50 ; rapid traverse to 50mm above plate
N04 G01 X20 Y30 ; rapid traverse to (20,30)
N05 G01G83 Z-10 Q2.5 R5 F50 ; actual drilling
N06G80 G00 Z5 ; rapid traverse to 5mm above plate
N07 G91G28X0Y0Z0 ; Return to reference
N08 M05 ; spindle off
N09 M09 ; coolant off
N10 M30 ; program end
(0,0)
Z
R22 R21 R20
20 10 X
40
N01 G90 G71 G94 M03 S2000
N02 G00 X44 Z2
N03 G01 X42
N04 Z-20 F80
N05 G00 X44 Z2
N06 G01 X40
N07 Z-10 F80
N08 G00 X44 Z2
N09 M05
N10 G28
N11 M30
NC Words
G54-G59: Work coordinate system selection
NC Words
M CODES
M00 Program stop M06 Tool change
M01 Optional stop M07 Flood coolant on
M02 End of program M08 Mist coolant on
M03 Spindle CW M09 Coolant off
M04 Spindle CCW M30 End of tape
CANNED CYCLE FUNCTIONS
- Set of operations assigned to one block and performed
automatically without any possibility of interruption.
- Process can be executed with one command instead of
programming a series of individual moves,
- For example drilling a hole involves performing a group of
well defined motions. Canned cycle perform these repetitive
motions with a simple set of codes.
- Once the Canned cycle is activated it will repeat the drilling
cycle at every location as specified in the program.
Usually Canned cycle involves a set of six operations
- Positioning of the X and Y axes at rapid traverse.
- A rapid traverse move to an initial clearance level plane (G98)
- The machining cycle is executed
- A dwell or other operation is executed at the bottom of the hole.
- A rapid traverse return to the R level plane along the Z axis
(G99)
- A rapid traverse return to the initial level plane along the Z axis.
Block format is
N….G…G….X…Y…Z…R…Q…P….F….K….L….
N= the block number
G=the type of cycle function
G= initial or R level return
X, Y= the hole position (positioning is carried out by rapid
traverse)
Z= depth of the hole
R= distance between plane R and the surface of the material.
□ Level R refers to the horizontal plane, positioned closely
above the material on which the tool tip moves. The programmed
value or R is valid until the new value is entered. It doesn't have
to be included in every block. The tool will return to this level at
the end of each hole drilled.
Q= the depth of cut for individual pecks (not used for every
drilling cycle)
P= the dwell time for the drill while rotating at the bottom of
the hole (not used for every drilling cycle)
□ dwell is in seconds for the purpose of complete removal
of excess material
F= feed rate
K= number of repeats
G81- canned cycle for spot drilling
G82- for counter boring
G83- deep hole peck drilling
G86- boring cycle
G80- cancelling canned cycle.
G81- SPOT DRILLING CYCLE
2 3
1 4
0,0 DEPTH – 10MM
N1 T01 M06;
N2 G21;
N3 G00G17 G90 G54G41;
N4 G91 G28 X0 Y0 Z0; 2 3
N5 G43 H01 Z100;
N6 M03 S1000 ;
5
N7 G99 G83 Z-10 Q2 R5 F300;
N8 G01X20 Y20;(1)
1 4
N9 X20 Y80;(2)
N10 X80Y80;(3)
N11 X80Y20;(4)
N12 X50 Y50;(5)
N13 G80 G00 Z100;
N14G91 G28 X0 Y0 Z0 ;
N15M05;
N16M30;
Peck drilling
Distance of first hole from reference = (20,30)
Distance between columns = 25
Distance between rows = 20
Diameter of holes = 10 mm
Depth of hole = 30mm
N1 G21 G94
N2 G91 G28 X0 Y0 Z0
N3 T01 M06
N4 G17 G90 G54 G00 X20 Y30
N5 G43 H01 Z100
N6 M03 S1000 Z20
N7 G99 G83 Z-30. R5 Q5 F300
N8 G91 Y20 K6
N9 X25
N10 Y-20 K6 N14 Y-20 K6
N11 X25 N15 X25
N12 Y20 K6 N16 Y20 K6
N13 X25 N17 G80 G00 Z100 M05
N18 G28 X0 Y0 Z0
N30 M30
N01 G54 G90 G21 G94 M03 M08 S800;
N05 G01 X30 Z0 F2
N10 G00 Z1
N15 G00 X20 Note: Please enter the diameter as
N20 G01 Z-35 X coordinate
N25 G01 X30 Z-65
N30 G00 X30 Z1
N35 M05 M09
N40 M02
COMPUTER ASSISTED
PART PROGRAMMING
(CAPP)
Computer assisted part programming
• APT: Automatically programmed tools
• ADAPT: Adaption of APT
• EXAPT: Extended subset of APT
Introduction
• Computer assisted programming methods are much faster
and more reliable than manual programming techniques.
• There are a variety of forms of computer assisted
programming.
• The common feature of these programs is that the part and
machining paths are not defined directly with G-code but
through English-like statements or through interactive
graphic instructions.
Two Main Tasks in CAPP
• When utilizing one of the NC programming languages part
programming can be summarized as consisting basically of
two tasks:
– Defining the Geometry of the workpart
– Tool Path Construction
Defining The Geometry of the workpart
• No matter how complicated the workpart may appear it is
composed of basic geometric elements e.g. lines, circles,
points, etc.
• It is the part programmer’s task to enumerate the
component elements out of which the workpart is formed.
• Each geometric element must be identified and the
dimensions and location of the element explicitly defined.
• An example of defining a point in APT language is as
follows:
P1=POINT/6.0,1.2,0
Tool Path Construction
• After defining the workpart geometry, the programmer
must next construct the path that the cutter will follow to
machine the part.
• This toolpath specification involves a detailed step by step
sequence of cutter moves.
• The moves are made along the geometry elements which
have previously been defined.
• An example of toolpath statement in APT language is as
follows:
GOLFT/L3, PAST,L1
NC Part Programming Languages
• Following are the important NC part programming
languages:
– APT ( Automatically Programmed Tools )
– AUTOSPOT ( Automatic System For Positioning Tools )
– SPLIT ( Sundstrand Processing Language Internally Translated )
– ADAPT ( Adaptation of APT )
– EXAPT ( Extended Subset of APT )
AUTOMATICALLY PROGRAMMED TOOLS
(APT)
Introduction of APT
• The APT language was the product of MIT development
work on NC programming systems.
• Its development began in June 1956, and it was first used
in production around 1959.
• Today it is the most widely used language in NC part
programming.
• Although first intended as a contouring language , modern
versions of APT can be used for both positioning and
continuous path programming.
Types of Statements in APT
The four types of statements in the APT language are:
1. Geometry Statements: which define primitive elements such as points,
lines, circles, planes, cones and spheres. They are also sometimes called
definition statements
2. Motion Statements: which describe the tool path in relation to the part
geometry
3. Postprocessor Statements: which give specific machine tool code
information as well as feeds and speeds
4. Auxiliary Statements: which give part and tool tolerances
1. GEOMETRY STATEMENTS
• The general form of geometry statements is:
symbol = geometry type / descriptive data
• An example of such statement is:
P1 = POINT/100.0, 200.0, 300.0
• The statement is made up of three sections.
• The first is the symbol use to identify the geometric element. Normally the
alphabet “P” is used for defining a Point, “C” for Circle, “L” for Line and
“Pl” for Plane.
• The second section of the geometry statement is an APT vocabulary word
that identifies the type of geometry element. e.g. POINT, LINE, CIRCLE,
PLANE, etc.
• The third section of the geometry statement is the descriptive data that
define the element precisely, completely and uniquely.
DEFINING A POINT IN APT
GENERAL RULES:
• Every point definition will have the same basic format:
Symbolic name = POINT / definition of a point
• When a point has been defined it will have coordinates in all three axes.
• If there is no allowance in a definition for quoting the z coordinate this will
automatically be made zero
DEFINITION OF POINT-1:
( Coordinate Values )
Y P1 = POINT/2,2,2
P1
2
X
2
DEFINITION OF POINT-2:
(Intersection of two previously defined lines)
P2 = POINT / INTOF,L1,L2
L1
P2
L2
DEFINITION OF POINT-3:
(Intersection point of a previously defined line and circle)
P3 = POINT / XSMALL, INTOF, L1, C1
Or P3 = POINT / YSMALL, INTOF, L1, C1
P4 = POINT / XLARGE, INTOF, L1, C1
Or P4 = POINT / YLARGE, INTOF, L1, C1
C1
P4
L1
P3
DEFINITION OF POINT-4:
(Intersection point of two previously defined circles)
P3 = POINT / XSMALL, INTOF,C1,C2
Or P3 = POINT / YLARGE, INTOF, C1,C2
P4 = POINT / XLARGE, INTOF, C1,C2
Or P4 = POINT / YSMALL, INTOF, C1,C2
P3 C1
P4
C2
DEFINITION OF POINT-5:
(On the circumference of a previously defined circle )
P2 = POINT / C1,ATANGL,75
P2
75°
X
C1
DEFINITION OF POINT-6:
(Center Point of a previously defined circle )
P2 = POINT / CENTER, C1
P2
C1
DEFINITION OF POINT-7:
(On a previously defied Line and a known X or Y dimension from
datum )
P2 = POINT / L1, XCOORD, 2
or P2 = POINT / L1, YCOORD, 3
P2 L1
3
X
2
DEFINING A LINE IN APT
GENERAL RULES:
• Every line definition will have the same basic format:
Symbolic name = LINE / definition of a line
• Lines are of infinite length.
• Lines do not have a direction
DEFINITION OF LINE-1:
(Passing through two previously defined points)
L1 = LINE/P1,P2
P2 L1
P1
DEFINITION OF LINE-2:
(Passing through a previously defined point and tangent to a
previously defined circle)
L3 = LINE / P1, RIGHT, TANTO, C2
L4 = LINE / P1, LEFT, TANTO, C2
The RIGHT or LEFT modifiers are applied by looking from the point to the circle
and deciding whether the line will pass to the right or left of the circle.
L4
C1
P1 L3
DEFINITION OF LINE-3:
(Tangent to two previously defined circles)
L1 = LINE / LEFT, TANTO, C1, LEFT, TANTO, C2
L1 = LINE / RIGHT, TANTO, C2, RIGHT, TANTO, C1
The RIGHT & LEFT modifiers are applied looking from the first circle
quoted to the second
L1
C2
C1
DEFINITION OF LINE-3: contd.
(Tangent to two previously defined circles)
L3 = LINE / LEFT, TANTO, C1, RIGHT, TANTO, C2
L4 = LINE / RIGHT, TANTO, C1, LEFT, TANTO, C2
L3
C2
C1
L4
DEFINITION OF LINE-4:
(Passing Through a previously defined point at a specified angle to
the X-axis)
L2 = LINE / P1, ATANGL, 30
L2 = LINE / P1, ATANGL, -150
L2
P1 30°
150°
DEFINITION OF LINE-5:
(Passing through a previously defined point,
parallel to a previously defined line)
L3 = LINE/P3,PARLEL,L2
P3
L3
L2
DEFINITION OF LINE-6:
(Passing through a previously defined point,
perpendiculat to a previously defined line)
L3 = LINE/P1,PERPTO,L2
P1
L2
L3
DEFINING A CIRCLE IN APT
GENERAL RULES:
• Every circle definition will have the same basic format:
Symbolic name = CIRCLE / definition of a circle
• Circles defined in APT are complete circles.
• Circles do not have directions
DEFINITION OF CIRCLE-1:
(Coordinates of center of circle, with a given radius)
C1 = CIRCLE/X,Y,R
C1
(X,Y)
DEFINITION OF CIRCLE-2:
(Previously defined center point with a given radius)
C2 = CIRCLE/CENTER,P1,RADIUS,5
C2
5R
P1
DEFINITION OF CIRCLE-3:
(Previously defined center point and tangent to a previously defined
line)
C2 = CIRCLE/CENTER,P1,TANTO,L2
L2
P1
C2
DEFINITION OF CIRCLE-4:
(Previously defined center point and passing through another
previously defined point)
C2 = CIRCLE/CENTER,P1,P2
P2
P1
C1
DEFINITION OF CIRCLE-5:
(Passing through three previously defined points)
C3 = CIRCLE/P1,P2,P3
P2
P1
C3
P3
DEFINITION OF CIRCLE-6:
(Previously defined center point and tangent to a previously defined
circle)
C3 = CIRCLE / CENTER, P1, SMALL, TANTO, C2
C4 = CIRCLE / CENTER, P1, LARGE, TANTO, C2
DEFINITION OF CIRCLE-7:
(Tangent to two previously define lines, with a given radius value)
C3 = CIRCLE / YSMALL, L1, XLARGE, L2, RADIUS, 5
C4 = CIRCLE / YLARGE, L1, XSMALL, L2, RADIUS, 5
DEFINING A PLANE IN APT
GENERAL RULES:
• Every plane definition will have the same basic format:
Symbolic name = PLANE / definition of a plane
• A plane is used to construct a surface of constant “Z” level to which the
cutter should be referenced when machining in the XY plane
• Planes can only be defined parallel to XY plane
• Planes are of infinite area
DEFINITION OF PLANE-1:
(By three previously defined points)
PL4 = PLANE/P1,P23
2. MOTION STATEMENTS
• APT motion statements have a general format:
motion command / descriptive data
e.g. GOTO / P1
• At the beginning of the motion statements tool must be given a starting
point
FROM / P0
Or FROM / -2, -2, 0
• The FROM is an APT vocabulary word which indicates that this is the
initial point from which others will be referenced. The FROM statement
occurs only once at the start of the motion sequence.
• In APT there are two basic types of motion statements:
a) Point to Point motion
b) Contouring motion
a) POINT TO POINT MOTION
• There are only two basic point to point motion commands
GOTO:
The GOTO statement instructs the tool to go to a particular point location
specified in the descriptive data.
e.g. GOTO / P2
GOTO / 2, 7, 0
GODLTA:
The GODLTA command specifies an incremental move for the tool.
e,g, GODLTA / 2, 7, 0 instructs the tool to move from its present
position to 2 units in x-direction, 7 units in y-direction and 0 units in
z-direction
EXAMPLE OF POINT TO POINT MOTION
• Drill three holes of 0.5” diameter at P1, P2, P3. The part is 0.5” thick.
EXAMPLE OF POINT TO POINT MOTION
P1=POINT/1,2,0.5
P2=POINT/1,1,0.5
P3=POINT/3.5,1.5,0.5
P0=POINT/-1,3,2
FROM/P0
GOTO/P1
GODLTA/0,0,-0.5
GODLTA/0,0,0.5
GOTO/P2
GODLTA/0,0,-0.5
GODLTA/0,0,0.5
GOTO/P3
GODLTA/0,0,-0.5
GODLTA/0,0,0.5
GOTO/P0
b) CONTOURING MOTION
• In contouring motion commands the tool position must be continuously
controlled throughout the move. For contouring movements, the tool is
directed along intersecting surfaces. These surfaces have specific names in
APT.
b) CONTOURING MOTION
• The Drive Surface (DS) guides the side of the cutter, the Part Surface
(PS) defines the position of the bottom of the cutter, and the Check
Surface (CS) defines the limit of current tool motion. The part surface may
or may not be an actual surface of the workpart.
How to approach the check surface
• Modifier words, such as TO, ON, PAST or TANTO, are used to govern the
position of the tool in relation to the check surface.
How to use the drive surface
• Motion statements, GOLFT (go to the left), GOFWD (go forward) and
GORGT(go to the right), are also used to control the cutter motion.
Example APT Problem:
• An APT program for the profiling of the part in Figure
2 is to be generated. The processing parameters are:
(a) feed rate is 5.39 inches per minute; (b) spindle
speed is 573 revolutions per minute; (c) a coolant is
to be used to flush the chips; (d) the cutter diameter
is to be 0.5 inches, and (e) the tool home position is
(0, -1, 0).
EXAMPLE OF CONTOURING MOTION STATEMENTS
EXAMPLE OF CONTOURING MOTION STATEMENTS
FROM/P0
GO/TO,L1,TO,PL1,TO,L5
GORGT/L1,PAST,L2
GOLFT/L2,TO,L3
GORGT/L3,TANTO,C1
GOFWD,C1,PAST,L4
GOFWD/L4,PAST,L5
GOLFT/L5,PAST,L1
GOTO/P0
3. POST PROCESSOR STATEMENTS
• APT motion statements have a general format:
motion command / descriptive data
e.g. GOTO / P1
3. POST PROCESSOR STATEMENTS
3. POST PROCESSOR STATEMENTS
4. AUXILIARY STATEMENTS
EXAMPLE