2 CNCP
2 CNCP
2 CNCP
Address
Word
A
B
C
F
G
I
J
K
M
N
R
S
T
X
Y
Z
Function
Rotation about the X-axis
Rotation about the Y-axis
Rotation about the Z-axis
Feedrate commands
Preparatory commands
Circular interpolation X-axis offset
Circular interpolation Y-axis offset
Circular interpolation Z-axis offset
Miscellaneous commands
Sequence number
Arc radius
Spindle speed
Tool number
X-axis data
Y-axis data
Z-axis data
3
Special function
Coordinates
Block number
Tool number
G-code
4
NC Coordinate Systems
To program the NC processing equipment, a standard axis system must be
defined by which the position of the workhead relative to the workpart can be
specified.
There are two axis systems used in NC, one for flat and prismatic parts and the
other for rotational parts.
Both axis systems are based on the Cartesian Coordinate System.
NC Coordinate Systems
The axis system for flat and prismatic parts consists of:
1. Three linear axes (X, Y, Z) in Cartesian coordinate system.
2. Three rotational axes (A, B, C)
In most machine tool applications, the x-axes and y-axes are used to move and
position the worktable to which the part is attached, and the z-axis is used to
control the vertical position of the cutting tool
6
NC Coordinate Systems
The path of the cutting tool relative to the rotating workpiece is defined in the
x-z plane.
The x-axis is the radial location of the tool.
The z-axis is parallel to the axis of rotation of the part.
7
Vertical
Horizontal
10
12
N50 M05
N55 M30
13
14
Example 1: Write a part program to obtain the model shown below from the
profile of given size. FACE MILL TO REDUCE THICKNESS BY 2mm USING 50mm DIA.
MILL TOOL.
75
100
18
0001
G00 G28 G21 G91 X0 Y0 Z0
M06 T05
M03 S1000
G90 G00 X-30 Y20 Z5
G00 Z-2
G01 X130 Y20 F40
G00 Y55
G01 X-30
G00 Z5
G91 G28 X0 Y0 Z0
M05 M09
M30
19
20
0002
N01 G21
N02 G91 G28 Z0
N03 G28 X0 Y0
N04 G90
N05 M06 T01
N06 M03 S1000
N07G00 Z2
N08 G00 X10 Y10
N09 G01 Z-3 F50
N10 X10 Y90
N11 X90 Y90
N12 X90 Y10
N13 X10 Y10
N14 G00 Z5
N15 G91 G28 Z0
N16 G28 X0 Y0
N17 M05
N 18 M30
21
Example 3: Write a part program to obtain the model shown below from the
workpiece of given size.
75
49
37.5
50
100
2
15
0003
N01 G21 G91 G28 Z0
N02 G28 X0 Y0
N03 G90
N04 M06 T01
N05 M03 S1000
N06 G00 X50 Y13
N07 G01 Z-2 F20
N07 G02 X50 Y62 R24.5 F50
N08 G02 X50 Y13 R24.5 F50
N09 G00 Z2
N10 G91 G28 Z0
N11 G28 X0 Y0
N12 M05
N13 M30
23
(-25,45)
(25,45)
(50,20)
(-50,20)
(-50, 0)
(0, 0)
(50, 0)
26
(80, 80)
27
Example 5: Write a part program to obtain the model shown below from the
profile of given size. CONTOUR MILL USING 20mm DIA.
30
Example 6: Write a part program to obtain the model shown below from the
profile of given size.
33
Canned Cycle
A sequence of machine operations initiated by a single G code.
Canned cycles act as shortcuts that simplify the program.
34
36
Example 7) Write a part program to obtain the model shown below from the workpiece
of given size.
75
30
37.5
50
100
15
G21 G94
G91 G28 Z0
G28 X0 Y0
G90
M06 T01
M03 S1000
G00 X50 Y37.5 Z5
G01 Z0 F20
G91
G170 R0 P0 Q1 X0 Y0 Z-2 I0 J0 K-15
G171 P45 S1200 R25 F50 B1300 J40
G28 Z0
G28 X0 Y0
M05
M30
Example 8 ) Write a part program to obtain the model shown below from the workpiece
of given size.
40
X85
X96 Y60
Y15
X85 Y4
X15
X4 Y15
G40 X-15
G00 Z5
G91 G28 X0 Y0 Z0
M5
M06 T3
M03 S1200
G90 Z5 M08
G0 X50 Y13
G01 Z-3 F20
G02 X50 Y62 R24.5 F50
G02 X50 Y13 R24.5
G0 Z0
G28 G91 G0 Z0 X0 Y0
M05
M06 T4
M03 S1000
G90 G0 X50 Y37.5Z5
G1 Z-1 F20
G91
G170 R0 P0 Q1 X0 Y0 Z-2 I0 J0 K-15
G171 P45 S1200 R25 F50 B1300 J40
G00 G28 Z0 X0 Y0
M5
M06 T5
M03 S1200
G90 G00 X6 Y6 Z5
G81 G99 G90 Z-20 R3 F50
G90 X94
Y69
X6
G80
G91 G28 X0 Y0 Z0
M05 M30
Mirroring
M70 Mirror along X
ON
M71 Mirror along Y
ON
M80 Mirror along X
OFF
M81 Mirror along Y
OFF
M98 subprogram Call
M99 Subprogram End
42
Note:
Width of slot = 4 mm and Depth of Cut= 1mm
43
G21 G94
G91 G28 Z0
G28 X0 Y0
G90
M06 T01
M03 S1000
G00 X0 Y0 Z5
M98 P0015000
M70
M98 P0015000
M80
M70
M71
M98 P0015000
M80
M81
M71
M98 P0015000
M81
G00 Z5
G91 G28 Z0
G28 X0 Y0
M05
M30
Subprogram
:5000
G00 X10 Y10 Z5
G01 Z-1 F20
X40
X10 Y40
Y10
G01 Z5
G00 X0 Y0
M99
44
Scaling
G21 G94
G91 G28 Z0
G28 X0 Y0
G90
M06 T01
M03 S1500
G00 X0 Y0
M98 P0012424
G00 X0 Y0
M98 P0012425
G91 G28 Z0
G28 X0 Y0
M05
M30
Subprogram 2:
:2424
G90 G00 X-40 Y-40 Z5
G01 Z-1 F40
X-40 Y40
X40 Y40
X40 Y-40
X-40 Y-40
G01 Z5
M99
Subprogram 1:
:2425
G51 P0.5
M98 P0012424
G50
M99
46
Rotation
R Rotation Angle
G69 (Coordinate system rotation Cancel )
G73 High speed Peck Drilling Cycle
47
G21 G94
G91 G28 Z0
G28 X0 Y0
G90
M06 T01
M03 S1500
G00 X25 Y25 Z5
G68 X0 Y0 R0
M98 P0012323
G68 X0 Y0 R45
M98 P0012323
G68 X0 Y0 R90
M98 P0012323
G68 X0 Y0 R135
M98 P0012323
G68 X0 Y0 R180
M98 P0012323
G68 X0 Y0 R225
M98 P0012323
G68 X0 Y0 R270
M98 P0012323
G68 X0 Y0 R315
M98 P001 2323
G69
G91 G28 Z0
G28 X0 Y0
M05
M30
Subprogram:
:2323
G99 G90G73 X25 Y25 Z-5 Q1 R3 F80
G00 Z5
G80
M99
48
49
G99 G28 U0 W0
M06 T1
G97 S1500 M03 M39
G00 X32 Z2
G71 U0.5 R0.5
G71 P07 Q14 U0.1 W0.1 F0.1
N07 G00 X10
G1 Z-12
G02 X16 Z-15 R3
G1 X22 Z-30
G02 X26 Z-32 R2
G03 X30 Z-34 R2
G01 Z-44
N14 X32
G70 P07 Q14
G28 U0 W0
M05 M09
M30
Thread Runout
The portion at the end of a threaded shank which is not cut or
rolled to full depth, but which provides a transition between full
depth threads and the fastener shank or head.
56
Crest
Flank
Pitch line
Thread
Angle
Addendum
Flank
angle
Dedendum
Axial thickness
Root
Axis of thread
Major dia
Pitch dia
Minor dia
58
59
60
61
There are various programming languages developed in the recent past, such
as,
COMPAT-II,
PROMPT,
ROMANCE,
SPLIT
- are used for writing a computer programme, which has English like
statements. A translator known as compiler program is used to translate it in a
form acceptable to MCU.
Input translation converts the coded instructions in the part program into
computer usable form.
2.
3.
Editing Provides readable data on cutter locations and machine tool operating
commands (CLDATA).
4.
Postprocessing Converts into low level code that can be interpreted by the
MCU
APT vocabulary words consist of six or fewer characters. The characters are
almost always letters of the alphabet.
Geometry statements:
The points, lines, and surfaces must be defined in the program prior to
specifying the motion statements. The general form of an APT geometry statement is
the following
SYMBOL = GEOMETRY TYPE/descriptive data
as an example; P1 = POINT/20.0, 40.0, 60.0
A symbol can be any combination of six or fewer alphabetical and numerical
characters, at-least one of which must be alphabetical. Also symbol cannot be APT
vocabulary word.
Symbol
Permissible
Permissible
Permissible
Not Permissible, Too many Characters (Maximum 6 characters)
Not Permissible, APT vocabulary word
Not Permissible, only alphabet and numerical characters allowed
P1
PZL
ABCDEF
PABCDEF
POINT
P1.5
2) Passes through point (P2) and parallel to another plane (PL1) that has been
previously defined;
PL2 = PLANE/P2, PARLEL, PL1
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
In APT there are two basic types of motion statements:
a)
Point to Point motion
b)
Contouring motion
GODLTA / 2, 7, 0
Drill three through holes of 0.5 diameter at P1, P2, P3. The part is 0.5 thick.
CONTOURING MOTION
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
GOLFT/L5,PAST,L1
GOTO/P0
83
MACHIN/
END
RAPID
FEDRAT/
SPINDL/
AUXILLIARY STATEMENTS :
A group of miscellaneous statements used to name the part program, cutter size, part
identification, insert comments in the program and accomplish similar functions.
Auxiliary statement are,
CLPRNT/
INTOL/
CUTTER /
OUTOL/
FINI
PARTNO
MACRO STATEMENTS :
Symbol = MACRO/ Parameter definition(s)
TERMAC
Activating MACRO subroutine
CALL/DRILL,PX=P1
CALL/DRILL,PX=P2
86
y
x
Example 2:
A profile milling operation is to be performed to generate the outline of the
part in the figure shown below. Disregard the two holes in the part. They have
already been drilled and will be used to clamp the part to the machine table .
Write the complete APT program
90
PARTNO EXAMPLE 2
MACHIN/MILLING,04
CLPRNT
INTOL/0.0001
UNITS/MM CUTTER/20.0
P0 = POINT/0, -1, 0
P1 = POINT/0, 0, 0
P2 = POINT/6, 0, 0
P3 = POINT/6, 1.88, 0
P4 = POINT/2.0, 3.75, 0
P5=POINT/0, 3.75, 0
L1 = LINE/P1, P2
L2=LINE/P2, P3
L3=LINE/P1, P5
L4=LINE/P5, P4
P6=POINT/3, 2.88, 0
C1 = CIRCLE/CENTER, P6, RADIUS, 1
L5 = LINE/P3, LEFT, TANTO, C1
L6 = LINE/P4, RIGHT, TANTO, C1
PL1 = PLANE/P1, P2, P3
SPINDL/573, CLW
FEEDRAT/2.29 COOLNT/ON
FROM/P0
GO/TO, L1, TO, PL1, TO, L3
GOFWD/L1, PAST, L2
GOLFT/L2, PAST, L5
GOLFT/L5, TANTO, C1
GOFWD/C1, PAST, L6
GOFWD/L4, PAST, L3
GOLFT/L3, PAST, L1
RAPID
GOTO/P0
SPINDL/OFF
FINI
EXAMPLE 2
Graphic based software using menu driven technique improves the user
friendliness.
The part programmer can create the geometrical model in the CAM package or
directly extract the geometrical model from the CAD/CAM database.
Built in tool motion commands can assist the part programmer to calculate the
tool paths automatically.
The programmer can verify the tool paths through the graphic display using the
animation function of the CAM system.
AUTOMATED INSPECTION
Offline Inspection
On-line/in-process,
On-line/post process inspection.
1.
2.
Processing conditions are stable and the risk of significant deviation in the process
is small, and
3.
Cost incurred during inspection is high in comparison to the cost of few defective
parts.
Cantilever Structure
Gantry Structure
Bridge Structure
Column Structure
Horizontal Structure
99
CMM Controls
On the basis of operating and controlling of CMM, it can be classified in the four
following ways :
1.
Manual drive,
2.
3.
4.
1. Manual drive
The probe is physically moved by human operator along the machines axes for making
contact with the part and the measurements are recorded in manual drive CMM.
The three orthogonal slides are designed to be nearly frictionless to permit the
probe to be free floating in the x, y, and z-directions.
A digital readout provides the measurements that the operator can record either
manually or with paper printout.
Only operator is allowed to carry out calculations on the data that includes the
enumeration of the centre and hole diameter.
The probe is free floating and permits the operator to bring it into contact with the
desired part surfaces.