25 CNC programming


Information Needed by a CNC
Information Needed by a CNC
Machine
Machine
1. Preparatory Information: units, incremental or
absolute positioning
CNC Programming
CNC Programming
2. Coordinates: X,Y,Z, RX,RY,RZ
3. Machining Parameters: Feed rate and spindle
speed
4. Coolant Control: On/Off, Flood, Mist
5. Tool Control: Tool and tool parameters
Lecture 25
Lecture 25
6. Cycle Functions: Type of action required
7. Miscellaneous Control: Spindle on/off, direction
of rotation, stops for part movement
Engineering 475
Engineering 475
This information is conveyed to the machine through a set
Automated Production Systems
Automated Production Systems
of instructions arranged in a desired sequence  Program.
Right Hand Rule
Right Hand Rule
Cartesian Coordinate Systems
Cartesian Coordinate Systems
Z
Y
X
Consists of three axes positioned 90
The right hand rule is used to define the
degrees from each other.
positive direction of the coordinate axes.
Nanfara, Fig. 2.1
Chang, Fig. 10.1
Standard Lathe Gantry Mill Coordinate
Standard Lathe Gantry Mill Coordinate
Coordinate System System
Coordinate System System
Nanfara, Fig. 2-4 Nanfara, Fig. 2-3
1
Vertical Mill or Drill
Vertical Mill or Drill
Milling Tool Coordinate System
Milling Tool Coordinate System
Coordinate System
Coordinate System
Chang, Fig. 10.3 Nanfaro, Fig. 2-6(b)
Cartesian Coordinate
Cartesian Coordinate
Absolute Coordinates
Absolute Coordinates
System Planes
System Planes
X-Y Plane
x
X-Z Plane
Y-Z Plane
Nanfaro, Fig. 2-7
Nanfaro, Fig. 2-10
Coordinate System Exercise
Coordinate System Exercise
Incremental Coordinates
Incremental Coordinates
Nanfaro, Fig. 2-11
2
Letter Codes
Letter Codes
Letter Codes
Letter Codes
(G and M Codes)
(G and M Codes)
Example CNC Program
Example CNC Program
" Each instruction to the machine
" G-codes: Preparatory Functions
consists of a letter followed by
N5 G90 G20
N5 G90 G20
 involve actual tool moves.
