1. CAD/CAM Module 2 AM/JA 1 Dept. of Mechanical Engg, AJCE
MODULE II Syllabus Numerical control: Need advantages and
disadvantages classifications point to point,straight cut and
contouring positioning incremental and absolute systems open loop
andclosed loop systems DDA integrator and interpolars resolution
CNC and DNC.Programmable logic controllers (PLC): need relays logic
ladder program timers Simple exercises only. Devices in N. C.
Systems: Driving devices feed back devices:encoders, moire fringes,
digitizer, resolver, inductosyn, tachometer. DISCLAIMER These notes
are not the ultimate look-up for Model and University exams.
Students are advised to read the references mentioned at the end
thoroughly for the exams Numerical Control Introduction The word NC
which stands for numerical control refer to control of a machine or
a process using symbolic codes consisting of characters and
numerals. 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. The word CNC came into existence in seventies when
microprocessors and microcomputers replaced integrated circuit IC
based controls used for NC machines. A CNC machine is an numerical
control machine with the added feature of an on board computer. The
computer is referred to as the machine control unit (MCU). Computer
numerical control (CNC) is the numerical control system in which a
dedicated computer is built into the control to perform basic and
advanced NC functions. CNC controls are also referred to as
soft-wired NC systems because most of their control functions are
implemented by the control software programs. CNC is a computer
assisted process to control general purpose machines from
instructions generated by a processor and stored in a memory
system. It is a specific form of control system where position is
the principal controlled variable. All numerical control machines
manufactured since the seventies are of CNC type. The computer
allows for the following: storage of additional programs, program
editing, running of program from memory, machine and control
diagnostics, special routines, inch/metric, incremental/absolute
switchability. CNC machines can be used as standalone units or in a
network of machines such as flexible machine centers. The
controller uses a permanent resident program called an
executive
2. CAD/CAM Module 2 AM/JA 2 Dept. of Mechanical Engg, AJCE
program to process the codes into the electrical pulses that
control the machine. In any CNC machine, executive program resides
in ROM and all the NC codes in RAM. The information in ROM is
written into the electronic chips and cannot be erased and they
become active whenever the machine is on. The contents in RAM are
lost when the controller is turned off. Some use special type of
RAM called CMOS memory, which retains its contents even when the
power is turned off. History The development of numerical control
owes much to the United States air force. The concept of NC was
proposed in the late 1940s by John Parsons who recommended a method
of automatic machine control that would guide a milling cutter to
produce a curvilinear motion in order to generate smooth profiles
on the work-pieces. In 1949, the U.S Air Force awarded Parsons a
contract to develop new type of machine tool that would be able to
speed up production methods. Parsons sub-contracted the
Massachusetts Institute of Technology (MIT) to develop a practical
implementation of his concept. Scientists and engineers at M.I.T
built a control system for a two axis milling machine that used a
perforated paper tape as the input media. This prototype was
produced by retrofitting a conventional tracer mill with numerical
control servomechanisms for the three axes of the machine. By 1955,
these machines were available to industries with some small
modifications. The machine tool builders gradually began developing
their own projects to introduce commercial NC units. Also, certain
industry users, especially airframe builders, worked to devise
numerical control machines to satisfy their own particular
production needs. The Air force continued its encouragement of NC
development by sponsoring additional research at MIT to design a
part programming language that could be used in controlling N.C.
machines. In a short period of time, all the major machine tool
manufacturers were producing some machines with NC, but it was not
until late 1970s that computer-based NC became widely used. NC
matured as an automation technology when electronics industry
developed new products. At first, miniature electronic tubes were
developed, but the controls were big, bulky, and not very reliable.
Then solid-state circuitry and eventually modular or integrated
circuits were developed. The control unit became smaller, more
reliable, and less expensive. Need of Numerical Controls CNC
machines are widely used in the metal cutting industry and are best
used to produce the following types of product: Parts with
complicated contours Parts requiring close tolerance and/or good
repeatability Parts requiring expensive jigs and fixtures if
produced on conventional machines Parts that may have several
engineering changes, such as during the development stage of a
prototype In cases where human errors could be extremely costly
Parts that are needed in a hurry
3. CAD/CAM Module 2 AM/JA 3 Dept. of Mechanical Engg, AJCE
Small batch lots or short production runs Advantages of Numerical
control Some of the dominant advantages of the CNC machines are:
CNC machines can be used continuously and only need to be switched
off for occasional maintenance. These machines require less skilled
people to operate unlike manual lathes / milling machines etc. CNC
machines can be updated by improving the software used to drive the
machines. Training for the use of CNC machines can be done through
the use of 'virtual software'. The manufacturing process can be
simulated virtually and no need to make a prototype or a model.
This saves time and money. Once programmed, these machines can be
left and do not require any human intervention, except for work
loading and unloading. These machines can manufacture several
components to the required accuracy without any fatigue as in the
case of manually operated machines, so less scrap is produced.
Savings in time that could be achieved with the CNC machines are
quite significant. Time for inspection is reduced as high accuracy
is obtained Non-productive time is reduced More complex geometric
parts are possible Engineering changes can be accommodated more
gracefully Operator skill level requirements are reduced Less floor
space required. Disadvantages of the NC machines CNC machines are
generally more expensive than manually operated machines. The CNC
machine operator only needs basic training and skills, enough to
supervise several machines. Increase in electrical maintenance,
high initial investment and high per hour operating costs than the
traditional systems. Fewer workers are required to operate CNC
machines compared to manually operated machines. Investment in CNC
machines can lead to unemployment. Part programing is reqired.
Classification of NC machines CNC machine tool systems can be
classified in various ways such as : 1. Point-to-point or
contouring : depending on whether the machine cuts metal while the
workpiece moves relative to the tool 2. Incremental or absolute :
depending on the type of coordinate system adopted to parameterise
the motion commands 3. Open-loop or closed-loop : depending on the
control system adopted for axis motion control Relative Tool Motion
type:
4. CAD/CAM Module 2 AM/JA 4 Dept. of Mechanical Engg, AJCE
Point-to-Point Positioning Point-to-point positioning is used when
it is necessary to accurately locate the spindle, or the work piece
mounted on the machine table, at one or more specific Locations to
perform such operations as drilling, reaming, boring, tapping, and
punching (Fig. 9). Point-to-point positioning is the process of
positioning from one coordinate (XY) position or location to
another, performing the machining operation, and continuing this
pattern until all the operations have been completed at all
programmed locations. Some machine tools for example drilling,
boring and tapping machines etc, require the cutter and the work
piece to be placed at a certain fixed relative positions at which
they must remain while the cutter does its work. These machines are
known as point-to-point machines as shown in figure 22.1 (a) and
the control equipment for use with them are known as point-to-point
control equipment. Feed rates need not to be programmed. In theses
machine tools, each axis is driven separately. In a point-to-point
control system, the dimensional information that must be given to
the machine tool will be a series of required position of the two
slides. Servo systems can be used to move the slides and no attempt
is made to move the slide until the cutter has been retracted back.
In Fig. 9 point 1 to point 2 is a straight line, and the machine
moves only along the X axis; but points 2 and 3 require that motion
along both the X and Y axes takes place. As the distance in the X
direction is greater than in the Y direction, Y will reach its
position first, leaving X to travel in a straight line for the
remaining distance. A similar motion takes place between points 3
and 4. Fig. 9 The path followed by point-to-point positioning to
reach various programmed points (machining locations) on the XY
axis. Contouring or Continuous path positioning Contouring, or
continuous path machining, involves work such as that produced on a
lathe or milling machine, where the cutting tool is in contact with
the work piece as it travels from one programmed point to the next.
Continuous path positioning is the ability to control motions on
two or more machine axes simultaneously to keep a constant
cutter-work piece relationship. The programmed information in the
CNC program must accurately position the cutting tool from one
point to the next and follow a predefined accurate path at a
programmed feed rate in order to produce the form or contour
required (Fig. 10). Other type of machine tools involves motion of
work piece with respect to the cutter while cutting operation is
taking place. These machine tools include milling, routing machines
etc. and are known as contouring machines as shown in figure and
the controls required for their control are known as contouring
control.
5. CAD/CAM Module 2 AM/JA 5 Dept. of Mechanical Engg, AJCE
Contouring machines can also be used as point-to-point machines,
but it will be uneconomical to use them unless the work piece also
requires having a contouring operation to be performed on it. These
machines require simultaneous control of axes. In contouring
machines, relative positions of the work piece and the tool should
be continuously controlled. The control system must be able to
accept information regarding velocities and positions of the
machines slides. Feed rates should be programmed. Fig. 10 Types of
contour machining (A) Simple contour; (B) complex contour Control
Loops: Open loop systems Open loop systems have no access to the
real time data about the performance of the system and therefore no
immediate corrective action can be taken in case of system
disturbance. Programmed instructions are fed into the controller
through an input device. These instructions are then converted to
electrical pulses (signals) by the controller and sent to the servo
amplifier to energize the servo motors. The primary drawback of the
open-loop system is that there is no feedback system to check
whether the program position and velocity has been achieved. If the
system performance is affected by load, temperature, humidity, or
lubrication then the actual output could deviate from the desired
output. For these reasons the open -loop system is generally used
in point-to-point systems where the accuracy requirements are not
critical. Very few continuous-path systems utilize open-loop
control.This system is normally applied only to the case where the
output is almost constant and predictable. Therefore, an open loop
system is unlikely to be used to control machine tools since the
cutting force and loading of a machine tool is never a constant The
only exception is the wire cut machine for which some machine tool
builders still prefer to use an open loop system because there is
virtually no cuttingforce in wire cut machining.
6. CAD/CAM Module 2 AM/JA 6 Dept. of Mechanical Engg, AJCE
Close Loop Systems In a close loop system, feed back devices
closely monitor the output and any disturbance will be corrected in
the first instance. Therefore high system accuracy is achievable.
This system is more powerful than the open loop system and can be
applied to the case where the output is subjected to frequent
change. Nowadays, almost all CNC machines use this control system.
The closed-loop system has a feedback subsystem to monitor the
actual output and correct any discrepancy from the programmed
input. These systems use position and velocity feed back. The
feedback system could be either analog or digital. The analog
systems measure the variation of physical variables such as
position and velocity in terms of voltage levels. Digital systems
monitor output variations by means of electrical pulses. To control
the dynamic behavior and the final position of the machine slides,
a variety of position transducers are employed. Majority of CNC
systems operate on servo mechanism, a closed loop principle. If a
discrepancy is revealed between where the machine element should be
and where it actually is, the sensing device signals the driving
unit to make an adjustment, bringing the movable component to the
required location. Closed-loop systems are very powerful and
accurate because they are capable of monitoring operating
conditions through feedback subsystems and automatically
compensating for any variations in real- time. Dimension Systems:
Incremental Systems: Incremental program locations are always given
as the distance and direction from the immediately preceding point
(Fig. 6). Command codes which tell the machine to move the table,
spindle, and knee are explained here using a vertical milling
machine as an example:
7. CAD/CAM Module 2 AM/JA 7 Dept. of Mechanical Engg, AJCE Fig.
6 A work piece dimensioned in the incremental system mode. (Icon
Corporation) A X plus (X+) command will cause the cutting tool to
be located to the right of the last point. A X minus (X-) command
will cause the cutting tool to be located to the left of the last
point. A Y plus (Y+) command will cause the cutting tool to be
located toward the column. A Y minus (Y-) will cause the cutting
tool to be located away from the column. A Z plus (Z+) command will
cause the cutting tool or spindle to move up or away from the work
piece. A Z minus (Z-) moves the cutting tool down or into the work
piece. In incremental programming, the G91 command indicates to the
computer and MCU (Machine Control Unit) that programming is in the
incremental mode. Absolute systems Absolute program locations are
always given from a single fixed zero or origin point (Fig. 7). The
zero or origin point may be a position on the machine table, such
as the corner of the worktable or at any specific point on the work
piece. In absolute dimensioning and programming, each point or
location on the work piece is given as a certain distance from the
zero or reference point.
8. CAD/CAM Module 2 AM/JA 8 Dept. of Mechanical Engg, AJCE Fig.
7 A work piece dimensioned in the absolute system mode. Note: All
dimensions are given from a known point of reference. A X plus (X+)
command will cause the cutting tool to be located to the right of
the zero or origin point. A X minus (X-) command will cause the
cutting tool to be located to the left of the zero or origin point.
A Y plus (Y+) command will cause the cutting tool to be located
toward the column. A Y minus (Y-) command will cause the cutting
tool to be located away from the column. In absolute programming,
the G90 command indicates to the computer and MCU that the
programming is in the absolute mode. Interpolation The method by
which contouring machine tools move from one programmed point to
the next is called interpolation. This ability to merge individual
axis points into a predefined tool path is built into most of
todays MCUs. There are five methods of interpolation: linear,
circular, helical, parabolic, and cubic. All contouring controls
provide linear interpolation, and most controls are capable of both
linear and circular interpolation. Helical, parabolic, and cubic
interpolation are used by industries that manufacture parts which
have complex shapes, such as aerospace parts and dies for car
bodies. DDA integrator & Interpolators DDA is essentially an
algorithm for digital integration and generates a pulse train
varying in frequency. Digital integration is performed by
successive additions using an Euler approximation method shown in
Fig. 24.1 Digital differential analyzer (DDA) integration is based
upon an iterative technique controlled by an interrupt clock. At
each interrupt, a single iteration of a routine is executed, which
in turn can provide an output pulse. The DDA integrator consists of
two n-bit registers, Q register is an n-bit binary adder and the V
register is an n-bit up/down counter.
9. CAD/CAM Module 2 AM/JA 9 Dept. of Mechanical Engg, AJCE
Overflow and a reference pulse. Thus the rate of generartion of the
reference pulse would be proportional to the value of p. A
schematic diagram of a DDA integrator is shown in Fig. 24.2. It
consists of two n-bit registers, p and q, and one adder.
10. CAD/CAM Module 2 AM/JA 10 Dept. of Mechanical Engg, AJCE
Linear Interpolation Linear Interpolation consists of any
programmed points linked together by straight lines, whether the
points are close together or far apart (Fig. 11). Curves can be
produced with linear interpolation by breaking them into short,
straight-line segments. This method has limitations, because a very
large number of points would have to be programmed to describe the
curve in order to produce a contour shape. A contour programmed in
linear interpolation requires the
11. CAD/CAM Module 2 AM/JA 11 Dept. of Mechanical Engg, AJCE
coordinate positions (XY positions in two-axis work) for the start
and finish of each line segment. Therefore, the end point of one
line or segment becomes the start point for the next segment, and
so on, throughout the entire program. Circular Interpolation The
development of MCUs capable of circular interpolation has greatly
simplified the process of programming arcs and circles. To program
an arc (Fig. 12), the MCU requires only the coordinatepositions
(the XY axes) of the circle center, the radius of the circle, the
start point and end point of the arc being cut, and the direction
in which the arc is to be cut (clockwise or counterclockwise) See
Fig. 12. The information required may vary with different
MCUs.
12. CAD/CAM Module 2 AM/JA 12 Dept. of Mechanical Engg, AJCE
CNC System A CNC system consists of the following 6 major
elements:- a. Input Device b. Machine Control Unit c. Machine Tool
d. Driving Device e. Feed Back System f. Display Unit
13. CAD/CAM Module 2 AM/JA 13 Dept. of Mechanical Engg, AJCE
Working principle of CNC Machine Input Devices a. Floppy Disk Drive
Floppy disk is a small magnetic storage device for CNC data input.
It has been the most common storage media up to the 1970s, in terms
of data transfer speed, reliability, storage size, data handling
and the ability to read and write. Furthermore, the data within a
floppy could be easily edited at any point as long as you have the
proper program to read it. However, this method has proven to be
quite problematic in the long run as floppies have a tendency to
degrade alarmingly fast and are sensitive to large magnetic fields
and as well as the dust and scratches that usually existed on the
shop floor. b. USB Flash Drive A USB flash drive is a removable and
rewritable portable hard drive with compact size and bigger storage
size than a floppy disk. Data stored inside the flash drive are
impervious to dust and scratches that enable flash drives to
transfer data from place to place. In recent years, all computers
support USB flash drives to read and write data that make it become
more and more popular in CNC machine control unit. c. Serial
communication
14. CAD/CAM Module 2 AM/JA 14 Dept. of Mechanical Engg, AJCE
The data transfer between a computer and a CNC machine tool is
often accomplished through a serial communication port.
International standards for serial communications are established
so that information can be exchanged in an orderly way. The most
common interface between computers and CNC machine tools is
referred to the EIA Standard RS-232. Most of the personal computers
and CNC machine tools have built in R5232 port and a standard
RS-232 cable is used to connect a CNC machine to a computer which
enables the data transfer in reliable way. Part programs can be
downloaded into the memory of a machine tool or uploaded to the
computer for temporary storage by running a communication program
on the computer and setting up the machine control to interact with
the communication software. d. Ethernet communication Due to the
advancement of the computer technology and the drastic reduction of
the cost of the computer, it is becoming more practical and
economic to transfer part programmes between computers and CNC
machines via an Ethernet communication cable. This media provides a
more efficient and reliable means in part programme transmission
and storage. Most companies now built a Local Area Network (LAN) as
their infrastructure. More and more CNC machine tools provide an
option of the Ethernet Card for direct communication within the
LAN. e. Conversational Programming Part programmes can be input to
the controller via the keyboard. Built-in intelligent software
inside the controller enables the operator to enter the required
data step by step. This is a very efficient way for preparing
programmes for relatively simple workpieces involving up to 21/2
axis machining. Machine Control Unit (MCU) The machine control unit
is the heart of the CNC system. There are two sub-units in the
machine control unit: the Data Processing Unit (DPU) and the
Control Loop Unit (CLU). a. Data Processing Unit On receiving a
part programme, the DPU firstly interprets and encodes the part
programme into internal machine codes. The interpolator of the DPU
then calculate the intermediate positions of the motion in terms of
BLU (basic length unit) which is the smallest unit length that can
be handled by the controller. The calculated data are passed to CLU
for further action. b. Control Loop Unit The data from the DPU are
converted into electrical signals in the CLU to control the driving
system to perform the required motions. Other functions such as
machine spindle ON/OFF, coolant ON/OFF, tool clamp ON/OFF are also
controlled by this unit according to the internal machine codes.
Machine Tool
15. CAD/CAM Module 2 AM/JA 15 Dept. of Mechanical Engg, AJCE
This can be any type of machine tool or equipment. In order to
obtain high accuracy and repeatability, the design and make of the
machine slide and the driving leadscrew of a CNC machine is of
vital importance. The slides are usually machined to high accuracy
and coated with anti-friction material such as PTFE and Turcite in
order to reduce the stick and slip phenomenon. Large diameter
recirculating ball screws are employed to eliminate the backlash
and lost motion. Other design features such as rigid and heavy
machine structure; short machine table overhang, quick change
tooling system, etc also contribute to the high accuracy and high
repeatability of CNC machines. Driving System The driving system is
an important component of a CNC machine as the accuracy and
repeatability depend very much on the characteristics and
performance of the driving system. The requirement is that the
driving system has to response accurately according to the
programmed instructions. This system usually uses electric motors
although hydraulic motors are sometimes used for large machine
tools. The motor is coupled either directly or through a gear box
to the machine leadscrew to moves the machine slide or the spindle.
Three types of electrical motors are commonly used. The Display
Unit serves as an interactive device between the machine and the
operator. When the machine is running, the Display Unit displays
the present status such as the position of the machine slide, the
spindle RPM, the feed rate, the part programmes, etc. In an
advanced CNC machine, the Display Unit can show the graphics
simulation of the tool path so that part programmes can be verified
before the actually machining. Much other important information
about the CNC system can also displayed for maintenance and
installation work such as machine parameters, logic diagram of the
programmer controller, error massages and diagnostic data.
Applications of CNC Machines CNC machines are widely used in the
metal cutting industry and are best used to produce the following
types of product Parts with complicated contours Parts requiring
close tolerance and/or good repeatability Parts requiring expensive
jigs and fixtures if produced on conventional machines Parts that
may have several engineering changes, such as during the
development stage of a prototype In cases where human errors could
be extremely costly Parts that are needed in a hurry
16. CAD/CAM Module 2 AM/JA 16 Dept. of Mechanical Engg, AJCE
Small batch lots or short production runs Some common types of CNC
machines and instruments used in industry are as following:
Drilling Machine Lathe / Turning Centre Milling / Machining Centre
Turret Press and Punching Machine Wirecut Electro Discharge Machine
(EDM) Grinding Machine Laser Cutting Machine Water Jet Cutting
Machine Electro Discharge Machine Coordinate Measuring Machine
Industrial Robot DIRECT NUMERICAL CONTROL (DNC) Early NC machines
used a tape reader for storing and inputting the program into the
memory of the NC machine tool. Because of the unreliability of the
tape reader as well as the low speed of operation NC engineers were
searching for a suitable alternative. The advent of CNC in
mid-sixtees opened up the possibility of improving the performance
of NC machines by interfacing them with minicomputers. Yet another
significant technological development was the interfacing of
several NC machines with a computer, which can store the part
programs and transfer them to the NC machine concerned as and when
needed. The computer is connected between the tape reader and the
NC machine thereby bypassing the tape reader. This system was
therefore called as behind the tape reader system (BTR). This
development became very popular with NC machine users because of a
number of significant advantages. i. A number of NC machines can be
connected to a single computer. In many cases a single computer can
manage all the machines on a shop floor. ii. Programs in full or in
segments can be transferred to the NC machines in a multiplexing
mode. iii. The computer can be conveniently used for program
editing. iv. Since the computer has large memories there is no
limitation on the number or size of programs stored. v. The
computer can be used for other tasks like program creation using
computer aided part program generation software as well as for
operation management tasks like production planning, scheduling
etc. With the development of CNC, DNC concept was extended to CNC
machines also mainly for part program management. The DNC computer
(sometimes referred to as host computer) could serve a number of
CNC machines in shop floor. Figure 12.19 shows a typical DNC
network. The DNC computer stores all the part programs and
transfers the part programs to the CNC machines in response to the
requests of the operators. DNC systems are generally designed for
4, 8, or 16 CNC machines. However, with the wide spread acceptance
of the local area network concept, the possibility of connecting
more CNC machine in a DNC network has become a reality. The
concepts of Internet, Intranet and Extranet have further enlarged
the scope of distributed numerical control.
17. CAD/CAM Module 2 AM/JA 17 Dept. of Mechanical Engg, AJCE
Direct Numerical Control(DNC) There are number of problems inherent
in conventional machiningwhich are motivated machine tool builders
to seek imprivements in the basic NC system. Among the difficulties
encountered in using conventional numerical control machine are the
following Part programming mistakes,Punched tape, Tape reader,
Controller, Management information. DNC defined It can be defined
as a manufacturing system in which a number of machines are
controlled by a computer through direct connection and in real
time. The tape reader is omitted in DNC thus releiving the system
of its least reliable component. Instead of using tape reader the
part program is tranmitted to the machine tool directly from the
computer memory. In principle,one computer can be used to control
more than 100 seperate machines. Figure below illustrates the
general DNC configuration The system consists of four components.
1. Central computer 2. Bulk memory which stores the NC part
programs. 3. Telecommunication lines. 4. Machine Tools. The
computer calls the part program instructions from bulk storage and
sends data back from the machines. This two way information flow
occurs in real time,which means that machine's requests for
instructions must be satisfied almost
18. CAD/CAM Module 2 AM/JA 18 Dept. of Mechanical Engg, AJCE
instantaneously. Similarly, the computer must always be ready to
receive information from the machines and respond accordingly. The
remarkable feature of the DNC system is that the computer is
ervicing a large number of seperate machine tools,all in real time.
Depending upon the number of machines and computational
requirements that are imposed on the computer it is sometimes
necessary to make use of satellite computersas shown in figure.
12.6.1 OBJECTIVES OF DNC DNC serves many purposes and is now
considered as essential for the efficient management of CNC machine
tools in the shop floor. The main objectives of implementing DNC
are given below: 1. Upload and download CNC programs to and from
machine tools simultaneously and directly from the CNC systems. 2.
Easy editing of the existing programs. 3. Eliminating the use of
manual switch boxes to multiplex CNC machines. 4. Organizing and
cataloguing of all programs for instant access. 5. Eliminating the
need for manually punching the program at the keyboard thereby
saving considerable costly machine time. 6. Eliminating the need
for paper tape in the old generation of NC machines. 7. Copy
programs to and from the floppy discs and other media to the DNC
computer. 8. Compare files edited at the CNC to the original
program. 9. Rename or delete or update programs or create new
programs. 10. Show pictures of set ups for graphic catalogue of set
up and machining operations.
19. CAD/CAM Module 2 AM/JA 19 Dept. of Mechanical Engg, AJCE
11. Providing system transaction files of all activity on the DNC
computer. 12. Pass word protection at different points of the CNC
system wherever the operator could cause damage to the NC code by
overwriting. 13. Tool length offsets from tool pre-setters can be
transferred directly to machine tool controls. It is also possible
to connect co-ordinate measuring machines to DNC networks.
PLC-Programmable Logic Controllers modern controller device used
extensively for sequence control today in transfer lines, robotics,
process control, and many other automated systems is the
Programmable Logic Controller (PLC). In essence, a PLC is a special
purpose industrial microprocessor based real-time computing system,
which performs the following functions in the context of industrial
operations Monitor Input/Sensors Execute logic, sequencing, timing,
counting functions for Control/Diagnostics Drives
Actuators/Indicators Communicates with other computers Some of the
following are advantages of PLCs due to standardized hardware
technology, modular design of the PLCs, communication capabilities
and improved development program development environment: Easy to
use to simple modular assembly and connection; Modular expansion
capacity of the input, outputs and memory; Simple programming
environments and the use of standardized task libraries and
debugging aids; Communication capability with other programmable
controllers and computers Reliability Flexibility Advanced
Functions Communications Speed Diagnostics
20. CAD/CAM Module 2 AM/JA 20 Dept. of Mechanical Engg, AJCE
Ease of programming Ease of maintenance Designed for industrial
environment Quick installation Adaptable to change A tabulated data
of advanced advantages of PLC is given below
22. CAD/CAM Module 2 AM/JA 22 Dept. of Mechanical Engg, AJCE
Evolution of the PLC Before the advent of microprocessors,
industrial logic and sequence control used to be performed using
elaborate control panels containing electromechanical or
solid-state relays, contactors and switches, indicator lamps,
mechanical or electronic timers and counters etc., all hardwired by
complex and elaborate wiring. In fact, for many applications such
control panels are used even today. However, the development of
microprocessors in the early 1980s quickly led to the development
of the PLCs, which had significant advantages over conventional
control panels. Some of these are: Programming the PLC is easier
than wiring physical components; the only wiring required is that
of connecting the I/O terminals. The PLC can be reprogrammed using
user-friendly programming devices. Controls must be physically
rewired. PLCs take up much less space. Installation and maintenance
of PLCs is easier, and with present day solid-state technology,
reliability is grater. The PLC can be connected to a distributed
plant automation system, supervised and monitored. Beyond a certain
size and complexity of the process, a PLC-based system compare
favorably with control panels. Ability of PLCs to accept digital
data in serial, parallel and network modes imply a drastic
reduction in plant sensor and actuator wirings, since single cable
runs to remote terminal I/O units can be made. Wiring only need to
be made locally from that point. Special diagnostic and maintenance
modes for quick troubleshooting and servicing, without disrupting
plant operations. However, since it evolved out of relay control
panels the PLCs adopted legacy concepts, which were applicable to
such panels. To facilitate maintenance and modification of the
physically wired control logic, the control panel was
systematically organized so that each control formed a rung much
like a rung on a ladder. The development of PLCs retained the
ladder logic concept where control circuits are defined like rungs
on a ladder where each rung begins with one or more inputs and each
rung usually ends with only one output. A typical PLC ladder
structure is shown below.
23. CAD/CAM Module 2 AM/JA 23 Dept. of Mechanical Engg, AJCE
Architecture of PLCs The PLC is essentially a microprocessor-based
real-time computing system that often has to handle significant I/O
and Communication activities, bit oriented computing, as well as
normal floating point arithmetic. A typical set of components that
make a PLC System is shown in Fig. below.
24. CAD/CAM Module 2 AM/JA 24 Dept. of Mechanical Engg, AJCE
Central controller The central controller (CC) contains the modules
necessary for the main computing operation of the Programmable
controller (PC). The central controller can be equipped with the
following: Memory modules with RAM or EPROM (in the memory sub
modules) for the program (main memory); Interface modules for
programmers, expansion units, standard peripherals etc;
Communications processors for operator communication and
visualization, communication with other systems and configuring of
local area networks. A bus connects the CPUs with the other
modules. Central Processing units The CPUs are generally
microprogrammed processors sometimes capable of handling multiple
data width of either 8, 16 or 24 bits. In addition some times
additional circuitry, such as for bit processing is provided, since
much of the computing involves logical operations involving digital
inputs and auxiliary quantities. Memory with battery backup is also
provided for the following: Flags ( internal relays), timers and
counters; Operating system data Process image for the signal states
of binary inputs and outputs. The user program is stored in memory
modules. During each program scan, the processor reads the
statement in the program memory, executes the corresponding
operations. The bit processor, if it exists, executes binary
operations. Often multiple central controllers can be configured in
hot standby
25. CAD/CAM Module 2 AM/JA 25 Dept. of Mechanical Engg, AJCE
mode, such that if one processor fails the other can immediately
pick up the computing tasks without any failure in plant
operations. Communications processors Communications processors
autonomously handle data communication with the following: Standard
peripherals such as printers, keyboards and CRTs, Supervisory
Computer Systems, Other Programmable controllers, The data required
for each communications processors is stored in a RAM or EPROM sub
module so that they do not load the processor memories. A local
area network can also be configured using communications
processors. This enables the connection of various PLCs over a wide
distance in various configurations. The network protocols are often
proprietary. However, over the last decade, interoperable network
protocol standards are also supported in modern PLCs. Program and
Data memory The program and data needed for execution are stored in
RAM or EPROM sub modules. These sub modules are plugged into the
processors. Additional RAM memory modules can also be connected.
Expansion units Modules for the input and output of signals are
plugged into expansion units. The latter are connected to the
central controller via interface modules. Expansion units can be
connected in two configurations. A. Centralized configuration The
expansion units (EU) are located in the same cabinet as the central
controllers or in an adjacent cabinet in the centralized
configuration, several expansion units can be connected to one
central controller. The length of the cable from the central
controller to the most distant expansion unit is often limited
based on data transfer speeds. B. Distributed configuration The
expansion units can be located at a distance of up to 1000 m from
the central controller. In the distributed configuration, up to 16
expansion units can be connected to one central controller. Four
additional expansion units can be connected in the centralized
configuration to each distributed expansion unit and to the central
controller. Input/Output Units A host of input and output modules
are connected to the PLC bus to exchange data with the processor
unit. These can be broadly categorized into Digital Input Modules,
Digital Output Modules, Analog Input Modules, Analog Output Modules
and Special Purpose Modules. Digital Input Modules The digital
inputs modules convert the external binary signals from the process
to the internal digital signal level of programmable
controllers.
26. CAD/CAM Module 2 AM/JA 26 Dept. of Mechanical Engg, AJCE
Digital Output Modules The digital output modules convert the
internal signal levels of the programmable controllers into the
binary signal levels required externally by the process. Analog
Input Modules The analog input modules convert the analog signals
from the process into digital values which are then processed by
the programmable controller. Analog Output Modules The analog
output modules convert digital values from the programmable
controller into the analog signals required by the process. Special
Purpose Modules These may include special units for: High speed
counting High accuracy positioning On-line self-optimizing control
Multi axis synchronisation, interpolation These modules contain
additional processors, and are used to relieve the main CPU from
the high computational loads involved in the corresponding tasks
Programmers External programming units can be used to download
programs into the program memory of the CPU. The external field
programmers provide several software features that facilitate
program entry in graphical form. The programmers also provide
comprehensive aids for debugging and execution monitoring support
logic and sequence control systems. Printer can be connected to the
programmers for the purpose of documenting the program. In some
cases, special programming packages that run on Personal Computers,
can also be used as programming units. There are two ways of
entering the program: A. Direct program entry to the program memory
(RAM) plugged into the central controller. For this purpose, the
programmer is connected to the processor or to the programmer
interface modules. B. Programming the EPROM sub modules in the
programmer without connecting it to the PC (off-line). The memory
sub modules are then plugged into the central controller. Other
Miscellaneous Units Other units such as Power Supply Units, Bus
Units etc. can also be connected to the PLC system
27. CAD/CAM Module 2 AM/JA 27 Dept. of Mechanical Engg, AJCE
PLC Power supplies are typically designed to meet normal operation
of +10 to -15%. Fluctuation in voltage. Converts the incoming
voltage to a useable form for the internal electronics Protects the
PLC s components from voltage spikes .For voltage condition that
are unstable insist on a CVT between PLC & primary power
source. Operates either on 120V AC/ 240 V AC/ 24VDC. PLCs Power
Supply is designed to meet short power losses without affecting the
operation of the system. PLC can operate for several ms without
line power before the PS signals the processor that it can no
longer provide adequate DC Power to the system. The CPU executes a
controlled shut down which saves the users program & data in
memory The other factor affecting the function of the PLC is EMI or
electrical noise.Use an isolation transformer, take care of
shielding from Drives, ensure proper earthing & cabling
practices. Program Execution There are different ways and means of
executing a user program. Normally a cyclic execution program is
preferred and this cyclic operators are given due priorities.
Program processing in a PLC happens cyclically with the following
execution: 1. After the PLC is initialised, the processor reads the
individual inputs. This status of the input is stored in the
process- image input table (PII). 2. This processor processes the
program stored in the program memory. This consists of a list of
logic functions and instructions, which are successively processed,
so that the required input information will already be accessed
before the read in PII and the matching results are written into a
process-image output table (PIQ). Also other storage areas for
counters, timers and memory bits will be accessed during program
processing by the processor if necessary. 3. In the third step
after the processing of the user program, the status from the PIQ
will transfer to the outputs and then be switched on and/or off.
Afterwards it begins the execution of the next cycle from step 1.
The same cyclic process also acts upon an RLL program. The time
required by the microprocessor to complete one cycle is known as
the scan time. After all rungs have been tested, the PLC then
starts over again with the first rung. Of course the scan time for
a particular processor is a function of the processor speed, the
number of rungs, and the complexity of each rung.
28. CAD/CAM Module 2 AM/JA 28 Dept. of Mechanical Engg, AJCE
Programming Languages PLC programs can be constructed using various
methods of representation. Some of the common ones are, described
below. The Relay Ladder Logic (RLL) Diagram A Relay Ladder Logic
(RLL) diagram, also referred to as a Ladder diagram is a visual and
logical method of displaying the control logic which, based on the
inputs determine the outputs of the program. The ladder is made up
of a series of rungs of logical expressions expressed graphically
as series and parallel circuits of relay logic elements such as
contacts, timers etc. Each rung consist of a set of inputs on the
left end of the rung and a single output at the right end of each
rung. The structure of a rung is shown below in Fig. 19.1(a) &
(b). Fig. 19.1 shows the internal structure of a simple rung in
terms its element contacts connected in a series parallel
circuit.
29. CAD/CAM Module 2 AM/JA 29 Dept. of Mechanical Engg, AJCE
RLL Programming Paradigms: Merits and Demerits For the programs of
small PLC systems, RLL programming technique has been regarded as
the best choice because a programmer can understand the relations
of the contacts and coils intuitively. Additionally, a maintenance
engineer can easily monitor the operation of the RLL program on its
graphical representation because most PLC manufacturers provide an
animated display that clearly identifies the states of the contacts
and coils. Although RLL is still an important language of IEC
1131-3, as the memory size of today's PLC systems increases, a
large-sized RLL program brings some significant problems because
RLL is not particularly suitable for the well-structured
programming: It is difficult to structure an RLL program
hierarchically.
30. CAD/CAM Module 2 AM/JA 30 Dept. of Mechanical Engg, AJCE
Example: Forward Reverse Control This example explains the control
process of moving a motor either in the forward direction or in the
reverse direction. The direction of the motor depends on the
polarity of the supply. So in order to control the motor, either in
the forward direction or in the reverse direction, we have to
provide the supply with the corresponding polarity. The Fig 19.2
depicts the procedure to achieve this using Relay Ladder Logic.
Here, the Ladder consists of two rungs corresponding to forward and
reverse motions. The rung corresponding to forward motion consists
of 1. A normally closed stop push-button (IN001), 2. A normally
opened forward run push-button (IN002) in parallel with a normally
opened auxillary contact(OP001), 3. A normally closed auxillary
contact(OP002) and 4. The contacter for coil(OP001). Similarly, the
rung corresponding to reverse motion consists of 1. A normally
closed stop push-button (IN001), 2. A normally opened forward run
push-button (IN003) in parallel with a normally opened auxillary
contact(OP002), 3. A normally closed auxillary contact(OP001) and
4. The contacter for coil(OP002). Operation: The push-buttons(PB)
represented by IN--- are real input push-buttons, which are to be
manually operated. The auxillary contacts are operated through
program. Initially the machine is at standstill, no voltage supply
is present in the coils, and the PBs are as shown in the fig. The
stop PB is intially closed, the motor will not move until the
forward run PB/reverse run PB is closed. Suppose we want to run the
motor in the forward direction from standstill, the outputs of the
coils contacters have logic 0 and hence both the auxillary contacts
are turned on. If we press and release the forward
31. CAD/CAM Module 2 AM/JA 31 Dept. of Mechanical Engg, AJCE
run PB, the positive voltage from the +ve voltage rail is passed to
thecoil. Once the coil contacter gives the logic 1, the following
consequences takes place simultaneously A. The auxillary contact
OP001 in the second rung becomes opened,which stops the voltage for
reverse motion of the motor. At this stage, the second rung is not
turned on even the reverse run PB is pressed by mistake. B. The
auxillary contact OP001 is the first rung is on, which provides the
path for the positive voltage until the stop PB is pressed. Here
the auxillary contact OP001 acts as a latch, which facilitates even
to remove the PB IN002 once the coil OP001 is on. If we want to
rotate the motor in the reverse direction, the stop PB is to be
pressed sothat no voltage in the coil is present, then we can turn
on the PB corresponding to reverse run. This is a simple example of
interlocking, where each rung locks the operation of the other
rung. There are several other programming paradigms for PLCs. Two
of them are mentioned here for briefly. The Function Chart (IEC)
Depicts the logic control task symbols in terms of functional
blocks connected symbolically in a graphic format. The Statement
List (STL) Is made up of series of assembly language like
statements each one of which represents a logic control statement
executable by the processor of the programmable controller. The
statement list is the most unrestricted of all the methods of
representation. Individual statements are made up of mnemonics,
which represent the function to be executed. This method of
representation is favoured by those who have already had experience
in programming microprocessors or computers. Programmable
controller contacts and electromechanical relay contacts operate in
a very similar fashion. For example, lets take relay A (see Figure
3-14a) which has two sets of contacts, one normally open contact
(A-1) and one normally closed contact (A-2). If relay coil A is not
energized (i.e., it is OFF), contact A-1 will remain open and
contact A-2 will remain closed (see Figure 3-14b). Conversely, if
coil A is energized, or turned ON, contact A-1 will close and
contact A-2 will open (see Figure 3-14c). The blue lines
highlighting the coil and contacts denote an ON, or closed,
condition.
32. CAD/CAM Module 2 AM/JA 32 Dept. of Mechanical Engg, AJCE
The following seven points describe guidelines for translating from
hardwired logic to programmed logic using PLC contact symbols:
33. CAD/CAM Module 2 AM/JA 33 Dept. of Mechanical Engg, AJCE
Normally open contact. When evaluated by the program, this symbol
is examined for a 1 to close the contact; therefore, the signal
referenced by the symbol must be ON, CLOSED, activated, etc.
Normally closed contact. When evaluated by the program, this symbol
is examined for a 0 to keep the contact closed; thus, the signal
referenced by the symbol must be OFF, OPEN, deactivated, etc. `
Output. An output on a given rung will be energized if any left-to
right path has all contacts closed, with the exception of power
flow going in reverse before continuing to the right. An output can
control either a connected device (if the reference address is also
a termination point) or an internal output used exclusively within
the program. An internal output does not control a field device.
Rather, it provides interlocking functions within the PLC. Input.
This contact symbol can represent input signals sent from connected
inputs, contacts from internal outputs, or contacts from connected
outputs. Contact addresses. Each program symbol is referenced by an
address. If the symbol references a connected input/output device,
then the address is determined by the point where the device is
connected. Repeated use of contacts. A given input, output, or
internal output can be used throughout the program as many times as
required. Logic format. Contacts can be programmed in series or in
parallel, depending on the output control logic required. The
number of series contacts or parallel branches allowed in a rung
depends on the PLC. Table 3-6a show how simple hardwired series and
parallel circuits can be translated into programmed logic. A series
circuit is equivalent to the Boolean AND operation; therefore, all
inputs must be ON to activate the output. A parallel circuit is
equivalent to the Boolean OR operation; therefore, any one of the
inputs must be ON to activate the output. The STR and OUT Boolean
statements stand for START (of a new rung) and OUTPUT (of a rung),
respectively. Table 3-6b further explains Table 3-6a.
35. CAD/CAM Module 2 AM/JA 35 Dept. of Mechanical Engg, AJCE
MEMORY TYPES * The storage and retrieval requirements for the
executive and application memory sections are not the same;
therefore, they are not always stored in the same type of memory.
For example, the executive requires a memory that permanently
stores its contents and cannot be erased or altered either by loss
of electrical power or by the user. This type of memory is often
unsuitable for the application program. Memory can be separated
into two categories: volatile and nonvolatile. Volatile memory
loses its programmed contents if all operating power is lost or
removed, whether it is normal power or some form of backup power.
Volatile memory is easily altered and quite suitable for most
applications when supported by battery backup and possibly a disk
copy of the program. Nonvolatile memory retains its programmed
contents, even during a complete loss of operating power, without
requiring a backup source. Nonvolatile memory generally is
unalterable, yet there are special nonvolatile memory types that
are alterable. Todays PLCs include those that use nonvolatile
memory, those that use volatile memory with battery backup, as well
as those that offer both. There are two major concerns regarding
the type of memory where the application program is stored. Since
this memory is responsible for retaining the control program that
will run each day, volatility should be the prime concern. Without
the application program, production may be delayed or forfeited,
and the outcome is usually unpleasant. A second concern should be
the ease with which the program stored in memory can be altered.
Ease in altering the application memory is important, since this
memory is ultimately involved in any interaction between the user
and the controller. This interaction begins with program entry and
continues with program changes made during program generation and
system start-up, along with on-line changes, such as changing timer
or counter preset values. The following discussion describes six
types of memory and how their characteristics affect the manner in
which programmed instructions are retained or altered within a
programmable controller. READ-ONLY MEMORY Read-only memory (ROM) is
designed to permanently store a fixed program that is not alterable
under ordinary circumstances. It gets its name from the fact that
its contents can be examined, or read, but not altered once
information has been stored. This contrasts with memory types that
can be read from and written to (discussed in the next section). By
nature, ROMs are generally immune to alteration due to electrical
noise or loss of power. Executive programs are often stored in ROM.
Programmable controllers rarely use read-only memory for their
application memory. However, in applications that require fixed
data, read- only memory offers advantages when speed, cost, and
reliability are factors. Generally, the manufacturer creates
ROM-based PLC programs at the factory. Once the manufacturer
programs the original set of instructions, the user can never alter
it. This typical approach to the programming of ROM-based
controllers assumes that the program has already been debugged
36. CAD/CAM Module 2 AM/JA 36 Dept. of Mechanical Engg, AJCE
and will never be changed. This debugging is accomplished using a
random-access memory based PLC or possibly a computer. The final
program is then entered into ROM. ROM application memory is
typically found only in very small, dedicated PLCs. RANDOM-ACCESS
MEMORY Random-access memory (RAM), often referred to as read/write
memory (R/W), is designed so that information can be written into
or read from the memory storage area. Random-access memory does not
retain its contents if power is lost; therefore, it is a volatile
type of memory. Random-access memory normally uses a battery backup
to sustain its contents in the event of a power outage. For the
most part, todays programmable controllers use RAM with battery
support for application memory. Random-access memory provides an
excellent means for easily creating and altering a program, as well
as allowing data entry. In comparison to other memory types, RAM is
a relatively fast memory. The only noticeable disadvantage of
battery-supported RAM is that the battery may eventually fail,
although the processor constantly monitors the status of the
battery. Battery-supported RAM has proven to be sufficient for most
programmable controller applications. If a battery backup is not
feasible, a controller with a nonvolatile memory option (e.g.,
EPROM) can be used in combination with the RAM. This type of memory
arrangement provides the advantages of both volatile and
nonvolatile memory. Figure 5-2 shows a RAM chip. PROGRAMMABLE
READ-ONLY MEMORY Programmable read-only memory (PROM) is a special
type of ROM because it can be programmed. Very few of todays
programmable controllers use PROM for application memory. When it
is used, this type of memory is most likely a permanent storage
backup for some type of RAM. Although a PROM is programmable and,
like any other ROM, has the advantage of nonvolatility, it has the
disadvantage of requiring special programming equipment. Also, once
programmed, it cannot be easily erased or altered; any program
change requires a new set of PROM chips. A PROM memory is suitable
for storing a program that has been thoroughly checked while
residing in RAM and will not require further changes or on-line
data entry. ERASABLE PROGRAMMABLE READ-ONLY MEMORY Erasable
programmable read-only memory (EPROM) is a specially designed PROM
that can be reprogrammed after being entirely erased by an
ultraviolet (UV) light source. Complete erasure of the contents of
the chip requires that the window of the chip (see Figure 5-3) be
exposed to a UV light source for approximately twenty minutes.
EPROM can be considered a semipermanent storage device, because it
permanently stores a program until it is ready to be altered. EPROM
provides an excellent storage medium for application programs that
require nonvolatility, but that do not require program changes or
on-line data entry. Many OEMs use controllers with EPROM-type
memories to provide permanent storage of the machine program after
it has been debugged and is fully operational. OEMs use EPROM
because most of their machines will not require changes or data
entry by the user. An application memory composed of EPROM alone is
unsuitable if on-line changes or data entry are required. However,
many controllers offer EPROM application memory as an optional
37. CAD/CAM Module 2 AM/JA 37 Dept. of Mechanical Engg, AJCE
backup to battery-supported RAM. EPROM, with its permanent storage
capability, combined with RAM, which is easily altered, makes a
suitable memory system for many applications. ELECTRICALLY
ALTERABLE READ-ONLY MEMORY Electrically alterable read-only memory
(EAROM) is similar to EPROM, but instead of requiring an
ultraviolet light source to erase it, an erasing voltage on the
proper pin of an EAROM chip can wipe the chip clean. Very few
controllers use EAROM as application memory, but like EPROM, it
provides a nonvolatile means of program storage and can be used as
a backup to RAM-type memories. ELECTRICALLY ERASABLE PROGRAMMABLE
READ-ONLY MEMORY Electrically erasable programmable read-only
memory (EEPROM) is an integrated circuit memory storage device that
was developed in the mid- 1970s. Like ROMs and EPROMs, it is a
nonvolatile memory, yet it offers the same programming flexibility
as RAM does. Several of todays small and medium-sized controllers
use EEPROM as the only memory within the system. It provides
permanent storage for the program and can be easily changed with
the use of a programming device (e.g., a PC) or a manual
programming unit. These two features help to eliminate downtime and
delays associated with programming changes. They also lessen the
disadvantages of electrically erasable programmable read only
memory. One of the disadvantages of EEPROM is that a byte of memory
can be written to only after it has been erased, thus creating a
delay. This delay period is noticeable when on-line program changes
are being made. Another disadvantage of EEPROM is a limitation on
the number of times that a single byte of memory can undergo the
erase/write operation (approximately 10,000). These disadvantages
are negligible, however, when compared to the remarkable advantages
that EEPROM offers. MEMORY STRUCTURE AND CAPACITY BASIC STRUCTURAL
UNITS PLC memories can be thought of as large, two-dimensional
arrays of singleunit storage cells, each storing a single piece of
information in the form of 1 or 0 (i.e., the binary numbering
format). Since each cell can store only one binary digit and bit is
the acronym for binary digit, each cell is called a bit. A bit,
then, is the smallest structural unit of memory. Although each bit
stores information as either a 1 or a 0, the memory cells do not
actually contain the numbers 1 and 0 per se. Rather, the cells use
voltage charges to represent 1 and 0the presence of a voltage
charge represents a 1, the absence of a charge represents a 0. A
bit is considered to be ON if the stored information is 1 (voltage
present) and OFF if the stored information is 0 (voltage absent).
The ON/OFF information stored in a single bit is referred to as the
bit status. Sometimes, a processor must handle more than a single
bit of data at a time. For example, it is more efficient for a
processor to work with a group of bits when transferring data to
and from memory. Also, storing numbers and codes requires a
grouping of bits. A group of bits handled simultaneously is called
a byte. More accurately, a byte is the smallest group of bits that
can be handled by the processor at one time. Although byte size is
normally eight bits,
38. CAD/CAM Module 2 AM/JA 38 Dept. of Mechanical Engg, AJCE
this size can vary depending on the specific controller. The third
and final structural information unit used within a PLC is a word.
In general, a word is the unit that the processor uses when data is
to be operated on or instructions are to be performed. Like a byte,
a word is also a fixed group of bits that varies according to the
controller; however, words are usually one byte or more in length.
For example, a 16-bit word consists of two bytes. Typical word
lengths used in PLCs are 8, 16, and 32 bits. Figure 5-4 illustrates
the structural units of a typical programmable controller
memory.
39. CAD/CAM Module 2 AM/JA 39 Dept. of Mechanical Engg, AJCE
Timers and Counters
41. CAD/CAM Module 2 AM/JA 41 Dept. of Mechanical Engg, AJCE
EXAMPLE: The first version of sequence control program for the
industrial stamping process A hastily constructed RLL program for
the above process may look like the one given in Figure 20.2. The
above program logic indicates that the Up solenoid output becomes
activated when the Master Switch is on and the bottom Limit Switch
is on. Also there is interlock provided, so that when the Down
solenoid is on, the Up solenoid cannot be on. Further, once the Up
solenoid is on, the output is latched by an auxiliary contact, so
that it remains on till the bottom LS is made on, when it turns
off. A similar logic has been implemented for the activation of the
Down solenoid. However, on closer examination, several problems may
be discovered with the above program. Some of these are discussed
below. For example, there is no provision for a Master stop switch
to stop the press from stopping in an emergency, except by turning
the Master Switch off. This would indeed stop the process, however,
if the press stops midway, both bottom and top limit switches would
be off. Now the process would not start, even if the Master switch
is turned on again. Therefore, either a manual jogging control
needs to be provided, so that the operator can return the piston to
the up position by manually operating the hydraulics, or special
auto mode logic should be designed to perform this. As a second
example, note that this process does not have a part detect sensor.
This implies that the moment the Master switch is on the press
would start going up and down at its own travel speed, regardless
of whether a part has been placed for pressing or not. Apart from
wastage
42. CAD/CAM Module 2 AM/JA 42 Dept. of Mechanical Engg, AJCE of
energy, this could be safety hazard for an operator who has to
place the part on the machine between the interval of a cycle of
operation. The above discussion clearly indicates the need for a
systematic approach towards the development of RLL programs for
industrial logic control problems. This is all the more true since
industrial process control is critical application domain where
control errors can lead to loss of production or operator safety.
Therefore, in this chapter, we discuss a systematic approach
towards the design of RLL programs. Timer These are special
operands of a PLC, which represent a time delay relay in a relay
logic system. The time functions are a fixed component of the
central processing unit. The number of these varies from
manufacturer to manufacturer and from product to product. It is
possible to achieve time delays in the range of few milliseconds to
few hours. Representation for timers is shown in Fig. 19.4. Timers
have a preset register value, which represent the maximum count it
can hold and can be set using software/program. The figure shown
below has a enable reset logic and run logic in connection with the
timer. The counter doesnot work and the register consists of zero
until the enable reset logic is on. Once the enable reset logic is
on, the counter starts counting when the run logic is on. The
output is on only when the counter reaches the maximum count.
Various kinds of timers are explained as follows
43. CAD/CAM Module 2 AM/JA 43 Dept. of Mechanical Engg, AJCE On
delay timer: The input and output signals of the on delay timer are
as shown in the Fig. 19.6. When the input signal becomes on, the
output signal becomes on with certain delay. But when the input
signal becomes off, the output signal also becomes off at the same
instant. If the input becomes on and off with the time which less
than the delay time, there is no change in the output and remains
in the off condition even the input is turned on and off i.e.,
output is not observed until the input pulse width is greater than
the delay time. Realization of on-delay timer: The realization of
on-delay timer using the basic timer shown in the previous fig is
explained here. The realization is as shown in the Fig. 19.6, which
shows a real input switch(IN001), coil1(OP002), two normally opened
auxillary contacts(OP002), coil2(OP002). When the real input switch
is on the coil(OP002) is on and hence both the auxillary switches
are on. Now the counter value starts increasing and the output of
the timer is on only after it reaches the maximum preset count. The
behaviour of this timer is shown in figure, which shows the
on-delay timer. The value in the counter is reset when the input
switch(IN001) is off as the enable reset logic is off. This is a
non- retentive timer. Off delay timer: The input and output signals
of the off delay timer are as shown in the Fig. 19.7. When the
input signal becomes on, the output signal becomes on at the same
time. But when the input signal becomes off, the output signal
becomes off with certain delay. If the input becomes on and off
with the time which less than the delay time, there is no change in
the output and remains in the on condition even the ipnut is turned
on and off i.e., the delay in the output is not observed until the
input pulse width is greater than the delay time.
44. CAD/CAM Module 2 AM/JA 44 Dept. of Mechanical Engg, AJCE
Retentive timer: The input and output signals of the retentive
timer are as shown in the 19.11. This is also implemented
internally in a register as in the previous case. When the input is
on , the internal counter starts counting until the input is off
and at this time, the counter holds the value till next input pulse
is applied and then starts counting starting with the value
existing in the register. Hence it is named as retentive timer. The
output is on only when the counter reaches its terminal count.
Non-retentive timer: The input and output signals of the
non-retentive timer are as shown in the Fig. 19.11. This is
implemented internally in a register. When the input is on, the
internal counter starts counting until the input is off and at this
time the value in the counter is reset to zero. Hence it is named
as non-retentive timer. The output is on only when the counter
reaches its terminal count.
45. CAD/CAM Module 2 AM/JA 45 Dept. of Mechanical Engg, AJCE
Counter The counting functions (C) operate as hardware counters,
but are a fixed component of the central processing unit. The
number of these varies for each of the programmable controllers. It
is possible to count up as well as to count down. The counting
range is from 0 to 999. The count is either dual or BCD coded for
further processing. User defined Data If the memory capacity of the
flag area is not sufficient to memorize the signal status and data,
the operand area data (D) is applied. In general, in the flag area,
primarily binary conditions apply, whereas in the data area digital
values prevail and are committed to memory. The data is organized
into data blocks (DB). 256 data words with 16 bit each can be
addressed to each data block. The data is stored in the user memory
sub module. The available capacity within the module has to be
shared with the user program. Addressing The designation of a
certain input or output within the program is referred to as
addressing. Different PLC manufacturers adopt different conventions
for specifying the address of a specific input or output signal. A
typical addressing scheme adopted in PLCs manufacturers by Siemens
is illustrated in the sequel. The inputs and outputs of the PLCs
are mostly defined in groups of eight on digital input and/or
digital output devices. This eight unit is called a byte. Every
such group receives a number as a byte address. Each in/output byte
is divided into 8 individual bits, through which it can respond
with. These bits are numbered from bit 0 to bit 7. Thus one
receives a bit address. For example, in the address I0.4, I denotes
that the address type is specified as Input, 0 is the byte address
and 4 the bit address. Similarly in the address Q5.7, Q denotes
that the address type is specified as Output, 5 is the byte address
and 7 is the bit address.
46. CAD/CAM Module 2 AM/JA 46 Dept. of Mechanical Engg, AJCE
Driving devices- Electrical and Mechanical Components A drive
system consists of amplifier circuits, drive motors, and ball
lead-screws. The MCU feeds the control signals (position and speed)
of each axis to the amplifier circuits. The control signals are
augmented to actuate drive motors which in turn rotate the ball
lead-screws to position the machine table. The driving system is an
important component of a CNC machine as the accuracy and
repeatability depend very much on the characteristics and
performance of the driving system. The requirement is that the
driving system has to response accurately according to the
programmed instructions. This system usually uses electric motors
although hydraulic motors are sometimes used for large machine
tools. The motor is coupled either directly or through a gear box
to the machine leadscrew to moves the machine slide or the spindle.
Three types of electrical motors are commonly used. Power units In
machine tools, power is generally required for For driving the main
spindle For driving the saddles and carriages. For providing power
for some ancillary units. The motors used for CNC system are of two
kinds Electrical - AC , DC or Stepper motors Electric motors are by
far the most common component to supply mechanical input to a
linear motion system. Stepper motors and servo motors are the
popular choices in linear motion machinery due to their accuracy
and controllability. They exhibit favourable torque-speed
characteristics and are relatively inexpensive.
47. CAD/CAM Module 2 AM/JA 47 Dept. of Mechanical Engg, AJCE
Electrical Components of Driving System a. DC Servo Motor This is
the most common type of feed motors used in CNC machines. The
principle of operation is based on the rotation of an armature
winding in a permanently energised magnetic field. The armature
winding is connected to a commutator, which is a cylinder of
insulated copper segments mounted on the shaft. DC current is
passed to the commutator through carbon brushes, which are
connected to the machine terminals. The change of the motor speed
is by varying the armature voltage and the control of motor torque
is achieved by controlling the motor's armature current. In order
to achieve the necessary dynamic behaviour it is operated in a
closed loop system equipped with sensors to obtain the velocity and
position feedback signals.
48. CAD/CAM Module 2 AM/JA 48 Dept. of Mechanical Engg, AJCE
The digital servo motor controller directs operation of the servo
motor by sending velocity command signals to the amplifier, which
drives the servo motor. An integral feedback device (resolver) or
devices (encoder and tachometer) are either incorporated within the
servo motor or are remotely mounted, often on the load itself.
These provide the servo motor's position and velocity feedback that
the controller compares to its programmed motion profile and uses
to alter its velocity signal. Servo motors feature a motion
profile, which is a set of instructions programmed into the
controller that defines the servo motor operation in terms of time,
position, and velocity. The ability of the servo motor to adjust to
differences between the motion profile and feedback signals depends
greatly upon the type of controls and servo motors used. b. AC
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.
AC motors are gradually replacing DC servomotors. The main reason
is that there is no commutator or brushes in AC servomotor so that
maintenance is virtually not required. Furthermore, AC servos have
a smaller power-to-weight ratio and faster response.
49. CAD/CAM Module 2 AM/JA 49 Dept. of Mechanical Engg, AJCE c.
Stepping Motor A stepping motor is a device that converts the
electrical pulses into discrete mechanical rotational motions of
the motor shaft. This is the simplest device that can be applied to
CNC machines since it can convert digital data into actual
mechanical displacement. It is not necessary to have any
analog-to-digital converter nor feedback device for the control
system. They are ideally suited to open loop systems. However,
stepping motors are not commonly used in machine tools due to the
following drawbacks: slow speed, low torque, low resolution and
easy to slip in case of overload. Examples of stepping motor
application are the magnetic head of floppy-disc drive and hard
disc drive of computer, daisy-wheel type printer, X-Y tape control,
and CNC EDM Wire-cut machine. d. Linear Motor A linear electric
motor is an AC rotary motor laid out flat. The same principle used
to produce torque in rotary motors is used to produce force in
linear motors. Through the electromagnetic interaction between a
coil assembly and a permanent magnet assembly, the electrical
energy is converted to linear mechanical energy to generate a
linear motion. As the motion of the motor is linear instead of
rotational, therefore it is called linear motor. Linear motors have
the advantages of high speeds, high precision and fast response. In
the 1980s, machine tool builders started using linear motors with
the common motion control
50. CAD/CAM Module 2 AM/JA 50 Dept. of Mechanical Engg, AJCE
servo drives in the machine tool design. Among different designs of
linear motors, permanent magnet brushless motors demonstrate a high
force density, high maximum speed, and stable force constant. The
lack of a brushed commutator assembly has the advantages of fewer
maintenance, higher reliability and better smoothness. An iron core
brushless linear motor is similar to a conventional brushless
rotary motor slit axially and then rolled out flat. The unrolled
rotor is a stationary plate consisting of magnets tiled on an iron
back plate and the unrolled stator is a moving coil assembly
consisting of coils wound around a laminated steel core. Coil
windings are typically connected in conventional 3 phase
arrangement and commutation is often performed by Hall-effect
sensors or sinusoidal. It has high efficiency and good for
continuous force. An ironless linear motor consists of a stationary
U shaped channel filled with permanent magnets tiled along both
interior walls. A moving coil
51. CAD/CAM Module 2 AM/JA 51 Dept. of Mechanical Engg, AJCE
assembly traverses between two opposing rows of magnets.
Commutation is done electronically either by Hall-effect sensors or
sinusoidal. The ironless linear motor has the advantages of lower
core mass, lower inductance and no cogging for smooth motion as the
ironless motors have no attractive force between the frameless
components. Mechanical Components of Driving System The drive units
of the carriages in NC machine tools are generally the screw &
the nut mechanism. There are different types of screws and nuts
used on NC machine tools which provide low wear, higher efficiency,
low friction and better reliability. (1) Recirculating ball screw
The recirculating ball screw assembly shown in figure 25.1 has the
flanged nut attached to the moving chamber and the screw to the
fixed casting. Thus the moving member will move during rotational
movement of the screw. These ball screw designs can have ball gages
of internal or external return, but all of them are based upon the
"Ogival" or "Gothic arc". In these types of screws, balls rotate
between the screw and nut and convert the sliding friction (as in
conventional nut & screw) to the rolling friction. As a
consequence wear will be reduced and reliability of the system will
be increased. The traditional ACME thread used in conventional
machine tool has efficiency ranging from 20% to 30% whereas the
efficiency of ball screws may reach up to 90%.
52. CAD/CAM Module 2 AM/JA 52 Dept. of Mechanical Engg, AJCE
Figure 25.1: Recirculating ball screw assembly There are two types
of ball screws. In the first type, balls are returned through an
external tube after few threads. In another type, the balls are
returned to the start through a channel inside the nut after only
one thread. To make the carriage movement bidirectional, backlash
between the screw and nut should be minimum. One of the methods to
achieve zero backlash is by fitting two nuts. The nuts are
preloaded by an amount which exceeds the maximum operating load.
These nuts are either forced apart or squeezed together, so that
the balls in one of the nuts contact the opposite side of the
threads.
53. CAD/CAM Module 2 AM/JA 53 Dept. of Mechanical Engg, AJCE
These ball screws have the problem that minimum diameter of the
ball (60 to 70% of the lead screw) must be used, limiting the rate
of movement of the screw. Roller screw Roller screw These types of
screws provide backlash-free movement and their efficiency is same
as that of ball screws. These are capable of providing more
accurate position control. Cost of the roller screws are more
compared to ball screws. The thread form is triangular with an
included angle of 90 degrees. There are two types of roller screws:
planetary and recirculating screws. Planetary roller screws:
Planetary roller screws are shown in figure 25.3. The rollers are
threaded with a single start thread. Teeth are cut at the ends of
the roller, which meshes with the internal tooth cut inside the
nut. The rollers are equally spaced around and are retained in
their positions by spigots or spacer rings. There is no axial
movement of the rollers relative to the nut and they are capable of
transmitting high load at fast speed.
54. CAD/CAM Module 2 AM/JA 54 Dept. of Mechanical Engg, AJCE
Recirculating roller screws: The rollers in this case are not
threaded and are provided with a circular groove and are positioned
circumferentially by a cage. There is some axial movement of the
rollers relative to the nut. Each roller moves by a distance equal
to the pitch of the screw for each rotation of the screw or nut and
moves into an axial recess cut inside the nut and disengage from
the threads on the screw and the nut and the other roller provides
the driving power. Rollers in the recess are moved back by an edge
cam in the nut. Recirculating roller screws are slower in
operation, but are capable of transmitting high loads with greater
accuracy. Feedback Devices The feedback system is also referred to
as the measuring system. It uses position and speed transducers to
continuously monitor the position at which the cutting tool is
located at any particular instant. The MCU uses the difference
between reference signals and feedback signals to generate the
control signals for correcting position and speed errors. In order
to have a CNC machine operating accurately, the position values and
speed of axels need to constantly updated. Two type of feedback
devices are generally used, position feed back and velocity feed
back devices Encoders An encoder is a device that converts
information from one format or code to another, for the purposes of
standardization. The encoder is a transducer that is connected
directly to the rotor or the lead screw and hence is the simplest
arrangement requiring no additional gearing. An optical rotary
encoder converts the rotary motion of the motor into a sequence of
digital pulses. The pulses counted to convert to the position
measurement. The optical encoder consists of a disc with a number
of accurately etched equidistant lines or slots along the
periphery. The encoder disc is attached to the shaft of the machine
whose rotary position needs to be measured. The disc is placed
between a light source and a light-measuring device. When the disc
rotates the lines are interrupted and the light-measuring device
counts the number of times the light is interrupted. By a careful
counting and appropriate calculations it is possible to know the
position traversed by the shaft.
55. CAD/CAM Module 2 AM/JA 55 Dept. of Mechanical Engg, AJCE An
incremental optical encoder (left-hand diagram in Figure 6.12) is a
disc divided into sectors that are alternately transparent and
opaque. A light source is positioned on one side of the disc, and a
light sensor on the other side. As the disc rotates, the output
from the detector switches alternately on and off, depending on
whether the sector appearing between the light source and the
detector is transparent or opaque. Thus, the encoder produces a
stream of square wave pulses which, when counted, indicate the
angular position of the shaft. Available encoder resolutions (the
number of opaque and transparent sectors per disc) range from 100
to 65,000, with absolute accuracies approaching 30 arc-seconds
(1/43,200 per rotation). Most incremental encoders feature a second
light source and sensor at an angle to the main source and sensor,
to indicate the direction of rotation. Many encoders also have a
third light source and detector to sense a once-per-revolution
marker. Without some form of revolution marker, absolute angles are
difficult to determine. A potentially serious disadvantage is that
incremental encoders require external counters to determine
absolute angles within a given rotation. If the power is
momentarily shut off, or if the encoder misses a pulse due to noise
or a dirty disc, the resulting angular information will be in
error.
56. CAD/CAM Module 2 AM/JA 56 Dept. of Mechanical Engg, AJCE
The absolute optical encoder (right-hand diagram in Figure 6.12)
overcomes these disadvantages but is more expensive. An absolute
optical encoder's disc is divided up into N sectors (N = 5 for
example shown), and each sector is further divided radially along
its length into opaque and transparent sections, forming a unique
N-bit digital word with a maximum count of 2N 1. The digital word
formed radially by each sector increments in value from one sector
to the next, usually employing Gray code. Binary coding could be
used, but can produce large errors if a single bit is incorrectly
interpreted by the sensors. Gray code overcomes this defect: the
maximum error produced by an error in any single bit of the Gray
code is only 1 LSB after the Gray code is converted into binary
code. A set of N light sensors responds to the N-bit digital word
which corresponds to the disc's absolute angular position.
Industrial optical encoders achieve up to 16-bit resolution, with
absolute accuracies that approach the resolution (20 arc seconds).
Both absolute and incremental optical encoders, however, may suffer
damage in harsh industrial environments. Morie Fringes High
precision linear displacement measurements can be made with Moire
Fringes, as shown in See The Moire Fringe Effect. Both of the
strips are transparent (or reflective), with black lines at
measured intervals. The spacing of the lines determines the
accuracy of the position measurements. The stationary strip is
offset at an angle so that the strips interfere to give irregular
patterns. As the moving strip travels by a stationary strip the
patterns will move up, or down, depending upon the speed and
direction of motion.
57. CAD/CAM Module 2 AM/JA 57 Dept. of Mechanical Engg, AJCE
The Moire Fringe Effect A device to measure the motion of the moire
fringes is shown in See Measuring Motion with Moire Fringes. A
light source is collimated by passing it through a narrow slit to
make it one slit width. This is then passed through the fringes to
be detected by light sensors. At least two light sensors are needed
to detect the bright and dark locations. Two sensors, close enough,
can act as a quadrature pair, and the same method used for
quadrature encoders can be used to determine direction and distance
of motion.
58. CAD/CAM Module 2 AM/JA 58 Dept. of Mechanical Engg, AJCE
Digitizer A digitizer is the most widely used input medium by the
CAD designer. It is used for converting the physical locations into
coordinate values so that accurate transfer of data can be
achieved. A digitizing tablet is considered as a pointing and
locating device. It is a small, low- resolution digitising board
often used in conjunction with a graphics display. The tablet is a
flat surface over which a stylus or a puck can be moved by the
user. The close resemblance of the tablet and stylus to paper and
pencil contributes to its popularity as an input device. The puck
contains a rectile and at least one pushbutton. The engraved
cross-hairs of rectile help locate a point for digitising. Pressing
the pushbutton sends the coordinates at the cross-hairs to the
computer. The sizes of digitising tablets range from 11 x 11 to 36
x 36 inches. The resolution of a tablet is 0.005 inch or 200 dots
per inch. The tablet operation is based on sensitising its surface
area to be able to track the pointing element (stylus or puck)
motion on the surface. The surface of the tablet is magnetised and
is embedded with wires in the x and v directions. The physical
motion of the stylus is converted by the wires into a digital
location signal, which is then routed to the computer and displayed
on the graphics terminal. Measuring Motion with Moire Fringes These
are used in high precision applications over long distances, often
meters. They can be purchased from a number of suppliers, but the
cost will be high. Typical applications include Coordinate
Measuring Machines (CMMs).
59. CAD/CAM Module 2 AM/JA 59 Dept. of Mechanical Engg, AJCE
With Digitizer, you can read in a bitmap, define axes and click on
data points. The program will convert the pixel coordinates to plot
coordinates and can save them to a tab-delimited text list. Copy
and Paste ar