NC-CNC-machines-XYZsystem-programming

Download as pdf or txt
Download as pdf or txt
You are on page 1of 55

CAD/CAM

Numerical Controlled (NC)


machines and
NC programming language

1
Numerical Control (NC)

A method of automatically operating a manufacturing


machine based on a code of letters, numbers and
special characters

Program
A complete set of coded instruction for executing an
operation

2
Numerical Control (NC)

Numerical Control (NC) can be defined as an operation of machine


tools by the means of specifically coded instructions to the machine
control system.

– The instructions are combinations of the letters of alphabet, digits and


selected symbols, for example: a decimal point “.”, the percent sign “%”
or the parenthesis symbols “()”.
– All instructions are written in a logical order and a predetermined form.
– The collection of all instructions necessary to machine a part is called
an NC Program, CNC Program, or a Part Program.
– Such a program can be stored for a future use and used repeatedly to
achieve identical machining results at any time.

3
Numerical Control (NC)
NC and CNC Technology
The difference in the meaning of the NC and CNC.
The NC stands for the older and original Numerical Control
technology, whereby the CNC stands for the newer Computerized
Numerical Control technology.
Both systems perform the same tasks, namely manipulation of data for the purpose
of machining a part.
• In both cases, the internal design of the control system contains the logical
instructions that process the data.
• The NC system uses a fixed logical functions, those that are built-in and
permanently wired within the control unit. These functions cannot be changed by the
programmer or the machine operator.
• The CNC system uses an internal microprocessor that contains a memory by which
a variety of routines that are capable of manipulating logical functions are registered
and stored.

4
Numerical Control (NC)
A Numerical Control machine has two parts: 1. machine control unit and
2. machine tool

5
Computer Numerical Control (CNC)

 A NC machine with the added feature of an onboard computer


is called a computer Numerical Control machine (CNC)

6
CNC control unit

7
CNC Machining Centers and Turning Centers

8
Advantages of CNC over manual machining

• The approach to machine a part is the same for both


methods but CNC machining improves the following:
1. Setup time reduction
2. Lead time reduction
3. Accuracy and repeatability
4. Contouring of complex shapes
5. Simplified tooling and work holding
6. Consistent cutting time
7. General productivity increases

9
CNC Machines
Types of CNC machine tools
– Mills and Machining centers
– Lathes and Turning Centers
– Drilling machines
– Boring mills and Profilers
– EDM machines
– Punch presses and Shears
– Flame cutting machines
– Routers
– Water jet and Laser profilers
– Cylindrical grinders
– Welding machines
– Benders, Winding and Spinning machines
11
12
13
14
Machine axes
• Machine axes Milling machines and machining centers
have at least three axes X, Y and Z as shown in Figure
7.1. The machines become more flexible if they have the
fourth axis, usually an indexing or a rotary axis (the A
axis for vertical models or the B axis for horizontal
models). Even higher level of flexibility can be found on
machines with five or more axes

15
Machine axes

16
Machine axes
A typical 3-axis machine uses three controlled axes of motion. They
are defined as the X axis, the Y axis, and the Z axis as shown in
Figure

– The X axis is parallel to the


longest dimension of the
machine table
– The Y axis is parallel to the
shortest dimension of the table
– The Z axis is the spindle
movement

17
Machine axes
Additional Axes
• A CNC machine of any type can be designed with one or more additional
axes, normally designated as the secondary axes using the U, V and W
letters. These axes are normally parallel to the primary X, Y and Z axes
respectively.
• For a rotary or an indexing applications, the additional axes are defined as
A, B and C axes, as being rotated about the X, Y and Z axes, again in their
respective order. Positive direction of a rotary (or an indexing) axis is the
direction required to advance a right handed screw in the positive X, Y or Z
axis.
• Arc center modifiers (sometimes called the arc center vectors) are not true
axes, yet they are also related to the primary axes XYZ.

