Upload
amitghade
View
217
Download
0
Embed Size (px)
Citation preview
8/12/2019 24406967-What-is-CNC
1/90
What is CNC?
8/12/2019 24406967-What-is-CNC
2/90
CNC stands for Computer Numerical Control.
It is a versatile system that allows you to
control the motion of tools and parts throughcomputer programs that use numeric data.
CNC can be used with nearly any traditionalmachine.
8/12/2019 24406967-What-is-CNC
3/90
The most common CNC machines found in the
machine shop include machining centers (mills)
and turning centers (lathes).
CNC finds applications in other processes such
as sheet metal working, non-traditional
machining and inspection. Robots and Rapid
Prototyping machines are also CNC controlled
8/12/2019 24406967-What-is-CNC
4/90
CNC Vs Automates
Automats and Special Purpose Machines
(SPMs) require special cams / templates and
clutch settings for each part. Manufacture ofthese cams / templates is costly and slow.
Furthermore, changing over from one part to
the other on these machines also consumes
considerable time. The high cost and long timeof these hard automated machines to
produce parts can be justified only in mass
production. These are avoidedwith CNC
8/12/2019 24406967-What-is-CNC
5/90
Advantages of CNC
Flexibility
Accuracy
Speed Simplified fixture and generic cutting
tools
Storage of machining skill in NC
programs
Less skilled operators will do
Less fatigue to the operators
8/12/2019 24406967-What-is-CNC
6/90
Slide
Axis servo
controller
Computer
Numerical
Control
Encoder
Programmable
Machine
controller
User
Interface
(key board,monitor)
Machine Tool
BASIC FUNCTIONAL BLOCKS OF A CNC MACHINE
8/12/2019 24406967-What-is-CNC
7/90
Popular CNC Controls
FanucSinumeric from Siemens
Heidenhain
Allen Bradley etc
We will discuss only FANUC .
8/12/2019 24406967-What-is-CNC
8/90
What is a turning center?
8/12/2019 24406967-What-is-CNC
9/90
Turning centerA sophisticated CNC machine that specializes
in turning, boring, drilling, and threading
operations, all at the same location.
Spindle
The part of the machine tool that spins. On theturning center, the spindle holds the work
piece, On the machining center, the spindle
holds a cutting tool.
8/12/2019 24406967-What-is-CNC
10/90
TurretThis holds the tools required for machining.
Usually on a turret in the rear, most latheshave 8 to 12 tools on a single, indexing turret.
Gang-type lathes have no turret, tools are
mounted on a cross-slide for short motions.
8/12/2019 24406967-What-is-CNC
11/90
Axis
This is the moving slide, and a turning center
has a minimum of two axes.(named X and Z).controlled by the CNC.
The turret is mounted on the axes
in such a way that,The tool can be moved in
both directions.
8/12/2019 24406967-What-is-CNC
12/90
z
x
Z axis
Xaxis
8/12/2019 24406967-What-is-CNC
13/90
Turning center Operations
Facing
Turning
DrillingBoring
Grooving on OD or ID
Face grooving
Chamfering
Thread Cutting
Etc.,,
8/12/2019 24406967-What-is-CNC
14/90
Functions
Auxiliary function ( M functions)
Preparatory functions ( G functions)
Spindle function
Feed function
Tool function
8/12/2019 24406967-What-is-CNC
15/90
M codes
M codes are used for doing auxiliary
machine functions.
It is designated by M followed by No.
Example
M08 Coolant On
M06 Tool change
8/12/2019 24406967-What-is-CNC
16/90
M00 Program Stop Temporary stop of program
M01 Optional Stop Temporary stop of program ( Optiontion Stop )
M02 Program end Program end and reset
M03 Spindle normal rotation Clockwise rotation of spindle
M04 Spindle reverse rotation Counter clockwise rotation of spindle
M05 Spindle Stop Spindle rotation stop
M06 Tool Change ATC Cycle start
M08 Coolant ON Coolant Discharge
M09 Coolant OFF Coolant shut
M22 Index Forward Turret index clockwise
M23 Index Reversed Turret index counter clockwise
M24 Chuck open Opening of chuck
M25 Chuck close Closing of chuck
M30 Program end and rewind Program end and reset/rewind
M98 Sub-program call Call of a sub-program from a main program
M99 Sub-program end Return from a sub-program to a main program
8/12/2019 24406967-What-is-CNC
17/90
G Codes
G00 Positioning (Rapid Traverse)
G01 linear interpolation(Cutting feed)
G02 Circular interpolation (CW)
G03 Circular interpolation (CCW)
G04 Dwell G20 Input in inches
8/12/2019 24406967-What-is-CNC
18/90
G21 Input in millimeters
G28 Return to reference point G32 Thread cutting
G40 Tool nose radius compensation cancel
G41 Tool nose radius compensation left
G42 Tool nose radius compensation right
8/12/2019 24406967-What-is-CNC
19/90
G50 Programming of absolute zero point
G50 Maximum spindle speed setting
G70 Finishing cycle
G71 Stock removal in turning
G72 Stock removal in facing
G73 Pattern repeating
8/12/2019 24406967-What-is-CNC
20/90
G74 Peck drilling cycle - z axis
G90 Absolute programming
G91 Incremental programming
G92 Thread cutting cycle
G96 Constant surface speed control
G97 Constant surface speed control cancel
G98 Per minute feed
G99 Per revolution feed
8/12/2019 24406967-What-is-CNC
21/90
What is programming?
8/12/2019 24406967-What-is-CNC
22/90
Programming is telling the machine by
command data through numerical control
for its working of its components.
Example :
Movement of Turret..
Rotation of spindle etc
8/12/2019 24406967-What-is-CNC
23/90
Program block
A program block is a combination of above functions in a
single line.
Example : N01 G01 G91 X0.0 Y10.0 S2000 M03 ;
SEQUENCE
NUMBER
END OF BLOCK
Line number is optional
End of block is mandatory
8/12/2019 24406967-What-is-CNC
24/90
Sequence Number
Designated as N1 or N10 etc
Used to identify the blocks
Not mandatory
Occupies memory
Can be used for each process rather
than for each block
8/12/2019 24406967-What-is-CNC
25/90
What are various Functions ?
8/12/2019 24406967-What-is-CNC
26/90
Spindle speed Function
The spindle speed can be specified by a S code followed by a
Numerical value (rpm).
Syntax :S ;
Example : S2000 M03;
Usually S command is associated with M03 or M04 to specify
the direction of rotation CW or CCW
8/12/2019 24406967-What-is-CNC
27/90
CONSTANT SURFACE SPEED CONTROL (CSS CONTROL)
As you know when the tool is moving towards the center the cutting
speed changes.
Vc = DN/1000In CSS control N is varied automatically to keep the Vc constant
when the tool moves diametrically.
Syntax : G96 Vc; CSS Control on
G97; CSS control cancel
G96 S200;
G96 and G97 are modal codes.Here S200 denotes the cutting speed.
8/12/2019 24406967-What-is-CNC
28/90
CLAMP OF MAXIMUM SPINDLE SPEED
When we are using G96, the CSS control, the spindle Speed
need to be clamped to a maximum speed.
This is done with a preparatory function G50
Example : G50 S3500;
Spindle speed is clamped to a maximum of 3500 rpm.
8/12/2019 24406967-What-is-CNC
29/90
Feed function
The feed can be specified by F code followed by a Numerical
value (feed per minute / feed per revolution).
Syntax :F ;
Example : G98 F100;
: G99 F0.15;
G98 and G99 are preparatory functions to specify feed per minute
and feed per revolution respectively.
8/12/2019 24406967-What-is-CNC
30/90
Tool function
Tool selection
A 2 digit / 4 digit numeric followed by a T code is used
to select the required tool.
Syntax T
Example T0303; Selects turret 3 with offset Nr.03
T0313; Selects turret 3 with offset Nr.13
T0300; Cancels current offset.
Tool number
Offset number
8/12/2019 24406967-What-is-CNC
31/90
Lets see some G codes
8/12/2019 24406967-What-is-CNC
32/90
8/12/2019 24406967-What-is-CNC
33/90
G01 Linear interpolation
N_ G01 X_ Z_ F_
The G01 is the command by which the tool
travels to the point specified with X & Z at the
speed specified with F code.
G01 X-50.0F0.15;
8/12/2019 24406967-What-is-CNC
34/90
G90- Absolute command
The point with reference to the work piece
zero point is referred as absolute command
Always referred by G90
Example : G90 X20.0 Z20.0;
Refers to a point 20mm away from the work
zero in both x and z directions.
8/12/2019 24406967-What-is-CNC
35/90
8/12/2019 24406967-What-is-CNC
36/90
G91 - Incremental command
The point with reference to the present
position . No reference to the work piece zero
point. Always referred by G91
Example : G91 X20.0 Z20.0;
Refers to a point 20 mm away from the
current position in both x and z directions.
8/12/2019 24406967-What-is-CNC
37/90
G02 Circular interpolation (cw)
N_ G02 X_ Z_ R_ F_
The G02 is a clockwiseradial feed move
Z axis
GO2
X axis
http://www.cncezpro.com/Images/GCodes/Milling/g02/g02m.gif',%20'Demo',%20'width=260,height=200,toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollBars=0,resizable=0http://www.cncezpro.com/Images/GCodes/Milling/g02/g02m.gif',%20'Demo',%20'width=260,height=200,toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollBars=0,resizable=08/12/2019 24406967-What-is-CNC
38/90
8/12/2019 24406967-What-is-CNC
39/90
G04 Dwell
N_ G04 U or P_
The G04 is a dwell command that halts the
feed movement for the time as specified by
U or P.
8/12/2019 24406967-What-is-CNC
40/90
G20 Inch units
N_ G20
The G20 command defaults the system to
inch units. When a program is being run and
the G20 command is encountered, allcoordinates are stated as inch units
8/12/2019 24406967-What-is-CNC
41/90
8/12/2019 24406967-What-is-CNC
42/90
G28 Automatic return to
reference point
N_ G28 U_ W_
The G28 allows the existing tool to bepositioned to the machine zero point via an
intermediate position.
8/12/2019 24406967-What-is-CNC
43/90
G30 Automatic return to
2nd reference point
N_ G30 U_ W_
The G28 allows the existing tool to be
positioned to the machine zero point via an
intermediate position.
8/12/2019 24406967-What-is-CNC
44/90
G50 Co ordinate setting
Max spindle speed setting.
To assign the work co ordinate value as well as
max spindle speed setting this command is used
G 50 X_ Z_ Co ordinate setting
G50 S 2500 Max spindle speed setting
8/12/2019 24406967-What-is-CNC
45/90
G 50 X 200. Z100
100
100
8/12/2019 24406967-What-is-CNC
46/90
G96 Constant surface speed
Control
G96 is used when cutting speed is required to be
specified
G96 S425;
Ex facingTo have common cutting speed
8/12/2019 24406967-What-is-CNC
47/90
G97 Constant surface speed
control cancel
G97 is used when spindle speed is required to bespecified
G97
Ex DrillingTo have common cutting speed
8/12/2019 24406967-What-is-CNC
48/90
G98 Feed per minute
G98 is used to specify the tool movement in mm
per minute
G98
Ex bar bulling
8/12/2019 24406967-What-is-CNC
49/90
G99 Feed per Revolution
G99 is used to specify the tool movement in mm
per spindle revolution
G99
Ex Regular turning
8/12/2019 24406967-What-is-CNC
50/90
8/12/2019 24406967-What-is-CNC
51/90
Tool offset is a value used to compensate the difference between
the actual tool and the imaginary tool (standard tool) used forprogramming.
Standard tool
Actual tool
Z offset
X offset
8/12/2019 24406967-What-is-CNC
52/90
8/12/2019 24406967-What-is-CNC
53/90
Structure of a CNC program
8/12/2019 24406967-What-is-CNC
54/90
Evolution
Punched tape and input through tape reader
Programming directly on the machine
Programming through hand held device
Programming from centralized PC
8/12/2019 24406967-What-is-CNC
55/90
Process of Programming
Part drawing - indicates which are the
characteristics to be machined
Machining planhow many set ups,
fixtures, tooling, sequence of operation etc
Part programmingWriting program
considering the machiningplan
8/12/2019 24406967-What-is-CNC
56/90
Part drawing
Part
programming CNCMachine
tool
Programming Operation
BASIC FLOW FOR CNC PREPARATION
How to set the machine
8/12/2019 24406967-What-is-CNC
57/90
How to set the machine
Machine ON
Origin
Fixture Mounting
Fixture dialing
Locator/clamp fixing
Tool mtg on the holders
Measure the tool length
Tool pocketing
8/12/2019 24406967-What-is-CNC
58/90
Tool offset inputing
Programming
Find work co ordinate
Dry run with out component
/single block
Cutting in single block
Rapid /feed lesser rate
Component inspection
Correction of work co ordiante
Correction of tool offset
Component cutting @
100% feed/ speed/Rapid
8/12/2019 24406967-What-is-CNC
59/90
Program Number
Program number
The program no is used to arrange several
programs in order
The program no is expressed by putting
numerals of 4 digits after the alphabet O
Ex O 1234
8/12/2019 24406967-What-is-CNC
60/90
8/12/2019 24406967-What-is-CNC
61/90
Programming for Turning center
Turning center - Work coordinate principle
x +
Spindle
z(-) z (+)
Work Zero
x (-)
8/12/2019 24406967-What-is-CNC
62/90
Basic Programming rules CNC lathe :
X = The diameter of the part.
Z = The length dimension
Usually Z is set at the finished face of the part, any
cut into the part is a minus value.
A positive value in the program indicates it is
clear of the part, a minus value indicates it is into
the part.
8/12/2019 24406967-What-is-CNC
63/90
O ti l t d bl k ki
8/12/2019 24406967-What-is-CNC
64/90
Optional stop and block skip
Whenever the CNC encounters the code M01 it stops atthe same line.
Pressing Cycle start again will enable it to movefurther.
A SLASH / is used to tell the machine to skip the
particular block.
Example: /G00 X200.0;
8/12/2019 24406967-What-is-CNC
65/90
O7130
(PILATUS PROGRAM FOR 4130
ZEN)
8/12/2019 24406967-What-is-CNC
66/90
ZEN)
IF[#530NE4130]GOTO8
M98P6000
M86
G04X2.0
M01
N1 (R0UGH TURNING)
T0606
G30U0.0W0.0
G50S2000
G90G00G54X105.0Z-29.55
G96G99S375M04 M08
G01X46.0F0.4
U0.5W0.25
G00U6.0
Z0.5
X48.0
G01X20.0
G00X36.625Z1.5
G01X41.125Z-0.75
Z-29.55
G00U2.0W1.0
T0000
G30U0.0W0.0
M09
M05
#506=#506+1
M01
41.125
29.55
Turning & facing
O7130
(PILATUS PROGRAM FOR 4130
ZEN) Turning & facing
8/12/2019 24406967-What-is-CNC
67/90
)
IF[#530NE4130]GOTO8
M98P6000
M86
G04X2.0
M01
N1 (R0UGH TURNING)
T0606
G30U0.0W0.0
G50S2000
G90G00G54X105.0Z-29.55
G96G99S375M04 M08
G01X46.0F0.4
U0.5W0.25
Z0.5
X48.0
G01X20.0
G00X36.625Z1.5
G01X41.125Z-0.75
Z-29.55
G00U2.0W1.0
T0000
G30U0.0W0.0
M09
M05
#506=#506+1
M01
41.125
29.55
Turning & facing
8/12/2019 24406967-What-is-CNC
68/90
N2
(ROUGH C.BORE DV 2135)
T0808
G30U0.0W0.0
G90G00X0.0Z6.0
G97G99S1600M03
M08
G01Z-21.80F0.2
G00Z5.0
T0000
G30U0.0W0.0
M09
M05
#508=#508+1
M01
29.55
21.80
Drilling
G i
8/12/2019 24406967-What-is-CNC
69/90
Grooving
N6
(BOOT GROOVE)
T0303
G30U0.0W0.0
G90G00G54X44.0Z-19.85
G97G99S2000M03
M08
G01X37.625F0.25
G00X50.0
T0000
G30U0.0W0.0
M09
M05
#503=#503+1
M01
37.625
19.85
8/12/2019 24406967-What-is-CNC
70/90
Sub program call by M98
If i fi d f l
8/12/2019 24406967-What-is-CNC
71/90
If a program contains a fixed sequence or frequently
repeated pattern such a sequence or pattern can be stored
as a sub program in memory to simplify the program.
A sub program can be called from a main program
A called sub program can also call another subprogram.
EXAMPLE:
O0001;
.
.
.
M98P1000
.
.
.
M30;
O1000;
.
.
.
M98P2000
.
.
.
M99;
O2000;
.
.
.
M98P3000
.
.
.
M99;
O3000;
.
.
.
M98P4000
.
.
.
M99;
O4000;
.
.
.
.
.
.
.
M99;
8/12/2019 24406967-What-is-CNC
72/90
programmable data input - G10
8/12/2019 24406967-What-is-CNC
73/90
Offset values can be changed during run time from inside the
program by using programmable data input G10 command.
Syntax : G10 P_X_Z_;
G10 P_U_W_;
8/12/2019 24406967-What-is-CNC
74/90
Writing Comments in a program
A i f ti l d b t f i l b k t
8/12/2019 24406967-What-is-CNC
75/90
Any information enclosed by a set of circular brackets
() is regarded as a comment and the CNC
skips that line.
Comments are useful to describe the section of the program.
Example:
O0001;
(Main program for part 29665688-Pilatus);
N1;
T0101;
(Rough turning TCGX102-AL804);
8/12/2019 24406967-What-is-CNC
76/90
8/12/2019 24406967-What-is-CNC
77/90
You are aware that sub programs are useful for repeating the same
operation.
Custom macro function allows use of variables,arithmetic and
logical operations and conditional branches for easy development
of general programs.
It is useful to develop custom designed canned cycles.
They are very useful in generating alarms under stated conditions.
8/12/2019 24406967-What-is-CNC
78/90
8/12/2019 24406967-What-is-CNC
79/90
A macro variable is always prefixed with a
symbol.
Example : #100
Arithmetic expressions can be used to storethe values into macro variable.
Example #100 = #112-12;
Types of variables
8/12/2019 24406967-What-is-CNC
80/90
Types of variables
Null variable #0 is always represents a zero;
Local variables #1 to #33 are temporary locations to storeresults. Volatile.
Common variables #100 - #199 they can be shared amongmany programs. Volatile.
Common variables #500-#999 are common variables. Non-Volatile.
#1000System variables used to read and write NC dataitems like pallet in work zone, tool number, axis current
position etc.,
8/12/2019 24406967-What-is-CNC
81/90
Variable values-1047to -10-29
0
10-29to 1047
Referencing the variables in a part program.
N1 G01 X#500 F#501;
N2 S#503;
Macro alarms
8/12/2019 24406967-What-is-CNC
82/90
Macro alarms
We can build our own alarms using macro
#3000=1(TOOL OFFSET WRONG);
Will stop the machine and display an alarm in the screen
3001 TOOL OFFSET WRONG
8/12/2019 24406967-What-is-CNC
83/90
The current position of each axis is available in a macro
#5021 gives the machine current position for X
#5022 gives the machine current position for Y
#5081 and #5082 gives tool offset value.
8/12/2019 24406967-What-is-CNC
84/90
Arithmetic operations
Sum,Difference,Product and Quotient can be performed.
For example
#500 = #500+1;
Trigonometric and logarithmic operations
8/12/2019 24406967-What-is-CNC
85/90
g g p
#I=SIN [#j];
#I=COS [#j];
#I=TAN [#j];
#I=SQRT [#j];
#I=ABS [#j];
#i=LN [#j];
#I=EXP [#j];
8/12/2019 24406967-What-is-CNC
86/90
Conditional branch
IF [#100 GT 10] GOTO 2;
EQ = EQUAL TONE= NOT EQUAL TO
GT= GREATER THAN
GE= GREATER THAN OR EQUAL
LT= LESS THAN
LE= LESS THAN OR EQUAL
8/12/2019 24406967-What-is-CNC
87/90
BRANCHING EXAMPLE
O0003;
IF[#530 NE 5142] GOTO7;
.
.
.
.
.
.
N7;
IF[#501GT5000]#3000=1(TOOL LIFE END);
8/12/2019 24406967-What-is-CNC
88/90
WHILE STATEMENT
WHILE [conditional expression] DO m;
End m;
8/12/2019 24406967-What-is-CNC
89/90
G CODE INFORMATION
The present value of a modal G code can be
read from a macro variable.
If the machine is in G00 mode then #4001=00
G01 #4001=01
G02 #4002=02
G03 #4002=03
8/12/2019 24406967-What-is-CNC
90/90
Thank you