CAM Lab Mtech
CAM Lab Mtech
TECH – CAD/CAM
CAM LABORATORY
EXPT
DATE TOPIC PAGE NO
NO.
INTRODUCTION 02-09
CNC LATHE
INTRODUCTION
WORD DETAILS:
Although the control will, in general, accept part programming words in any
sequence, it is recommended that the following word order for each block is used.
N; G; X or U; Z or W; I; K; F; S; T; M
O: PROGRAM NUMBER
The “O” followed by a 4 digit numeral value is used to assign a program number.
Example:
O1002
N: SEQUEMCE NUMBER
The N word may be omitted. When programmed, the sequence number following
the N address is a four digit numerical value and is used to identify a complete block of
information. Although ascending, descending, or duplicate numbering is allowed, it is
best to program in ascending order in increments of 10. This allows for future editing and
simplified sequence number search.
G: PREPARATORY COMMAND:
Example:
Valid N100 G00 G40 G41 G90 G95
A retained G word (Modal) from one group remains active until another G word
from the same group is programmed.
One-shot G words (Non-Modal) must be programmed in every block when
required.
Note 1:-
G Codes of 0 group represent those non modal and are effective to the designated
block.
Note 2:-
G codes of different groups can be commanded to the same block. If more than
one G codes from the same group are commanded, the latter becomes effective.
AXIS DEFINITIONS:-
Z AXIS:-
The Z axis is along a line between the spindle and the tailstock, or the centre line
of rotation of the spindle. Minus (-) movements of the tool are left toward the head stock;
positive (+) movements are right toward the tailstock.
X AXIS:-
The X axis is 90 degrees from the Z axis (perpendicular to the Z axis). Minus (-)
movements of the tool are toward the centre-line of rotation, and positive (+) movements
are away from the centre-line of rotation.
X : X AXIS COMMAND:-
U : X AXIS COMMAND:-
Z : Z AXIS COMMAND:-
W: Z AXIS COMMAND:-
X, U or P: DWELL:-
I WORD:-
For arc programming (G02 or G03) the I value (with sign) is programmed to define the
incremental distance parallel to the Z axis, between the start of the arc and the arc centre.
K WORD:-
For arc programming (G02 or G03), the K value (with sign) is programmed to define the
incremental distance parallel to the Z axis, between the start of the arc and the arc centre.
The maximum arc for I & K programming is limited to the quadrant. If I or K is zero, it
must be omitted.
F WORD:-
P WORD:-
Q WORD;-
Q words are used in automatic cycles to define the last block of a contour.
R WORD:-
S WORD:-
a) In the constant surface speed mode (G96) the four digit S word is used to command
the required surface speed in either feet or metres per minute.
b) In the direct r.p.m. mode (G97), the four digit S word is used to command the spindle
speeds incrementally, in r.p.m., between the ranges available for the machine.
c) Prior to entering constant surface speed mode 9G96) the S word is used to specify a
speed constraint, the maximum speed you wish the spindle to run at. To set this
restraint the S word is programmed in conjunction with the G50 word.
T WORD:-
The T words are used in conjunction with “M06”. These are used to call up the required
tool on an automatic indexing turret machine, and to activate its tool offsets.
M WORD:-
An M word is used to initiate auxiliary functions particular to the machine. One M code
can be programmed within one program block together with other part program information.
All M codes marked with an asterisk will be executed at the end of a block (i.e. after
the axis movement).
NOTE: - NOT ALL M CODES ARE AVAILABLE ON EACH MACHINE.
M98
P9999 5678
No
No. OF REPEATS
SUBPROGRAMS (SUNROUTINES):
By using the program jump functions, it is possible to simplify a machining program with
repeated machining or function sequences.
The machining sequences, which are repeated and can be used several times, are stored as
subroutines and called up using the program jump functions.
: 0010
N10 M00
N980 M99P10
M99 generally indicates the end of a subroutine and allows the jump back to the main
program. If it is used with “P” address, this indicates the “Jump To” block number.
The program will read the M99 P10 (GOTO N10) i.e. automatic return to line ten.
Line N10 must read M00 to stop the cycle for component loading. All information prior
to N10-i.e. standard tool geometry- would not be read after the first cycle. Therefore M30 would
not be programmed in this case.
EXPT NO:01
DT:
FACING CYCLE
EXPT NO:02
DT:
TURNING CYCLE
EXPT NO:03
DT:
THREADING CYCLE
G21 G98;
G28 U0W0;
M03 S600;
G28 U0W0;
M05;
M30;
EXPT NO:04
DT:
DRILLING CYCLE
EXPT NO: 05
DT:
GROOVING CYCLE
EXPT NO:06
DT:
G21 G94
G91 G28 Z0
G28 X0 Y0
M06 T06
M03 S1300
G90 G00 X0 Y0 Z5
[S]
G00 X2 Y30
G01 Z-1 F60
G01 X10 Y30
G03 X15 Y35 R5
G01 X15 Y 37.5
G03 X10 Y42.5 R5
G01 X07Y42.5
G02 X2 Y47.5 R5
G01 X2 Y50
G02 X7 Y55 R5
G01 X15 Y55
G00 Z2
[V]
G00 X20 Y55
G01 Z-1 F60
G01 X27.5 Y30
G01 X33 Y55
EXPT NO:07
DT:
MIRRORING
G21 G94
G91 G28 Z0
G28 X0 Y0
M06 T06
M03 S1500
G90 G00 X0 Y0 Z5
MIRRORING
EXPT NO:08
DT:
ROTATION
G21 G94
G91 G28 Z0
G28 X0 Y0
O1234
G00 X0Y0
G01 Z-1 F60
G01 X20 Y-10
G01 X40 Y0
G01 X20 Y10
G01 X0 Y0
G00 Z5
M99
ROTATION
EXPT NO:09
DT:
CIRCULAR POCKETING
G21 G94
G91 G28 Z0
M06 T05
M03S1200
G90 G00X0 Y0 Z5
G00 Z5
M05
G91 G28 Z0
G28 X0 Y0
M30
CIRCULAR POCKETING
EXPT NO:10
DT:
RECTANGULAR POCKETING
G21 G94
G91 G28 Z0
M06 T04
M03 S1200
G90 G00 X0 Y0 Z5
G00 Z5
M05
G91 G28 Z0
G28 X0 Y0
M30
RECTANCULAR POCKETING