18
Machine axes
• A typical CNC lathe is designed with two standard axes one axis is
the X axis, the other axis is the Z axis. Both axes are perpendicular
to each other and represent the typical two-axis lathe motions.

19
20
21
22
23
24
25
26
27
Typical programming procedure

• The following items form a fairly common and logical


sequence of tasks done in CNC programming. The items
are only in a suggested order, offered for further
evaluation. This order may be changed to reflect special
conditions or working habits. Some items may be
missing or redundant:
1. Study of initial information (drawing and methods)
2. Material stock (blank) evaluation
3. Machine tool specifications
4. Control system features
5. Sequence of machining operations

28
Typical programming procedure
Cont..
6. Tooling selection and arrangement of cutting tools
7. Setup of the part
8. Technological data (speeds, feed rates, etc.)
9. Determination of the tool path
10. Working sketches and mathematical calculations
11. Program writing and preparation for transfer to CNC
Program testing and debugging
12. Program documentation

29
Basic programming terms
• Four basic terms used in CNC
programming :

Character word Block Program

30
Character
– Character: smallest unit in CNC programming,
it can be one of the three forms combined to
make a meaningful word. The combination of
characters is called alpha-numerical program
input
• Digit: ten digits, from 0-9 (not location of x,y,z)
• Letter: capital letter (A, B, C, …,Z)
• Symbol: decimal point, minus, and positive signs,
percent sign, parenthesis

31
Word
• A combination of alpha-numerical
characters creating a single instruction to
the control system
• Usually each word starts with a capital
letter followed by a number
• Examples: program number, axis position,
feed rate, speed, miscellaneous functions.

32
Block
• Block is used as a multiple instruction
• Consists of individual lines of instructions
sequenced in a logical order
• Each block is composed of one or several
words and each word is composed of two
or more characters

33
A block programmed in ISO language can consist of:
• Sequence block (N)
• Preparatory (G) functions
• Miscellaneous functions (M)
• Axis coordinates (X...C)
• Spindle speed (S)
• Feed rate (F)
• Tool number (T)
This order should be maintained within each block, although it is not
necessary for every block to contain the information

34
CNC Program

• Begins with a program number


• Followed by blocks of instructions
• Program ends with stop code

The system of programming CNC machines is


called “ word address format” which is based on
a combination of a one letter and one or more
digit

35
CNC Program
• A CNC program usually begins with a program number
or similar identification, followed by the blocks of
instructions in a logical order.

• The program ends with a stop code or a program


termination symbol, such as the percent sign “%”.

• The series of blocks arranged in a logical order that is


required to machine a complete part or a complete
operation is the part program also known as a CNC
program
36
Program words
Program number (O): the machine recognizes programs
according to a numeric code, and most machines can store
several different programs, program numbers range from O
01 to O 09999

Sequence Numbers (N): a sequence of number is an


optional tag that can be coded at the beginning of a block if
need, the computer will execute the program blocks in the
order in which they appear regardless of the sequence
number

The are only used to enable the operator locate the specific
line of a program when entering or revising a program
(checking)
Number range from N 01 to N 9999
37
38
Symbols in programming

• Symbols in programming In addition to the basic


symbols, Fanuc can accept other symbols for different
applications. Table 8.1 describes all symbols available
on the Fanuc controls.

39
40
Preparatory command (G-code)

• The program address G identifies a preparatory


command, often called the G code.
• This address has one and only objective that is to preset
or to prepare the control system to a certain desired
condition, or to a certain mode or a state of operation.
• The term preparatory command indicates its meaning. A
G code will prepare the control to accept the
programming instructions in a specific way.

41
Preparatory command (G-code)

G codes
G00 Rapid traverse G40 Cutter compensation - cancel

G01 Linear interpolation G41 Cutter compensation - left

G02 Circular interpolation, CW G42 Cutter compensation -right

G03 Circular interpolation, CCW G70 Inch format

G04 Dwell G71 Metric format

G08 Acceleration G74 Full circle programming Off

