Scilab Manual
Scilab Manual
TOOLS
Structure
1.1 Introduction
Objectives
1.2 NC Machines
1.2.1 Types of NC Machine
1.2.2 Controlled Axes
1.2.3 Basic Components of NC Machines
1.2.4 Problems with Conventional NC
1.1 INTRODUCTION
NC machines, advantages of NC machines, Types of NC systems, Controlled axes, Basic
Components of NC Machines, Problems with Conventional NC and Principles of NC
Machines are described in this Unit.
Objectives
After studying this unit, you should be able to understand
,
,
, and
.
1.2 NC MACHINES
Controlling a machine tool by means of prepared program, which consists of blocks, or
series of numbers, is know as numerical control (NC). In manufacturing of more
complicated parts, the system has to calculate automatically additional data points,
which is done by means of an interpolator. Numerical Control (NC) refers to the method
of controlling the manufacturing operation by means of directly inserted coded
numerical instructions into the machine tool. It is important to realize that NC is not a
machining method; rather, it is a concept of machine control. Although the most popular
applications of NC are in machining, NC can be applied to many other operations,
including welding, sheet metalworking, riveting, etc.
NC machines are method of automation, where automation of medium and small volume
production is done by some controls under the instructions of a program. Various
definitions of NC are :
A system in which actions are controlled by direct insertion of Numerical Data at some
point. The system must automatically interpret at least some portion of this data by
Electronic Industries Association (EIA).
Numerical Control is defined as a form of software controlled automation, in which the
process is controlled by alphanumeric characters or symbols.
5
CNC Machines According to these definitions, a programme is prepared which consists of blocks, blocks
consisting of combination of characters and numbers in sequence describing the position
of the tool and job, the cutting speed and feed. The data converted into coded
instructions which are called a Part Programme. As the job changes, the instructions of
part program are also changed. The other instructions which can be included may be for
tool changing or coolant on and off. It is easy to encode a new programme than to
change the machinery for flexibility, thus arising the need of an NC machine tool.
Advantages of NC
The major advantages of NC over conventional methods of machine control are as
follows :
Higher Precision
NC machine tools are capable of machining at very close tolerances, in
some operations as small as 0.005 mm.
Better Quality
NC systems are capable of maintaining constant working conditions for all
parts in a batch thus ensuring less spread of quality characteristics.
Higher Productivity
NC machine tools reduce drastically the non machining time. Adjusting the
machine tool for a different product is as easy as changing the computer
program and tool turret with the new set of cutting tools required for the
particular part.
Multi-operational Machining
Some NC machine tools, for example machine centers, are capable of
accomplishing a very high number of machining operations thus reducing
significantly the number of machine tools in the workshops.
Low Operator Qualification
The role of the operation of a NC machine is simply to upload the work
piece and to download the finished part. In some cases, industrial robots are
employed for material handling, thus eliminating the human operator.
Less Time
An easy adjustment of the machine, adjustment requires less time.
6
1.2.1 Types of NC System Introduction to
NC Machine Tools
Machine controls are divided into three groups:
(a) Traditional numerical control (NC);
(b) Computer numerical control (CNC);
(c) Distributed numerical control (DNC).
The original numerical control machines were referred to as NC machine tool. They
have “hardwired” control, whereby control is accomplished through the use of punched
paper (or plastic) tapes or cards. Tapes tend to wear, and become dirty, thus causing
misreading. Many other problems arise from the use of NC tapes, for example the need
to manual reload the NC tapes for each new part and the lack of program editing
abilities, which increases the lead time. The end of NC tapes was the result of two
competing developments, CNC and DNC.
CNC refers to a system that has a local computer to store all required numerical data.
While CNC was used to enhance tapes for a while, they eventually allowed the use of
other storage media, magnetic tapes and hard disks. The advantages of CNC systems
include but are not limited to the possibility to store and execute a number of large
programs (especially if a three or more dimensional machining of complex shapes is
considered), to allow editing of programs, to execute cycles of machining commands,
etc.
The development of CNC over many years, along with the development of local area
networking, has evolved in the modern concept of DNC. Distributed numerical control is
similar to CNC, except a remote computer is used to control a number of machines. An
off-site mainframe host computer holds programs for all parts to be produced in the DNC
facility. Programs are downloaded from the mainframe computer, and then the local
controller feeds instructions to the hardwired NC machine. The recent developments use
a central computer which communicates with local CNC computers (also called Direct
Numerical Control).
1.2.2 Controlled Axes
NC system can be classified on the number of directions of motion they are capable to
control simultaneously on a machine tool. Each free body has six degree of freedom,
three positive or negative translations along x, y, and z-axis, and three rotations
clockwise or counter clockwise about these axes.
Commercial NC system is capable of controlling simultaneously two, two and half,
three, four and five degrees of freedom, or axes. The NC systems which control three
linear translations (3-axis systems), or three linear translations and one rotation of the
worktable (4-axis systems) are the most common.
Controller
The hard-wired controller cannot be easily altered to incorporate improvements
into the unit.
Management Information
The machine tool manufacturers have been continually improving NC technology
by redesigning the systems to provide timely information such as piece counts,
machine tool change, etc. to the management.
Part Programming Mistakes
When preparing the punched tape, part programming mistakes are common and to
achieve the best sequence of processing steps.
Non-optimal Speed and Feed
The control system does not provide the provision to change the speed and feed
during the cutting operation.
1.4 SUMMARY
11
Classification of
UNIT 2 CLASSIFICATION OF NC SYSTEMS NC Systems
Structure
2.1 Introduction
Objectives
2.1 INTRODUCTION
Classification based on feedback controlling and Classification based on control system
features are described in this Unit.
Objectives
After studying this unit, you should be able to understand
,
,
, and
.
INPUT OUTPUT
SYSTEM
Feed back
AC Servo Motors
These are basically the AC synchronous motors with built-in brush less tacho and
position encoders. The main advantage of this machine is the low rotor inertia and
high power and low weight. This makes them very attractive since they are small
in size compared to the equivalent DC servo motor.
In an AC servomotor, the rotor is a permanent magnet while the stator is equipped
with 3-phase windings. The speed of the rotor is equal to the rotational frequency
of the magnetic field of the stator, which is regulated by the frequency converter.
Stepper Motors
A stepper motor is a device that converts the electrical pulses into discrete
mechanical rotational motions of the motor shaft. A stepper motor rotates (steps)
in fixed angular increments. Step size, or step angle, is determined by the
construction of the motor and the type of drive scheme used to control it. Typical
step resolution is 1.8 degrees. However, micro-step motors are capable of
0.0144 degree steps. Micro-step motors are hybrid 200 steps per revolution motors
that are electrically controlled to produce 25000 steps per revolution.
Stepper motors are usually used in open loop control systems, though an encoder
may be used to confirm positional accuracy. There are many types of step-motor 15
CNC Machines construction. However, permanent magnet (PM) and variable reluctance (VR) are
the most common types.
PM Step Motors
The permanent magnet step motor moves in steps when its windings are
sequentially energized. A permanent magnet rotor surrounded by a two-phase
stator. Two rotor sections (N and S) are offset by one half-tooth pitch to each
other. As energy is switched from Phase 2 to Phase 1, a set of rotor magnets will
align with phase 1, and the rotor will turn one step. If both phases are energized
simultaneously, the rotor will establish its equilibrium midway between steps.
Thus, the motor is said to be half-stepping. Stepper motors have a number of
benefits, Low cost, Ruggedness, Simplicity in construction, high reliability, No
maintenance.
There is virtually no conceivable failure within the stepper drive module that
could cause the motor to run away. Stepper motors are simple to drive and control
in an open-loop configuration. They only require four leads. They provide
excellent torque at low speeds, up to 5 times the continuous torque of a brush
motor of the same frame size or double the torque of the equivalent brush less
motor. This often eliminates the need for a gearbox. A stepper-driven system is
inherently stiff, with known limits to the dynamic position error.
In the machine tool, the rotary motion from the drive motor needs to be converted
to the linear motion. For this purpose a lead screw and nut arrangement is
normally used. The Acme thread used in conventional machine tools has more
friction and consequently the maximum feed rates are limited. In order to increase
the feed rates to higher values, it is necessary to reduce the friction between the
nut and the lead screw. Another problem with the Acme thread is the clearance
between the nut and the screw, which causes a considerable backlash. The
backlash will reduce the accuracy of the dimensions produced. Hence most of the
NC machine tools use a lead screw with a recalculating ball nut.
Figure 2.6 : Rotary Encoder for Angle-measuring Devices Marked in 3-bit Binary
The rotary encoder is normally mounted on the servo motor shaft or at the end of the
lead screw as shown. This allows the control to calculate the actual distance moved from
the rotary motion by using the lead of the lead screw. If the lead screw has any backlash
then that will be reflected in the position indicated by the encoder. It therefore becomes
mandatory to eliminate the backlash in the lead screw to accurately get the position of
the axis. Also this requires that the pitch of the lead screw be more accurate over its
entire length for accurate sensing of the position.
To obviate such a predicament, it will be better if the exact position reached by the slide
can be measured by means of a transducer rather than the indirect way with the encoder.
This can be done with the help of a linear scale attached directly to the slide. In this case
the positional measurement will be direct and hence any of the inaccuracies present will
not be affecting the measurement. The linear scale consists of a finely graduated grating
made of either glass or stainless steel, which is the measuring surface attached to one
part of the slide. A scanning unit is fixed to the other part. The scanning unit consists of
a light source, a glass grid with graduated windows and some photo diodes as receptors.
17
CNC Machines The basic principle employed in such measurements is that when two gratings overlap
each other, a fringe pattern is formed corresponding to the displacement. The actual
distance moved can be calculated by measuring the shift in the fringe pattern.
2.9 SUMMARY
21
CNC Machines
22
CNC Machine Tools
UNIT 3 CNC MACHINE TOOLS
Structure
3.1 Introduction
Objectives
3.1 INTRODUCTION
CNC machines, DNC machines, Advantages and disadvantages of CNC machines, Parts
suitable for CNC machines and Environmental control for CNC machines are described
in this Unit.
Objectives
After studying this unit, you should be able to understand
,
,
, and
.
Programme
CNC Controller Actuating Devices Machine Tool
Feedback Transducer
(a) The computer can be remotely located, even a thousand miles away.
(b) The computer can program simultaneously many NC machines.
3.8 SUMMARY
28
CNC Machine Tools
3.9 ANSWERS TO SAQs
Refer the preceding text for all the Answers to SAQs.
29
Fundamentals of
UNIT 4 FUNDAMENTALS OF PART Part Programming
PROGRAMMING
Structure
4.1 Introduction
Objectives
4.1 INTRODUCTION
Types of part programming, Computer aided part programming, Part programming
manual, Part programme using sub routines, do loops and fixed cycles are described in
this Unit.
Objectives
After studying this unit, you should be able to understand
,
,
, and
. 31
CNC Machines
4.2 TYPES OF PART PROGRAMMING
The part program is a sequence of instructions, which describe the work, which has to be
done on a part, in the form required by a computer under the control of a numerical
control computer program. It is the task of preparing a program sheet from a drawing
sheet. All data is fed into the numerical control system using a standardized format.
Programming is where all the machining data are compiled and where the data are
translated into a language which can be understood by the control system of the machine
tool. The machining data is as follows :
(a) Machining sequence classification of process, tool start up point, cutting
depth, tool path, etc.
(b) Cutting conditions, spindle speed, feed rate, coolant, etc.
(c) Selection of cutting tools.
While preparing a part program, need to perform the following steps :
(a) Determine the startup procedure, which includes the extraction of
dimensional data from part drawings and data regarding surface quality
requirements on the machined component.
(b) Select the tool and determine the tool offset.
(c) Set up the zero position for the workpiece.
(d) Select the speed and rotation of the spindle.
(e) Set up the tool motions according to the profile required.
(f) Return the cutting tool to the reference point after completion of work.
(g) End the program by stopping the spindle and coolant.
The part programming contains the list of coordinate values along the X, Y and Z
directions of the entire tool path to finish the component. The program should also
contain information, such as feed and speed. Each of the necessary instructions for a
particular operation given in the part program is known as an NC word. A group of such
NC words constitutes a complete NC instruction, known as block. The commonly used
words are N, G, F, S, T, and M. The same is explained later on through examples.
Hence the methods of part programming can be of two types depending upon the two
techniques as below :
(a) Manual part programming, and
(b) Computer aided part programming.
4.2.1 Manual Part Programming
The programmer first prepares the program manuscript in a standard format.
Manuscripts are typed with a device known as flexo writer, which is also used to type
the program instructions. After the program is typed, the punched tape is prepared on the
flexo writer. Complex shaped components require tedious calculations. This type of
programming is carried out for simple machining parts produced on point-to-point
machine tool.
To be able to create a part program manually, need the following information :
(a) Knowledge about various manufacturing processes and machines.
(b) Sequence of operations to be performed for a given component.
(c) Knowledge of the selection of cutting parameters.
(d) Editing the part program according to the design changes.
32 (e) Knowledge about the codes and functions used in part programs.
4.2.2 Computer Aided Part Programming Fundamentals of
Part Programming
If the complex-shaped component requires calculations to produce the component are
done by the programming software contained in the computer. The programmer
communicates with this system through the system language, which is based on words.
There are various programming languages developed in the recent past, such as APT
(Automatically Programmed Tools), ADAPT, AUTOSPOT, COMPAT-II, 2CL,
ROMANCE, SPLIT is used for writing a computer programme, which has English like
statements. A translator known as compiler program is used to translate it in a form
acceptable to MCU.
The programmer has to do only following things :
(a) Define the work part geometry.
(b) Defining the repetition work.
(c) Specifying the operation sequence.
Over the past years, lot of effort is devoted to automate the part programme generation.
With the development of the CAD (Computer Aided Design)/CAM (Computer Aided
Manufacturing) system, interactive graphic system is integrated with the NC part
programming. Graphic based software using menu driven technique improves the user
friendliness. The part programmer can create the geometrical model in the CAM package
or directly extract the geometrical model from the CAD/CAM database. Built in tool
motion commands can assist the part programmer to calculate the tool paths
automatically. The programmer can verify the tool paths through the graphic display
using the animation function of the CAM system. It greatly enhances the speed and
accuracy in tool path generation.
4.3.3 NC Words
The NC word is a unit of information, such as a dimension or feed rate and so on. A
block is a collection of complete group of NC words representing a single NC
instruction. An end of block symbol is used to separate the blocks. NC word is where all
the machining data are compiled and where the data are translated in to a language,
which can be understood, by the control system of the machine tool.
Block of Information
NC information is generally programmed in blocks of words. Each word conforms
to the EIA standards and they are written on a horizontal line. If five complete
words are not included in each block, the machine control unit (MCU) will not
recognize the information; therefore the control unit will not be activated. It
consists of a character N followed by a three digit number raising from 0 to 999.
Using the example shown in Figure 4.2. The words are as follows :
N001 – represents the sequence number of the operation.
G01 – represents linear interpolation.
X12345 – will move the table in a positive direction along the X-axis.
Y06789 – will move the table along the Y-axis.
M03 – Spindle on CW and
; – End of block.
Ø 35 Ø 25
Ø 16 (0, 0)
100
60
Figure 4.11 : Turning Operation
% 1000; (Main programme)
N01 G54 G90 G71 G94 M03 S800; (Parameters Setting)
N05 G01 X-12.5 Z0 F2; (Facing the job)
N10 G00 Z1; (Retrieval of tool)
N15 G00 X00; (Tool clearance)
N20 G01 Z-100; (Starting cut)
N25 G00 X1 Z1; (Clearance position)
N30 G00 X-2; (Position of cut)
N35 G01 Z-60; (Cutting length)
N40 G00 X-1 Z1; (Retrieval of tool)
N45 G00 X-3; (Position of cut)
N50 G01 Z-60; (Cutting length)
N55 G00 X-2 Z1; (Retrieval of tool)
N60 G00 X-4; (Position of cut)
N65 G01 Z-60; (Cutting length) 41
CNC Machines N70 G00 X-3 Z1; (Retrieval of tool)
N75 G00 X-4.5; (Position of cut)
N80 G01 Z-60; (Cutting length)
N85 G00 X5 Z5; (Final position of tool)
N90 M02; (End of programme)
Example
02 (All dimensions are in mm).
Ø 30 Ø 20
30 30 35
Ø 10
50
1.5
R5
10
25
10 30
15
50 SQ
10
R40
R20
50
20 20
27
4 3
Ø 8 Drill
70
1 2
27
27 70 27
Ø 8 Drill 60 Deep
65 Thick
62
62
24 Thick
27
4 N os.
70 M10 Tap
27
27 70 27
Ø 19 Bore
24 Thick
62
62
4.8 DO-LOOPS
In a few jobs some portion of the programme needs to be repeated, which do not fit into
standardized category. Some of the non-standardized cycles are Do-loops and
Subroutines. Do-loop is a number of operations repeated over a number of equal steps
for a previously fixed number of times.
Do-loops always are implemented on incremental mode because each previous position
becomes reference for next iteration. Do-loop is actually jumping back to an already
written initial portion of the program for the number of times a loop count.
Example
01 (Do-loop) (All dimensions are in mm).
Ø 6 drill, 5 nos.
i iii v
10
5 10 10 10 10
Figure 4.20 : Do-loop
48
% 500; Fundamentals of
Part Programming
N2 G71 G90 G94;
N4 G92 X0 Y0 Z0 ;
N6 T1 M06;
N8 G81 G99 X5 Y10 Z-8 R.2 F100 S500 M03 M08; (Canned Drill cycle)
N10 G51 P4; (Start loop 4 times)
N12 G91 X 10 ;
N14 G50 ;
N16 G80 G90 M09; (Cancel cycle)
N18 T2 M06 ;
N20 G81 G99 X5 Y10 Z-8 R.2 F100 S500 M03 M08; (Canned Drill cycle)
N22 G51 P4 ; (Start loop 4 times)
N24 G91 X 10 ;
N26 G50;
N28 G80 G90 M09; (Cancel cycle)
N30 M30;
4.9 SUBROUTINE
A subroutine is a portion of a programme, complete in itself, which is stored in computer
after programming once. It is called with required data when required again in a
programme.
Example
01 (Subroutine) (All dimensions are in mm).
30
15 SQ 15 SQ
50 SQ
30
Each
1.5 Depth
30 15 Thick
Figure 4.21 : Subroutine
49
CNC Machines %1001;
N2 G17 G71 G94 G90 G54;
N4 T1 L90;
N6 G00 D5 Z5 M3 S500 X9 Y16;
N8 G01 Z0 F500;
N10 L100 P1; (Call the subroutine)
N12 G00 X34 Y16;
N14 G01 Z0 F500;
N16 L100 P1; (Call the subroutine)
N18 G00 X9 Y41;
N20 G01 Z0 F500;
N22 L100 P1; (Call the subroutine)
N24 G00 X34 Y41;
N26 G01 Z0 F500;
N28 L100 P1; (Call the subroutine)
N30 G00 Z100;
N32 M02;
Subroutine Programme is below :
L100;
N2 G01 G91 Z-1.5 F100 M7;
N4 X7;
N6 Y-7;
N8 X-7;
N10 Y7;
N12 G00 G90 Z5 M9;
N14 M17;
This has been called as a subroutine in the main programme as above.
4.10 SUMMARY