Docsity

CNC Programming-Computer Numerical Control-Lecture Slides, Slides of Computer Numerical Control

Partial preview of the text

Download CNC Programming-Computer Numerical Control-Lecture Slides and more Slides Computer Numerical Control in PDF only on Docsity!

CNC ProgrammingCNC Programming

Lecture 25Lecture 25

Engineering 475Engineering 475

Automated Production SystemsAutomated Production Systems

Information Needed by a CNCInformation Needed by a CNC

MachineMachine

1.^

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

Right Hand RuleRight Hand Rule Y^ X

Z

The right hand rule is used to define thepositive direction of the coordinate axes.

Nanfara, Fig. 2.

Standard LatheStandard LatheCoordinate SystemCoordinate System

Nanfara, Fig. 2-

Vertical Mill or DrillVertical Mill or DrillCoordinate SystemCoordinate System

Chang, Fig. 10.

Milling Tool Coordinate SystemMilling Tool Coordinate System

Nanfaro, Fig. 2-6(b)

Absolute CoordinatesAbsolute Coordinates

x

Nanfaro, Fig. 2-

Incremental CoordinatesIncremental Coordinates

Nanfaro, Fig. 2-

Letter CodesLetter 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

  • Each instruction to the machineconsists of a letter followed bya number.• Each letter is associated with aspecific type of action or pieceof information needed by themachine. N,G,X,Y,Z,A,B,C,I,J,K,F,S,T,R,M

Letters used in Codes

Letter CodesLetter Codes(G and M Codes)(G and M 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

  • G-codes

: Preparatory Functions

  • involve actual tool moves.• M-codes

: Miscellaneous Functions – involve actionsnecessary for machining (i.e.spindle on/off, coolant on/off).

Letter CodesLetter Codes

(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

Letter CodesLetter Codes

(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

  • N-codes

: 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.

Letter CodesLetter Codes(I,J, and K Codes)(I,J, and K 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

-^ 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).

Letter CodesLetter Codes(F, S, and T Codes)(F, S, and T 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

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.