G09 Deceleration G75 Full circle programming On

G17 X-Y Plane G80 Fixed cycle cancel

G18* Z-X Plane G81 -9 Fixed cycles

G19 Y-Z Plane G90 Absolute dimension programming

G91 Incremental deimension programming

42
Preparatory command (G-code)
• Rapid traverse (G00) The movements programmed after G00
are executed at the rapid feedrate indicated in the axis
machine parameter "G00FEED".
Independently of the number of axis which move, the resulting
path is always a straight line between the starting point and the
final point.

43
Preparatory command (G-code)
• Linear interpolation (G01) The movements programmed after
G01 are executed according to a straight line and at the
programmed feedrate "F"

44
Always use only one unit of dimensioning in a part program and
never mix Metric and English units in the same program
45
NC WORDS (continue)
X, Y, Z, A, B, C Codes. coordinate positions of the tool.
The coordinates may be specified in decimal number (Decimal
Programming), or integer number (Basic Length Unit (BLU Programming).

Example:

move from location (2,3,-6) will look like in the word address program like this:
X 2.0 Y 3.0 Z -6.0

46
47
FEED RATE (F CODE)

The feed rate is the rate at which the cutting tool moves along a
programming axis, and is specified by the numerical value following the
address F. In the English system, the feed rate is expressed in inches per
minute, and in the metric system in millimeters per minute.

Feed rate "F" The machining feed rate can be selected from the program.
It remains active until another feed rate is programmed. It is represented
by the letter F and depending on whether it is working in G94 or G95, it is
programmed in mm/minute (inches/minute) or in mm/revolution
(inches/revolution).

The programmed feed rate F is effective working in linear (G01) or circular


(G02, G03) interpolation.
If function F is not programmed, the CNC assumes the feed rate to be
F0.

48
FEED RATE (F CODE)

• When working in rapid travel (G00), the machine will move at the rapid
feed rate indicated by the axis machine parameter "G00FEED", apart
from the F programmed.

• Feed rate in mm/min or inches/min (G94) From the moment the code
G94 is programmed, the control takes that the feed rates programmed
through F5.5 are in mm/min or inches/mm. Feed rate in mm/rev or
inches/rev (G95) From the moment when the code G95 is programmed,
the control assumes that the feed rates programmed through F5.5 are in
mm/rev or inches/mm

49
• SPINDLE SPEED (S CODE)

• The address S controls the speed at which the spindle


rotates in rpm. A numerical value, up to four digits
maximum, is entered following the address S. No
decimal point is allowed with the numerical value.

• The turning speed of the spindle is programmed directly


in rpm via code S5.4 (G97) or in m/min (ft/min when
working in inches) when in constant surface speed mode
(G96).

50
TOOL FUNCTION (T CODE)
• Tool number (T) and tool offset (D)
• Designates the tool number to be used
• With the "T" function, it is possible to select the tool and with
the "D" function it is possible to select the offset associated with
it. When defining both parameters, the programming order is T
D.
• For example: T6 D17

51
Miscellaneous functions
• The address M in a CNC
program identifies a
miscellaneous function,
• Also called machine functions
• Programmers need to activate
certain aspects of the
machine operations or
controlling the program flow
• They are very important for
the program to be effective

52
Sequence of words to make a full block

53
54
BASIC REQUIREMENT OF NC MACHINE CONTROL
1. Preparatory functions: which unit, which interpolator,
absolute or incremental programming, which circular
interpolation plane, cutter compensation, etc.
2. Coordinates: three translational, and three rotational
axes.
3. Machining parameters: feed, and speed.
4. Tool control: tool diameter, next tool number, tool
change.
5. Cycle functions: drill cycle, ream cycle, bore cycle, mill
cycle, clearance plane.
6. Miscellaneous control: spindle on/off, tape rewind,
spindle rotation direction, pallet change, clamps
control, Coolant control, etc.
7. Interpolators: linear, circular interpolation
55

You might also like