IST / DEEC / ACSDC
MEEC 2007-2008
Industrial Automation
(Automao de Processos Industriais)
CAD/CAM and CNC
htt // http://www.isr.ist.utl.pt/~pjcro/courses/api0708/api0708.html i i t tl t/ j / / i0708/ i0708 ht l
Prof. Paulo Jorge Oliveira pjcro @ isr.ist.utl.pt Tel: 21 8418053 or 2053 (internal)
API P. Oliveira Page 1
IST / DEEC / ACSDC
MEEC 2007-2008
Syllabus:
Chap. 4 - GRAFCET (Sequential Function Chart) [1 weeks] ... Chap. 5 CAD/CAM and CNC [1 semana] Methodology CAD/CAM. Types of CNC machines. Interpolation for trajectory generation. Integration in Flexible Fabrication Cells. Chap. 6 Discrete Event Systems [2 semanas]
API P. Oliveira Page 2
IST / DEEC / ACSDC
Chap. 5 CAD/CAM and CNC
Some pointers to CAD/CAM and CNC
History: Tutorial: http://users.bergen.org/~jdefalco/CNC/history.html http://users.bergen.org/~jdefalco/CNC/index.html http://www-me.mit.edu/Lectures/MachineTools/outline.html http://www.tarleton.edu/~gmollick/3503/lectures.htm http://www.cncezpro.com/ http://www.cadstd.com/ http://www.turbocad.com http://www.deskam.com/ http://www.cadopia.com/ * Computer Control of Manufacturing Systems, Yoram Koren, McGraw Hill, 1986. * The CNC Workbook : An Introduction to Computer Numerical Control by Frank Nanfarra, et al.
Editors (CAD):
Bibliography:
API
P. Oliveira
Page 3
IST / DEEC / ACSDC
Chap. 5 CAD/CAM and CNC
CAD/CAM and CNC Concept Tool / Methodology
Prototype
API
P. Oliveira
Page 4
IST / DEEC / ACSDC
Chap. 5 CAD/CAM and CNC
Brief relevant history NC
1947 US Air Force needs lead John Parsons to develop a machine able to Produce parts describes in 3D. 1949 Contract with Parsons Corporation to implement to proposed method. 1952 Demonstration at MIT of a working machine tool(NC), able to produce parts resorting to simultaneous interpolation on several axes. 1955 First NC machine tools reach the market. market 1957 - NC starts to be accepted as a solution in industrial applications , with first machines starting to produce. 197x Profiting from the microprocessor invention appears the CNC.
API P. Oliveira Page 5
IST / DEEC / ACSDC
Chap. 5 CAD/CAM and CNC
Evolution in brief CAD/CAM and CNC Modification M difi i of f existing i i machine hi tools l with i h motion i sensors
and automatic advance systems. Close-loop control systems for axis control. Incorporation of the computational advances in the CNC machines. Development of high accuraccy interpolation algorithms to trajectory interpolation. Resort to CAD systems to design parts and to manage the use of CNC machines.
API
P. Oliveira
Page 6
IST / DEEC / ACSDC
Chap. 5 CAD/CAM and CNC
CAD/CAM e CNC Objectives:
To augment the accuraccy, reliability, and the ability to introduce changes/new designs. To augment the workload. To reduce prodution costs. To reduce waste due to errors and other human factors factors. To carry out complex tasks (e.g. Simlutaneous 3D interpolation). Augment precision of the produced parts.
API
P. Oliveira
Page 7
IST / DEEC / ACSDC
Chap. 5 CAD/CAM and CNC
CAD/CAM and CNC Advantages: To T reduce d the h production/delivery d i /d li time. i
To reduce costs associated to parts and other auxiliary. To reduce storage space. To reduce time to start production. To reduce machining time. To reduce time to market (on the design/redesign and production).
API
P. Oliveira
Page 8
IST / DEEC / ACSDC
Chap. 5 CAD/CAM and CNC
CAD/CAM and CNC Limitations:
High initial investment (30.000 (30 000 to 1.500.000 1 500 000 euros) ) Specialized maintenance required Does not eliminates the human errors completely. Requires more specialized operators. Not so relevant l the h advantages d on the h production d i of f small ll or very small series.
API
P. Oliveira
Page 9
IST / DEEC / ACSDC
Chap. 5 CAD/CAM and CNC
CAD/CAM e CNC Methodology CAD/CAM
To use technical T h i l data d from f ad database b i in the h d design i and d production stages. Information on parts, materials, tools, and machines are integrated. CAD (Computer Aided Design) Allows the design in a computer environment. CAM (Computer Aided Manufacturing) To manage programs and production stages on a computer.
API
P. Oliveira
Page 10
IST / DEEC / ACSDC
Chap. 5 CAD/CAM and CNC
API
P. Oliveira
Page 11
IST / DEEC / ACSDC
Chap. 5 CAD/CAM and CNC
CAD/CAM and CNC Tools:
API
P. Oliveira
Page 12
IST / DEEC / ACSDC
Chap. 5 CAD/CAM and CNC
CAD/CAM and CNC Tools:
Atention to the constraints on the materials used!...
Speed S d of f advance d Speed of rotation Type of tool
API P. Oliveira Page 13
IST / DEEC / ACSDC
Chap. 5 CAD/CAM and CNC
CAD/CAM and CNC Tools:
Specific tools to perform different operations.
API P. Oliveira Page 14
IST / DEEC / ACSDC
Chap. 5 CAD/CAM and CNC
CAD/CAM and CNC Tools: impact on the quality of finishing (m)
Mtodo
Flame cut Sawing Planeing Drilling Chemical machinning Electrical dischage Milling Augment drilling Electron beam LASER cut Electrochemical cut Lath Electrolitical machining Exctrusion Afiar Polir Quinar 50 25 12 6 3 1.5 .8 .4 .2 .1 .05 .025 .0125
0.5
API
P. Oliveira
Page 15
IST / DEEC / ACSDC
Chap. 5 CAD/CAM and CNC
CAD/CAM and CNC Evolution of tools performance:
API
P. Oliveira
Page 16
IST / DEEC / ACSDC
Chap. 5 CAD/CAM and CNC
CAD/CAM and CNC Industrial areas of application:
Aerospace A Maquinery Electricity (board production) Automobiles Instrumentation Moulds
API
P. Oliveira
Page 17
IST / DEEC / ACSDC
Chap. 5 CAD/CAM and CNC
CAD/CAM and CNC Evolution of Numerical Control
Numerical N i l Control C l (NC)
Data on paper ou received in serial port NC machine unable to perform computations Hardware interpolation
Direct Numerical Control (DNC)
Central computer control a number of machines DNC ou CNC
Computer C t N Numerical i l control t l (CNC)
A computer is on the core of each machine tool Computation and interoplation algorithms run on the machine
Distributive numerical control
scheduling Quality control Remore monitoring
API
P. Oliveira
Page 18
IST / DEEC / ACSDC
Chap. 5 CAD/CAM and CNC
CAD/CAM and CNC Numeric Control
A hi Architecture of f a NC system
Open-loop
gear reference step motor transmission table
Close-loop
gear reference controller DA DC motor transmission table encoder
API
P. Oliveira
Page 19
IST / DEEC / ACSDC
Chap. 5 CAD/CAM and CNC
p
CAD/CAM and CNC Interpolation Motivation: numerical integration
Area of a function
p(t)
p
z (t ) = p ( )d i =1 pi t
t k 0
Introducing zk, as the value of z at t=kt
z k = i =1 pi t + pk t = z k 1 + z k ,
k 1
z k = pk t
Th integrator The i t t works k at t a rythm th of f f=1/ f 1/t and d the th function f ti p is i given i app. by: b
pk = pk 1 pk
To be able to implement the integrator in registers with n bits, p must verify pk<2n .
API P. Oliveira Page 20
10
IST / DEEC / ACSDC
Chap. 5 CAD/CAM and CNC
CAD/CAM and CNC Implementation of a DDA Digital Differential Analyzer
The p register input is +1, 0 ou 1. The q register stores the area integration value
+p p
f q register
adder z p register
qk = qk 1 + pk .
z k = 2 n pk
If th the q register i t value l exceeds d (2n-1), 1) and d overflow fl occurs and d z=1: 1 Defining C=f/2n, and given that f=1/t:
z k = Cpk t
API P. Oliveira Page 21
IST / DEEC / ACSDC
Chap. 5 CAD/CAM and CNC
CAD/CAM and CNC DDA for Linear Interpolation:
Let q=5 and assume 3 bits registers
Passo q z z ------------------------------------------1 5 0 2 2 1 1 3 7 1 4 4 1 2 5 1 1 3 6 6 3 7 3 1 4 8 0 1 5 9 5 5 ...
API
f p t z
where
f0
f 2n
z f 0 = = Cpk , t k
C=
10
12
16
1 P. Oliveira
2 Page 22
11
IST / DEEC / ACSDC
Chap. 5 CAD/CAM and CNC
CAD/CAM and CNC Exponential Deacceleration:
Let
p(t ) = p 0 e t
and
z = Cpk = Cp0 e t . t
Example: p(t)=15e-t
15 pk
The differential of p(t) is appr.
p = pk t
Setting C=,
p = z
10 p(t)
p(t)
f +p p
API
f0
0 0 10 20 30 Time iterations 40 50 60
P. Oliveira
Page 23
IST / DEEC / ACSDC
Chap. 5 CAD/CAM and CNC
CAD/CAM and CNC Circular Interpolation:
+p p Clock +p p
Rsin(t)dt
Let
( X R )2 + Y 2 = R 2 X = R(1 cos(t )) Y = R sin (t )
or
The differential is X
dX = Rsin (t )dt = d( Rcos(t )) dY = Rcos(t )dt = d(Rsin (t ))
0 pk p(t)
Rcos(t)dt
Y
-5 Y -10
Example: Circunference of radius 15, centered at the origin.
API
-15
5 X
10
15
P. Oliveira
Page 24
12
IST / DEEC / ACSDC
Chap. 5 CAD/CAM and CNC
CAD/CAM and CNC Full DDA
circular +p p linear L X C f0 +p p desacceleration L Y C
P. Oliveira Page 25
f +p p
API
IST / DEEC / ACSDC
Chap. 5 CAD/CAM and CNC
CAD/CAM and CNC CNC Axes Control
reference controller ll DA DC motor gear transmission table encoder
Dynamics of a control loop
Ts
k2 k1
fref
1 s
k DA
k1 1 + s
P. Oliveira
kg
API
Page 26
13
IST / DEEC / ACSDC
Chap. 5 CAD/CAM and CNC
CAD/CAM and CNC CNC Programming
Steps to execute a part
A) Read/interpret the technical drawings
API
P. Oliveira
Page 27
IST / DEEC / ACSDC
Chap. 5 CAD/CAM and CNC
CAD/CAM and CNC CNC Programming
B) Choice Ch i of f the h most adequate d machine hi tool lf for the h several l stages of machinning Relevant features:
The workspace of a machine versus the part to be produced The options available on each machine The tools available The mounting and the part handling The operations that each machine can perform
API
P. Oliveira
Page 28
14
IST / DEEC / ACSDC
Chap. 5 CAD/CAM and CNC
CAD/CAM and CNC CNC Programming
C) Ch Choice i of f the h most adequate d tools l
Relevant features: The material to be machinned and its characteristics Standard tools cost less The quality of the mounting part is function of the number od parts to p p produce Use the right tool for the job Verify if there are backup tools and/or stored available Take into account tool aging
API
P. Oliveira
Page 29
IST / DEEC / ACSDC
Chap. 5 CAD/CAM and CNC
CAD/CAM and CNC CNC Programming
API
P. Oliveira
Page 30
15
IST / DEEC / ACSDC
Chap. 5 CAD/CAM and CNC
CAD/CAM and CNC CNC Programming
D) C Cutting i d dataDados D d d de C Corte
Spindle Speed speed of rotation of the cutting tool (rpm) Feedrate linear velocity of advance to machine the part (mm/minute) Depth of Cut deth of machinning in z (mm)
API
P. Oliveira
Page 31
IST / DEEC / ACSDC
Chap. 5 CAD/CAM and CNC
CAD/CAM and CNC CNC Programming
E) Choice Ch i of f the h i interpolation l i plane, l in i 2D machines hi
API
P. Oliveira
Page 32
16
IST / DEEC / ACSDC
Chap. 5 CAD/CAM and CNC
CAD/CAM and CNC CNC Programming
F1) Unit U i system imperial inches (G70) or international milimeters (G71).
F2) Command mode* Absolut relative to world coordinate system (G90) Relative mouvement relative to the actual position (G91)
* There are other command modes, e.g. helicoidal.
API P. Oliveira Page 33
IST / DEEC / ACSDC
Chap. 5 CAD/CAM and CNC
CAD/CAM and CNC CNC Programming
G) MANUAL DATA INPUT
N G X Y Z R A I J K F S T M Sequence Number Preparatory Functions X Axis Command Y Axis Command Z Axis Command Radius from specified center Angle ccw from +X vector X axis arc center offset Y axis arc center offset Z axis arc center offset Feedrate Spindle speed Tool number Miscellaneous function
API
P. Oliveira
Page 34
17
IST / DEEC / ACSDC
Chap. 5 CAD/CAM and CNC
CAD/CAM and CNC Example of a CNC program
N30 G0 T1 M6 N35 S2037 M3 N40 G0 G2 X6.32 Y-0.9267 M8 N45 Z1.1 N50 Z0.12 N55 G1 Z0. F91.7 N60 X-2.82 N65 Y0 Y0.9467 9467 N70 X6.32 N75 Y2.82 N80 X-2.82 N85 G0 Z1.1 ...
API
P. Oliveira
Page 35
IST / DEEC / ACSDC
Chap. 5 CAD/CAM and CNC
CAD/CAM and CNC Preparatory functions (inc.)
G00 GO G01 Linear Li Interpolation I t l ti
G02 Circular Interpolation (CW)
G03 Circular Interpolation (CCW)
API
P. Oliveira
Page 36
18
IST / DEEC / ACSDC
Chap. 5 CAD/CAM and CNC
CAD/CAM and CNC Other preparatory functions
G04 - A temporary dwell, or delay in tool motion. G05 - A permanent hold, or stopping of tool motion. It is canceled by the machine operator. G22 - Activation of the stored axis travel limits, which are used to establish a safety boundary. G23 - Deactivation of the stored axis travel limits. G27 - Return to the machine home position via a programmed intermediate point G34 - Thread cutting with an increasing lead. G35 - Thread cutting with a decreasing lead. G40 - Cancellation of any previously programmed tool radius compensation G42 - Application of cutter radius compensation to the right of the workpiece with respect to the direction of tool travel. G43 - Activation of tool length compensation in the same direction of the offset value G71 - Canned cycle for multiple-pass turning on a lathe (foreign-made)
API P. Oliveira Page 37
IST / DEEC / ACSDC
Chap. 5 CAD/CAM and CNC
CAD/CAM and CNC Miscelaneous functions
M02 - Program end M03 - Start of spindle rotation clockwise M04 - Start of spindle rotation counterclockwise M07 - Start of mist coolant M08 - Start of flood coolant
API
P. Oliveira
Page 38
19
IST / DEEC / ACSDC
Chap. 5 CAD/CAM and CNC
CAD/CAM and CNC Canned Cycles
G81 Drilling cycle with multiple holes
API
P. Oliveira
Page 39
IST / DEEC / ACSDC
Chap. 5 CAD/CAM and CNC
CAD/CAM and CNC Ciclos Especiais or Canned Cycles
G78 Rectangular pocket cycle, used to clean a square shaped area
API
P. Oliveira
Page 40
20
IST / DEEC / ACSDC
Chap. 5 CAD/CAM and CNC
CAD/CAM and CNC Tool change
Note: should be of easy access, when performed manually.
API
P. Oliveira
Page 41
IST / DEEC / ACSDC
Chap. 5 CAD/CAM and CNC
CAD/CAM and CNC Example of CNC programming
Ver: http://www.ezcam.com/web/tour/tour.htm http://www ezcam com/web/tour/tour htm
API
P. Oliveira
Page 42
21
IST / DEEC / ACSDC
Chap. 5 CAD/CAM and CNC
CAD/CAM and CNC Example of CNC programming
API
P. Oliveira
Page 43
IST / DEEC / ACSDC
Chap. 5 CAD/CAM and CNC
CAD/CAM and CNC Advanced CNC programming languages
Automatically A i ll program tool l (APT) Desveloped at MIT in 1954 Derived from APT: ADAPT (IBM) IFAPT (France) MINIAPT (Germany) Compact II Autospot SPLIT
API P. Oliveira Page 44
22
IST / DEEC / ACSDC
Chap. 5 CAD/CAM and CNC
CAD/CAM and CNC Machine operation
R l of Rules f Security S i Security is essential! The eyes must be always protected. The tools and parts must be handled and installed properly. Avoid the use of large cloths Cleand the parts with a brush. Never with the hands. Be careful with you and the others.
API P. Oliveira Page 45
IST / DEEC / ACSDC
Chap. 5 CAD/CAM and CNC
CAD/CAM and CNC Machine operation
V if tolerances Verify l and d tools l offsets ff for f proper operation i
API
P. Oliveira
Page 46
23
IST / DEEC / ACSDC
Chap. 5 CAD/CAM and CNC
CAD/CAM and CNC Machine operation
Load program
Follow up machine operation Verify carefully the produced part.
API
P. Oliveira
Page 47
24