a number.
N10 M06 T3
N10 M06 T3
N15 M03 S1250
N15 M03 S1250
" M-codes: Miscellaneous
" Each letter is associated with a
N20 G00 X1 Y1
N20 G00 X1 Y1
Functions  involve actions
specific type of action or piece
N25 Z0.1
N25 Z0.1
necessary for machining (i.e.
of information needed by the
N30 G01 Z-0.125 F5
N30 G01 Z-0.125 F5
spindle on/off, coolant on/off).
machine.
N35 X3 Y2 F10
N35 X3 Y2 F10
N40 G00 Z1
N40 G00 Z1
Letters used in Codes
N45 X0 Y0
N45 X0 Y0
N50 M05
N50 M05
N,G,X,Y,Z,A,B,C,I,J,K,F,S,T,R,M
N55 M30
N55 M30
Letter Codes
Letter Codes
Letter Codes
Letter Codes
(G Codes)
(G Codes)
(M Codes)
(M Codes)
M00 Program stop
G00 Rapid traverse
G40 Cutter compensation  cancel
M01 Optional program stop
G01 Linear interpolation
G41 Cutter compensation  left
G02 Circular interpolation, CW M02 Program end
G42 Cutter compensation- right
G03 Circular interpolation, CCW
G70 Inch format M03 Spindle on clockwise
G04 Dwell
G71 Metric format
M04 Spindle on counterclockwise
G08 Acceleration
G74 Full-circle programming off
M05 Spindle stop
G09 Deceleration
G75 Full-circle programming on
M06 Tool change
G17 X-Y Plane
G80 Fixed-cycle cancel
G18 Z-X Plane M08 Coolant on
G81-G89 Fixed cycles
G19 Y-Z Plane
G90 Absolute dimensions M09 Coolant off
G20 Inch Units (G70)
G91 Incremental dimensions
M10 Clamps on
G21 Metric Units (G71)
M11 Clamps off
M30 Program stop, reset to start
Letter Codes
Letter Codes
Letter Codes
Letter Codes
(X,Y, and Z Codes)
(X,Y, and Z Codes)
(N Codes)
(N Codes)
Example CNC Program Example CNC Program
" N-codes: Gives an " X, Y, and Z codes are used to
N5 G90 G20 N5 G90 G20
identifying number for each specify the coordinate axis.
N10 M06 T3 N10 M06 T3
block of information.
" Number following the code
N15 M03 S1250 N15 M03 S1250
defines the coordinate at the end
N20 G00 X1 Y1 N20 G00 X1 Y1
of the move relative to an
N25 Z0.1 N25 Z0.1
It is generally good practice to
incremental or absolute
N30 G01 Z-0.125 F5 N30 G01 Z-0.125 F5
increment each block number by
reference point.
N35 X3 Y2 F10 N35 X3 Y2 F10
5 or 10 to allow additional
N40 G00 Z1 N40 G00 Z1
blocks to be inserted if future
" The number may require that a
N45 X0 Y0 N45 X0 Y0
changes are required.
specific format be used (i.e. 3.4
N50 M05 N50 M05
means three numbers before
N55 M30 N55 M30
the decimal and four numbers
after the decimal).
3
Letter Codes
Letter Codes
Letter Codes
Letter Codes
(I,J, and K Codes)
(I,J, and K Codes)
(F, S, and T Codes)
(F, S, and T Codes)
Example CNC Program
Example CNC Program
" I, J, and K codes are used to
F-code: used to specify the feed
specify the coordinate axis
N5 G90 G20
N5 G90 G20
rate
when defining the center of a
N10 M06 T3
N10 M06 T3
circle.
N15 M03 S1250
N15 M03 S1250
S-code: used to specify the
" Number following the code
N20 G00 X1 Y1
N20 G00 X1 Y1
spindle speed
defines the respective coordinate
N25 Z0.1
N25 Z0.1
for the center of the circle.
N30 G01 Z-0.125 F5
N30 G01 Z-0.125 F5
T-code: used to specify the tool
N35 X3 Y2 F10
N35 X3 Y2 F10
" The number may require that a
identification number associated
N40 G00 Z1
N40 G00 Z1
specific format be used (i.e. 3.4
with the tool to be used in
N45 X0 Y0
N45 X0 Y0
means three numbers before
subsequent operations.
N50 M05
N50 M05
the decimal and four numbers
N55 M30
N55 M30
after the decimal).
Program Start Flag and Program
Program Start Flag and Program
Letter Codes
Letter Codes
(R and P Codes) Identification Number
(R and P Codes) Identification Number
Example CNC Program
R-code: Example CNC Program
Example CNC Program
N5 G90 G20
" Retract distance when used with % Program start flag. Placed at
N10 M06 T3
%
G81, 82, and 83. the beginning of each program.
N15 M03 S1250
:1045
" Radius when used with G02 and
N20 G00 X1 Y1
N5 G90 G20
G03. :1025 Program identification number.
N25 Z0.1
N10 M06 T3
Follows the program start flag
N30 G01 Z-0.125 F5
N15 M03 S1250
at the beginning of each
N35 X3 Y2 F10 P-code: Used to specify the
N20 G00 X1 Y1
program.
N40 G00 Z1 dwell time associated with
N25 Z0.1
N45 X0 Y0 G04.
N30 G01 Z-0.125 F5
Only two commands that
N50 M05
don t start with a letter.
N55 M30
Three Major Phases of a CNC
Three Major Phases of a CNC
Three Major Phases of a CNC
Three Major Phases of a CNC
Program
Program
Program
Program
Phase 1 - Program Setup Phase 2  Material Removal
Phase 1 - Program Setup Phase 2  Material Removal
N20 G00 X1 Y1 (Rapid to X1,Y1 from origin point)
% (Program start flag)
N25 Z0.125 (Rapid down to Z0.125)
:1001 (Four digit program number)
N30 G01 Z-0.125 F5 (Feed down to Z-0.125 at 5 ipm)
N5 G90 G20 (Absolute units, inches)
N35 G01 X2 Y2 (Feed diagonally to X2,Y2)
N10 M06 T2 (Stop for tool change, use tool # 2)
N40 G00 Z1 (Rapid up to Z1)
N15 M03 S1200 (Turn the spindle on CW to 1200 rpm)
N45 X0 Y0 (Rapid to X0,Y0)
Nanfara, pg. 36 Nanfara, pg. 36
4
Block Format
Block Format
Three Major Phases of a CNC
Three Major Phases of a CNC
Program Sample Block
Program
N135 G01 X1.0 Y1.0 Z0.125 F5
Phase 3  System Shutdown
Phase 3  System Shutdown
" Restrictions on CNC blocks
" Each may contain only one tool move
N50 M05 (Turn the spindle off)
" Each may contain any number of non-tool move G-codes
N55 M30 (End of program)
" Each may contain only one feedrate
" Each may contain only one specified tool or spindle speed
" The block numbers should be sequential
" Both the program start flag and the program number must be
independent of all other commands (on separate lines)
" The data within a block should follow the sequence shown
in the above sample block
Nanfara, pg. 36 Nanfara, pg. 36
Modal G-Code List
Modal G-Code List
Modal G-Codes
Modal G-Codes
Example CNC Program
G00 Rapid Transverse
G43 Tool length compensation (plus)
Most G-codes set the G01 Linear Interpolation
G44 Tool length compensation (minus)
N5 G90 G20
G02 Circular Interpolation, CW
machine in a  mode
G03 Circular Interpolation, CCW
N10 M06 T3 G49 Tool length compensation cancel
which stays in effect
G17 XY Plane
N15 M03 S1250
G80 Cancel canned cycles
until it is changed or G18 XZ Plane
N20 G00 X1 Y1
G19 YZ Plane
G81 Drilling cycle
cancelled by another G-
G20/G70 Inch units
N25 Z0.1
code. These commands G82 Counter boring cycle
G21/G71 Metric Units
N30 G01 Z-0.125 F5
are called  modal . G40 Cutter compensation cancel
G83 Deep hole drilling cycle
N35 X3 Y2 F10
G41 Cutter compensation left
G90 Absolute positioning
G42 Cutter compensation right
N40 G00 Z1
In the example, G00 and
G43 Tool length compensation (plus)
G91 Incremental positioning
N45 X0 Y0
G01 are modal.
N50 M05
N55 M30
Assignment
Assignment
Review the material presented.
Next class we look at an example,
and will develop G-code programs
in class.
5


Wyszukiwarka

Podobne podstrony:
25 Zasady programowania ole i
fanuc ot cnc program manual gcodetrainingX8(1)
25 wymowek programistow
Cnc Programming
Programowanie CNC
programowanie dla walka w cnc predk skraw Przyklad recz progr OSN
I3 Programowanie manipulatora przemysłowego CNC
Programowanie obrabiarek CNC
Programowanie warsztatowe tokarki CNC ze sterowaniem Sinumerik 840D (Politechnika Poznańska)
Programowanie warsztatowe tokarki CNC ze sterowaniem Sinumerik 840D (Politechnika Poznańska)
CNC Conversional programming

więcej podobnych podstron