Sei sulla pagina 1di 28

Chapter 1 CNC MACHINES

1.1. PROCCESSING EQUIPMENT

Milling Machines
MCU(Microcontroller)

Indexer
Fixtures Vice

Chip Conveyor

Part Feeder
Turning Machine (Lathe)

1.2. COORDINATES SYSTEM

Milling Coordinate System


Flat and prismatic workpiece
a. Cartesian coordinates system (X-Y-Z) right hand rule.
b. Rotational axis (a,b,c), right hand rule.
a. Orient the workpiece to preset different surface for machining
b. Orientation of tool or workhead at some angle relative to the part.
Turning Coordinate System
Rotation workpiece

1.3. MOTION CONTROL SYSTEM


Point to Point
Continuous Path Control

Point to Point
Positioning system, move the worktable to a programmed location without regards for
the path taken to get that location.

Once move has been completed, some processing action is accomplished by the
workhead.

Example: Drilling.

Continuous Path Control


It is a motion system capable of continuous simultaneous control of two or more axis.

In this case the tool perform the process while the worktable is moving.
Example: Milling, Turning.

1.4. INTERPOLATION METHOD


Linear interpolation
Circular interpolation
Helical interpolation
Parabolic and cubic interpolation
Linear interpolation
It is the most basic method.

Circular interpolation
The method permits programming a circular arc by specifying the following parameter:
Coordinate of starting point
Coordinate of end point
Center or radius
Direction of path

Helical interpolation
This method combines circular interpolation scheme for two axis with linear
interpolation of a third axis.

Parabolic and cubic interpolation


This method provides approximation of free form curves using higher order equation.

It is not common method.

1.5. MACHINE CONTROL UNIT

Functions of Computer Numerical Control


1. Storage of more than one part program
2. Various form of program input
3. Program editing at the machine tool
4. Fixed cycles and programming subroutines
5. Interpolation
6. Positioning features to setup
7. Cutter length and size compensation
8. Acceleration and deceleration calculation
9. Communication interface
10. Diagnostics

Machine Control Unit Systems

1.5.1. CENTRAL PROCESSING UNIT


a. Control section
b. Arithmetic logic unit
c. Immediate access memory
1.5.2. MEMORY
a. Main memory
i.ROM: operating system and machine interface program.
ii.RAM: numerical control program.
b. Secondary memory (hard disk)
i.Part programs.
ii.Macros.

1.5.3. I/O INTERFACE


Communication between various components of CNC system.
a. Operator panel
b. Tape reader
c. Display.

1.5.4. CONTROL FOR MACHINE TOOL AXES AND SPINDLE SPEED


a. Position control
b. Spindle speed control

1.5.5. SEQUENCE CONTROL


For others machine tool function.
a. Coolant
b. Fixtures clamping
c. Tool charger (ATC)
Chapter 2 CNC PROGRAMMING

2.1. PROGRAMMING METHOD


Manual part programming.
Computer assisted part programming.
Part programming using CAD-CAM software.
Manual data input (MDI).

Manual part programming


The programmer prepares the NC code using a low level machine language, such as:
APT
G code

Computer Assisted Part Programming


The programmer writes the instructions.

The computer translates the instructions, perform arithmetical tasks and post process
the program.

Part programming using CAD-CAM software


The program can be simulated offline.
Time and cost of machining can be determined.
The most appropriate tooling can be automatically selected.
System can automatically insert the optimum values of process parameters.

Manual data input (MDI)


The operator manually enters the part geometry data and motion command directly
into MCU prior to running the job.

2.2. MACHINE SETUP


Machine Control Unit
Reference points
Workpiece zero (G54)
Working area
Tool Setting
2.2.1. MACHINE CONTROL UNIT

Control Keys
2.2.2. REFERENCE POINTS OF THE MACHINE

a. Machine zero point M


The machine zero point M lies on the surface of the milling table on the left front edge.

The machine zero point M is the origin of the coordinate system.

b. Reference point R
The reference point is a fixed point on the machine. It serves for the calibration of the
measuring system.

The reference point must be approached after each switch-on of the machine to
communicate the exact distance between the points M and N (T) to the control.

c. Tool-holding fixture reference point N (T)


The tool-holding fixture reference point N (T) lies exactly in the rotary axis at the front
of milling spindle nose.
The tool lengths are described from this point.

Workpiece zero point W

The workpiece zero point W can be freely programmed by the user.

By programming a workpiece zero point the origin of the coordinate system is


displaced from the machine zero point M into the workpiece zero point W.

2.2.3. WORKING AREA

2.2.4. TOOL SETTING

Code: D10-30-2-R1
Tool Compensation

2.3. PROGRAMMING PROCEDURE

Flow Process
1. Geometry
Part geometry
Workpiece
2. Operations
Define operations
Select tool
Define tool path: Coordinates table
Cutting parameters
3. Write the program
Header
Reference point
Operations
4. Simulation
Dry Run
5. Run
Cycle start

