Professional Documents
Culture Documents
PROGRAMMING)
Part program: A computer program to
specify
- Which tool should be loaded on the
machine spindle?
- What are the cutting conditions (speed,
feed, coolant ON/OFF etc)?
- The start point and end point of a motion
segment?
- how to move the tool with respect to the
machine?
F5 S4 T4
M2
tool
spindle speed
miscellaneous function
26
on/off).
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)
CCW
left
G42 Cutter
right
compensation-
Program stop
Optional program stop
Program end
Spindle
Spindle
Spindle
on clockwise
on counterclockwise
stop
Tool change
Coolant
Coolant
Clamps
Clamps
on
off
on
off
Program stop,
reset to start
Letter Codes
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.
Letter Codes
I, J, and K codes are used to specify the coordinate
axis when defining the center of a circle.
Number following the code defines the respective
coordinate for the center of the circle.
The number may require that a specific format be used (i.e. 3.4
means three numbers before the decimal and four numbers after the
decimal).
F-code: used
S-code: used
T-code: used
to specify
to specify
to specify
Letter Codes
R-code:
Retract distance when used with G81, 82,
and 83.
Radius when used with G02 and G03.
P-code: Used to specify the dwell time
associated with G04.
of each program.
:1025 Program identification number.
Follows the program start flag at the
beginning of each program.
Only two commands that dont start with a
letter.
Block Format
Sample Block
Modal G-Codes
Most G-codes set the machine in a mode
36
Linear
Interpolation,
or
straight-line feed
moves, on the flat
XY plane (no Z
values
are
specified).
G01 command,
using
multi-axis
feed moves. All
diagonal
feed
moves
are
a
result of a G01
command, where
two or more axes
Format: N_ G02 X_ Y_ Z_ I_ J_ K_ F_
or N_ G02 X_ Y_ Z_ R_ F_
Circular Interpolation
is more commonly
known as radial (or
arc) feed moves. The
G02
command
is
specifically used for
all clockwise radial
feed moves, whether
they are quadratic
arcs, partial arcs, or
complete circles, as
long as they lie in
any one plane.
The G02 command is
modal and is subject
to a user-definable
Format: N_ G80
Format: N_ M04 S_
The M04 command switches the spindle on in a
counterclockwise rotation. The spindle speed is
designated by the S letter address, followed by the
spindle speed in revolutions per minute.
M07/M08 COOLANT ON
Format: N_ M07 or N_ M08
The M07 and M08 commands switch on the coolant
flow.
M09 COOLANT OFF
Format: N_ M09
The M09 command shuts off the coolant flow. The
coolant should be shut off prior to tool changes or
when you are rapiding the tool over long distances.