





















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






















Preparatory Information: units, incremental orabsolute positioning
2.^ Coordinates: X,Y,Z, RX,RY,RZ 3.^ Machining Parameters: Feed rate and spindlespeed 4.^ Coolant Control: On/Off, Flood, Mist 5.^ Tool Control: Tool and tool parameters 6.^ Cycle Functions: Type of action required 7.^ Miscellaneous Control: Spindle on/off, directionof rotation, stops for part movement This information is conveyed to the machine through a setof instructions arranged in a desired sequence –
Program
The right hand rule is used to define thepositive direction of the coordinate axes.
Nanfara, Fig. 2.
Nanfara, Fig. 2-
Chang, Fig. 10.
Nanfaro, Fig. 2-6(b)
x
Nanfaro, Fig. 2-
Nanfaro, Fig. 2-
Example CNC Program^ N5 G90 G20N10 M06 T3N15 M03 S1250N20 G00 X1 Y1N25 Z0.1N30 G01 Z-0.125 F5N35 X3 Y2 F10N40 G00 Z1N45 X0 Y0N50 M05N55 M
Letters used in Codes
Example CNC Program^ N5 G90 G20N10 M06 T3N15 M03 S1250N20 G00 X1 Y1N25 Z0.1N30 G01 Z-0.125 F5N35 X3 Y2 F10N40 G00 Z1N45 X0 Y0N50 M05N55 M
: Preparatory Functions
: Miscellaneous Functions – involve actionsnecessary for machining (i.e.spindle on/off, coolant on/off).
(M Codes)(M Codes)
M
Program stop M
Optional program stop M
Program end M
Spindle on clockwise M
Spindle on counterclockwise M
Spindle stop M
Tool change M
Coolant on M
Coolant off M
Clamps on M
Clamps off M
Program stop, reset to start
(N Codes)(N Codes)
Example CNC Program^ N5 G90 G20N10 M06 T3N15 M03 S1250N20 G00 X1 Y1N25 Z0.1N30 G01 Z-0.125 F5N35 X3 Y2 F10N40 G00 Z1N45 X0 Y0N50 M05N55 M
: Gives an identifying number for eachblock of information.It is generally good practice toincrement each block number by5 or 10 to allow additionalblocks to be inserted if futurechanges are required.
Example CNC Program^ N5 G90 G20N10 M06 T3N15 M03 S1250N20 G00 X1 Y1N25 Z0.1N30 G01 Z-0.125 F5N35 X3 Y2 F10N40 G00 Z1N45 X0 Y0N50 M05N55 M
-^ I, J, and K
codes are used to
specify the coordinate axiswhen defining the center of acircle.• Number following the codedefines the respective coordinatefor the center of the circle.• The number may require that aspecific format be used (i.e. 3.4means three numbers beforethe decimal and four numbersafter the decimal).
Example CNC Program^ N5 G90 G20N10 M06 T3N15 M03 S1250N20 G00 X1 Y1N25 Z0.1N30 G01 Z-0.125 F5N35 X3 Y2 F10N40 G00 Z1N45 X0 Y0N50 M05N55 M
F-code
: used to specify the feed rate S-code
: used to specify the spindle speed T-code
: used to specify the tool identification number associatedwith the tool to be used insubsequent operations.