Geometry
a. Part Geometry
Part drawing
Intersection points

b. Workpiece
Stock
blank
Operations and Sequence

Operation
Tool Path Strategies
Cutting parameters

2.3.1. OPERATIONS
Process

Face Milling Profile

Pocket

Rough-finish

rough finish
sandvick

2.3.2. TOOL PATH STRATEGIES


Zig
Zig-zag
Profile
Spiral
Helical
Radial
2.3.3. CUTTING PARAMETERS

Example
Face milling zig-zag
= 100 /
= 0.1 /
= 40
=4
1000
=

100 1000
=
40
= 795.77
Programming
a. Block
Number
Sequential number
One function
One movement

b. Program Structure
1. Name
00001;
2. Header
Basic instructions
Coordinates system
Units system
Cancel compensation
Cancel cycles
Reference
3. Operations
a. Operation 1
Reference point
Select tool
Cutting parameters
Tool path
b. Operation 2
Reference point
Select tool
Cutting parameters
Tool path
c. Operation n
Reference point
Select tool
Cutting parameters
Tool path

Simulation
Dry Run

Run
Cycle start

2.4. EXERCISES
1) The two axes of an x-y positioning table are each driven by a stepping motor
connected to a leadscrew with a 4:1 gear reduction. The number of step angles on each
stepping motor is 200. Each leadscrew has a pitch = 5.0 mm and provides an axis range
= 400.0 mm. There are 16 bits in each binary register used by the controller to store
position data for the two axes. (a) What is the control resolution of each axis? (b) What
are the required the rotational speeds and corresponding pulse train frequencies of each
stepping motor in order to drive the table at 600 mm/min in a straight line from point
(25,25) to point (300,150)? Ignore acceleration.

Solution:
a) 1 = / = 5.0/(4200) = 0.00625
2 = /(2 1) = 400/(216 1) = 400/65,535 = 0.00610
= {0.00625,0.00610} = .
b) = 600 / (25, 25) (300, 150)
= 300 25 = 275 , = 150 25 = 125
= 1(125/275) = 24.44
= 600 24.44 = 546.22 /
= / = 4(546.22)/5.0 = . /
= /60 = 436.98(200)/60 = . .
= 600 24.44 = 248.28 /
= / = 4(248.28)/5.0 = . /
= /60 = 198.63(200)/60 = .

2) A NC machine tool table is powered by a servomotor, lead screw, and optical


encoder. The lead screw has a pitch = 5.0 mm and is connected to the motor shaft with
a gear ratio of 16:1 (16 turns of the motor for each turn of the lead screw). The optical
encoder is connected directly to the lead screw and generates 200 pulses/rev of the lead
screw. The table must move a distance = 100 mm at a feed rate = 500 mm/min.
Determine (a) the pulse count received by the control system to verify that the table has
moved exactly 100 mm; and (b) the pulse rate and (c) motor speed that correspond to
the feed rate of 500 mm/min.

Solution:
a) = / , = / = 100(200)/5 =
.
b) = /60 = 500(200)/60(5) = .
c) = / = 16 500/5 = /
Chapter 3 G CODES

Preparatory function.
Miscellaneous function.

3.1. PREPARATORY FUNCTION (G FUNCTION)


G codes are divided into the following two types:

Oneshot G code
The G code is effective only in the block in which it is.

Modal G code
The G code is effective until another G code of the same group is specified.

3.2. MISCELLANEOUS FUNCTION

List of function
Group 01 G00 G01 G02 G03 G33
Group 02 G17 G18 G19
Group 03 G90 G91
Group 05 G94 G95
Group 06 G20 G21
Group 07 G40 G41 G42
Group 08 G43 G44 G49
Group 09 G73 G74 G76 G80G89
Group 10 G98 G99
Group 11 G50 G51
Group 12 G65 G66 G67
Group 13 G96 G97
Group 14 G54G59
Group 15 G61G64
Group 16 G68 G69

Positioning (G00)
The G00 command moves a tool to the position in the workpiece system specified with
an absolute or an incremental command at a rapid traverse rate.
FORMAT: G00 Xe Ye Ze;

Linear Interpolation (G01)


A tools move along a line to the specified position at the feed rate specified in F.
FORMAT: G01 Xe Ye Ze F;

Circular Interpolation (G02, G03)


The command will move a tool along a circular arc.
G02 for Clockwise
G03 for counter clockwise

02
FORMAT: Arc in the XpYp plane 17
03
02
Arc in the ZpXp plane 18
03
03
Arc in the YpZp plane 19
04

The numerical value following I, J, or K, is a vector component in which the arc center is
seen from the start point.

EXAMPLES:
Direction of the Circular Interpolation (G17, G18, G19)
Inch/Metric Conversion (G20, G21)
G20; Inch input
G2 ; mm input

Reference Position Return (G28)


Positioning to the intermediate or reference positions are performed at the rapid
traverse rate of each axis.

EXAMPLE: G28 G91 X0 Y0 Z0; Return to the reference position return

Cutter Compensation (G40, G41, G42)


G41 offsets the tool towards the left of the workpiece as you see when you face in the
same direction as the movement of the cutting tool.

Tool Length Offset (G43, G44, G49)


This function can be used by setting the difference between the tool length assumed
during programming and the actual tool length of the tool used into the offset memory.
It is possible to compensate the difference without changing the program.

Specify the direction of offset with G43 or G44.


G43; Positive offset
G44; Negative offset
G49; Tool length offset cancel

Examples: G43 H01; Compensation with length value from tool 01

Constant Surface Speed Control (G96, G97)


Specify the surface speed (relative speed between the tool and workpiece) following S.
The spindle is rotated so that the surface speed is constant regardless of the position of
the tool.

G96 S_; Surface speed (m/min or feet/min)


G97 S_; Spindle speed (min-1)
Subprogram (M98, M99)
If a program contains a fixed sequence or frequently repeated pattern, such a sequence
or pattern can be stored as a subprogram in memory to simplify the program.

A subprogram can be called from the main program.

A called subprogram can also call another subprogram.

M98 P 111 OOOO;

111: Number of times the subprogram is called repeatedly


OOOO: Subprogram number

When no repetition data is specified, the subprogram is called just once.

Drilling Cycle, Spot Drilling G81


This cycle is used for normal drilling. Cutting feed is performed to the bottom of the
hole. The tool is then retracted from the bottom of the hole in rapid traverse.
G81 X_ Y_ Z_ R_ F_ K_;
X_ Y_: Hole position data
Z_: The distance from point R to the bottom of the hole
R_: The distance from the initial level to point R level
F_: Cutting feedrate
K_: Number of repeats (if required)
Examples:
Drill 6 holes in a rectangular pattern

M3 S2000; Cause the spindle to start rotating


G90 G99 G81 X30 Y25 Z50 R10 Position, drill hole 1, then return to
F120; point R
Position, drill hole 2, then return to
Y55;
point R
Position, drill hole 3, then return to
Y85;
point R
Position, drill hole 4, then return to
X100;
point R
Position, drill hole 5, then return to
Y55;
point R
Position, drill hole 6, then return to
G98 Y85;
the initial level
Return to the reference position
G80 G28 G91 X0 Y0 Z0;
return
M5; Cause the spindle to stop rotating

Drilling Cycle Counter Boring Cycle (G82)

G82 X_ Y_ Z_ R_ P_ F_ K_;
X_ Y_: Hole position data
Z_: The distance from point R to the bottom of the hole
R_: The distance from the initial level to point R level
P_: Dwell time at the bottom of a hole
F_: Cutting feed rate
K_: Number of repeats (if required)

Peck Drilling Cycle (G83)


This cycle performs peck drilling.
It performs intermittent cutting feed to the bottom of a hole while removing shavings
from the hole.
G83 X_ Y_ Z_ R_ Q_ F_ K_;
X_ Y_: Hole position data
Z_: The distance from point R to the bottom of the hole
R_: The distance from the initial level to point R level
Q_: Depth of cut for each cutting feed
F_: Cutting feed rate
K_: Number of repeats (if required)

Tapping Cycle (G84)


This cycle performs tapping.

In this tapping cycle, when the bottom of the hole has been reached, the spindle is
rotated in the reverse direction.
3.3. CANNED CYCLES

TO DEVELOP

3.4. EXERCISES
1) Write 2 programs in which the milling tool follow the path shown in Figure 1.
The first program must be done in relative coordinates and the second program in
absolute coordinates.

Figure 1: Milling path.

First Program:
N10 G21 G17 G54 G40 G49
N20 G70 G80 G90
N30 G91 G28 Z0
N40 M06 T01
N50 G43 H01

N60 G00 X0 Y0 Z5
N70 M03 S1500;
N80 G00 X25 Y25 F500;
N90 G01 Z-5
N100 G01 X0 Y75
N110 G01 X75 Y0
N120 G01 X0 Y-75
N130 G01 X-75 Y0
N140 G01 Z5

Second Program:
N10 G21 G17 G54 G40 G49
N20 G70 G80 G90
N30 G91 G28 Z0
N40 G90
N50 M06 T01
N60 G43 H01

N60 G00 X0 Y0 Z5
N70 M03 S1500;
N80 G00 X25 Y25 F500;
N90 G01 Z-5
N100 G01 X25 Y100
N110 G01 X100 Y100
N120 G01 X100 Y25
N130 G01 X25 Y100
N140 G01 Z5

Potrebbero piacerti anche