Professional Documents
Culture Documents
Chapter 2
Computers and Control
- Mechatronic Systems
A Summary...
An overview and history of industrial computer control systems. General-purpose
computer systems adapted for process and system control. Specialised computer
control systems (micro-controllers, Computer Numerical Controllers (CNC) and robot
controllers). Industrial computer interfaces for process control - the Programmable
Logic Controller. Mechatronic elements and systems - servo motors, transfer lines,
FMS, etc.
Digital to Energy
Scaling or
Analog Isolation Conversion
Amplification
Conversion (Actuators)
Computer External
System
Analog
to Digital Energy
Protection Scaling or Isolation
Conversion Conversion
Circuits Amplification
(Transducers)
Unfortunately for early system designers, the cost of control computers was
relatively high and so, as a result, only the most expensive and complex processes were
generally considered for computerisation. The cost of applying computers to simple
control systems was prohibitive and so designers had to add to their professional skills
by first tackling the worst possible problems, with few experts to turn to for advice.
Typical applications included:
All of these types of computer applications can be classified under the umbrella of
"real-time control" and all suffer from similar problems. The problems include:
(i) The need to extract information from hundreds of sensors and energy
transducers
(ii) The need to process incoming information in "real-time" (ie: before the
next change of information occurs)
(iii) The need to output signals to hundreds of sensors and transducers.
Typical computer control systems in the 1970s had an architecture of the form
shown in Figure 2.1. This is commonly referred to as a "hierarchical" control
architecture. It is composed of an intelligent control device (computer), referred to as
the host, and a number of unintelligent slave devices (sensors, transducers, actuators,
amplifiers, etc.) that together make up a functioning system.
Computers and Control - Mechatronic Systems 15
Control Computer
(Host)
Input/Output
Interfacing Boards
Sensor 1 Transducer 1
This level of functionality was a radical departure from the traditional concept of
computing that had developed in the late 1950s and throughout the 1960s. Computers
had to become devices that could execute programs within a given time-frame and
interact with the outside world to an extent that had previously been difficult to
imagine.
16 D.J. Toncich - Computer Architecture and Interfacing to Mechatronic Systems
In the 1950s and 1960s, operating systems were really designed so that large
computer systems (main-frames) could process office data, entered on punch-cards
(known as Holorith cards), as efficiently as possible. The basic principle was that it
didn't really matter which data the computer processed first as long as, over a given
time-period (eg: one day), the total amount of information processed was maximised.
A small amount of task prioritisation was allowed, but in general, operating systems
tended to treat all data in terms of "files". In strict terms, a file was a quantum of data
stored on either magnetic disk or ferrite-core memory. However, the changing nature
of data input and output (from punch-cards and print-outs through to video terminals
and serial communications links) could not readily be accommodated in terms of the
older operating systems. The operating systems were therefore modified to consider
newer forms of data as though they were files (even though they were physically
something else).
Although the concept sounds rather convoluted, treating all inputs and outputs as
though they were files on a disk worked satisfactorily in the office but it became
unwieldy for control purposes. If inputs and outputs related to an external system
under control were treated as though they were files, then they were subject to the same
level of prioritisation as files. In simple terms this meant that the operating systems
associated with office computing could not deliver the time responses required for real-
time control. In other words, it could take the older computers longer to process data
from external systems than it may take for the data to change - information could be
lost.
One of the first organisations to recognise the limitations of the older style
computer architectures and operating systems was the Digital Equipment Corporation
(DEC). Their response was to develop a range of computers that are still revered today
for their innovative hardware and software. The computer range was given the title
prefix PDP-11 and was really the first computer series that engineers would claim for
themselves.
Computers and Control - Mechatronic Systems 17
Several factors made the DEC PDP-11 series revolutionary in its time (and led to
its survival for some 20 years). The first was an innovative hardware design that
simplified the control system development task for engineers through an enormous
range of powerful instructions. The second advantage of the PDP-11 was that the
company began to produce a range of products that enabled the computer to interact
with the outside world, at a time when other manufacturers were still producing
computers that worked in isolation. The third major advantage of the PDP-11 was its
new operating system, specifically designed for real-time control applications. The
operating system was given the acronym RSX-11 and also endured for some 20 years.
The DEC PDP-11 series of computers became a bench-mark for digital control
systems and were widely used in the complex types of applications cited earlier.
Indeed, even in the 1980s (when computer processing costs had diminished), system
designers still worked with the sort of hierarchical control architecture made popular
(and feasible) by DEC. However, by the mid-1980s, the cost of microprocessor chips
and microprocessor-based devices (including personal computers) had plummeted and
a new trend in both computing and control emerged.
Host Computer
(Event Scheduler)
Data
Communications
Links
The idea of distributed control is to make each local control unit modular and
simple so that the overall control system becomes more robust than one large and
complex system. This means that the host system can be a much smaller computer
than would be required for a hierarchical control system. The collective cost of the
smaller host computer and the local processors can be comparable, or lower, than the
cost of one large computer. Moreover, when a local processor fails, it is often much
more cost effective to replace it entirely than it is to repair a mid-range or mainframe
computer.
The distributed control architecture concept can be further extended to the point
where there is no longer a need for a host computer. In other words, a system is
controlled by a collection of computers (processors) that all work together in order to
achieve some particular objective. This is referred to as a "heterarchical" control
structure and is shown schematically in Figure 2.3. This is a departure from the other
two computer control architectures in the sense that there is no coordinating device in
the control system. The structure is sometimes referred to as a "functionally
decomposed" control architecture, since all control functions have been devolved down
to local devices. The heterarchical control system looks interesting and has a number
of characteristics in common with the way in which the human brain operates - that is,
as a collection of equally intelligent nodes operating together for some common
purpose.
Computers and Control - Mechatronic Systems 19
The problem with the heterarchical control architecture is that it makes the
development of control software rather difficult because no single node has a
coordinating role. This really requires a new way of thinking and many modern system
designers are graduates of the hierarchical control school and have difficulty in
translating their existing techniques to heterarchical control. Over and above the
problems related to the development of control systems in heterarchical structures,
there is the issue of networking. Networking has always been one of the irritating
bottlenecks in the development of digital computers and computer control systems.
Since the need for networking emerged in the 1970s, the progress towards
standardisation has been painfully slow. In the case of heterarchical control systems,
the networks form the backbone for communications between devices and are critical
to the success or failure of the system. However, the speed of communications
between devices across a network has always been a limiting factor in the use of
heterarchical control.
The first point to note about the PLC's heritage is that it was originally developed
as a "tradesman's tool" rather than the "professional's tool" that the traditional office
computer was designed to be. For this reason, a great deal of emphasis in early PLC
design was to create a programming language that was best understood by industrial
electricians rather than professional programmers. This language became known as
"relay-ladder-logic" and can still be found today on older equipment. The second point
to note about the PLC is that it was always designed as a computerised device with
extensive input and output facilities that were very rare in traditional office computers.
PLCs are now amongst the most prolific of all modern industrial control systems.
They are used for a wide range of applications and are very diverse in their capabilities.
A PLC is shown schematically at its simplest level in Figure 2.4.
Voltage Voltage
Inputs Outputs
Current Current
Inputs Outputs
"If Input A is high and Input B is greater than 50 volts, then delay 10 seconds and
then set Output C to High."
The starting point in PLC design was to give the devices the ability to perform
such functions with minimum programming effort. Moreover, to enable the industrial
electricians who once created relay ladders to program the newer technology PLCs.
The inherent ability of PLCs to perform such functions makes them ideal for sequential
control functions where (say) a number of hydraulic and pneumatic actuators and
sensors have to be governed. For example, the opening and closing of safety doors or
the switching of fluid pumps in a production system.
Modern PLCs are relatively inexpensive items, which are industrially rugged in
design and extremely modular in structure. It is commonplace to buy a Central
Processing Unit PLC, together with any number of bus-connected Input/Output (I/O)
modules. This allows both simple and complex machines to be based upon the same,
basic PLC unit. An Original Equipment Manufacturer (OEM) may choose to design a
machine using a basic PLC system (with say 10 to 20 inputs and outputs) and then
purchase expansion I/O modules as customer, design requirements change.
Many modern PLCs are sold with specialised implementations of the BASIC
programming language as a built-in feature. This allows a much more sensible and
structured approach to system design to be used. It has also been a logical step, since
the proliferation of Personal Computers meant that more and more technical people
were comfortable with the concept of programming in a language, rather than using
diagrams. In recent years, PLCs have now become available with specialised "C" or
"PASCAL" compilers, that allow complex program development for control
applications.
22 D.J. Toncich - Computer Architecture and Interfacing to Mechatronic Systems
Despite the availability of high-level languages on PLCs, they still remain very
much a "tradesman's tool". PLCs are generally weak in terms of their ability to carry
out complex computations and control algorithms. The real strength of the PLC is in
its ability to interact with high voltage and current inputs and outputs. Moreover, since
PLCs are designed in a modular (building-block) manner, an enormous range of energy
conversion transducers can be used to turn PLC outputs into useful drivers for
mechatronic equipment. For example, PLCs can readily be connected to a range of
solenoids and pneumatic actuators to convert a voltage output into a mechanical
movement.
The functionality of the PLC makes it ideal for controlling sequential "event-
oriented" systems such as conveyors, dedicated transfer machining lines and so on.
However, the ability of the modern PLC to communicate with higher level computer
systems through a data communications link or network has made it into a useful
processing device for distributed control. Figure 2.5 illustrates a commonly used
distributed control system (similar to that shown in Figure 2.2) in which the PLCs are
responsible for interacting with the outside world while the host computer system
carries out some complex control algorithm.
Host Computer
(Control Algorithm)
Data
Communications
Links or Network
The distributed system of Figure 2.5 enables the PLCs to input information from
hundreds of external sources, carry out minor processing on that information and then
feed it as control input data to the host computer. Once the host computer has
calculated the next set of required outputs (as determined by the control algorithm) it
sends the information to the PLCs via the communications links or network. The PLCs
are then responsible for creating the high current or voltage output.
Computers and Control - Mechatronic Systems 23
The problem with the sort of architecture shown in Figure 2.5 is that the
commonly used data communications links and networks are relatively slow. If, for
example, the system shown therein was used for some form of continuous process
control (such as in a power station or chemical plant) then the communications link
between the PLC and the host computer could form an unacceptable bottle-neck in
terms of data flow. For this reason, a number of PLC manufacturers are now
developing devices that have a much closer coupling to the host computer system so
that the external communications link can be avoided. This form of design involves
connecting the PLC directly into the internal architecture of the host computer system
and is referred to as a "back-plane" connection.
The range of PLCs currently on the market is quite extensive and can include
small devices costing less than a personal computer up to large systems costing more
than most mid-range computer systems. Simple PLCs have an appearance similar to a
programmable pocket calculator - however, the PLC is equipped with a number of
high-voltage, high-current input/output terminals which are used for interaction with
the outside world. These systems are useful for simple sequential control.
The criteria typically used to select a PLC for a particular application include the
following:
Overriding the technical factors are the always considerable political factors,
which cause a company to choose a PLC vendor based upon conformance with other
systems already installed in a plant. This reduces the need for maintenance personnel
to become familiar with a wide range of programming languages and implementation
techniques.
24 D.J. Toncich - Computer Architecture and Interfacing to Mechatronic Systems
There are many ways in which an element can be moved from one position to
another. Older industrial systems traditionally used hydraulics and pneumatics to
propel mechanical elements. For centuries, mechanical clocks have used springs for
energy and gears to index the arms with a relatively high degree of accuracy. However,
in modern industrial systems the most common approach is to use electromagnetic
techniques - that is, electric motors whose rotational positions can be accurately
controlled. Rotational movement is transformed into linear motion by driving simple
"screw-feeds" or low-friction, low-backlash, recirculating ball-bearing, screw-feeds
(ball-screw-feeds).
Those who are unfamiliar with the intricacies of electric motors will assume that
the only function of a motor is to rotate continuously within a required velocity range.
However, when we talk about the accurate positioning of a robot arm or CNC machine
axis, we are really talking about motors that are designed to rotate a fraction of a
revolution and then stop. The actual motors used for these applications are similar to
the a.c. and d.c. motors that rotate continuously in other electrical machinery - the
difference is in the way they are controlled.
There are essentially two types of motor control systems that can be used for
accurate positioning of mechanical elements:
The stepper motor system is based upon a special type of motor that rotates
(indexes) by a fraction of a revolution each time a voltage pulse is applied to one of its
windings. Unlike traditional motors, the stepper motor does not rotate smoothly but
rather, steps from one position to another and hence its name. The overall stepper drive
system is shown schematically in Figure 2.6. Stepper motors were originally used for
small scale applications such as in printers, plotters, etc. However, they are now also
used in industrial applications where the mechanical load on the motor is known (and
stable). Although the control principles are similar, the industrial systems tend to be
referred to as "indexers" in commercial literature.
Computers and Control - Mechatronic Systems 25
Voltages
Representing
Stepper Motor Drive
Required Position
Electrical
Outputs
Mechanical
Stepper Motor
Output
The nature of the actual stepper motor drive can vary considerably. For very
small motors, the drive can be implemented on a single silicon chip. On large systems,
the stepper motor drive has to include power electronics and cooling fins to dissipate
heat and hence has to be implemented on a circuit board, with discrete transistors and
digital circuits.
The fundamental limitation of stepper motors arises when they are used as shown
in Figure 2.6 - that is, as "open-loop" devices. If the load on the motor shaft is larger
than the torque generated by the electrical energy input to the motor windings, then the
motor will not index from one position to another in a predictable manner. The
absolute positioning characteristic of the motor is therefore lost. As a result, open-loop
stepper motors are only used in situations where the load is always well defined - for
example, in parts transfer (shuttle or indexing) systems where the maximum load on the
motor can be calculated during the system design phase. A stepper motor, running in
"open-loop" mode would be inappropriate for positioning a cutting tool, since the load
caused by tool could vary substantially depending on the work-piece properties and
amount of material being removed.
Some stepper motor controllers can function in a closed-loop, where the position
of the motor shaft is fed back to the controller from a resolver or position encoder.
However, once these devices are converted into closed-loop systems, then they lose
their cost advantage over traditional servo drives that can provide a "smoother"
rotation.
26 D.J. Toncich - Computer Architecture and Interfacing to Mechatronic Systems
The servo motor system is the embodiment of classical control theory and
operates in a closed loop that enables the controller to drive the motor according to its
current velocity or position. The traditional servo motor system is shown in Figure 2.7.
It is composed of:
Electrical Energy
Input
Input voltage
proportional to
required position
Servo Drive
(Controller)
Electrical
Position
Energy
Feedback
Output
Encoder
Mechanical
or a.c. or d.c Motor
Output
Resolver
The servo drive is an electronic device that is used to provide a regulated flow of
electrical energy from an external power supply to the motor, based upon the difference
between a specified voltage signal (the set-point or reference position) and the feedback
signal from the encoder or resolver on the motor shaft. This provides closed-position
loop control of the shaft.
Computers and Control - Mechatronic Systems 27
A number of servo motor systems have servo drives that do not provide closed-
position loop control. Instead, their purpose is to provide closed-velocity-loop control.
In these systems, the servo drive provides an output proportional to the difference
between the actual velocity of the motor and a specified voltage signal (the set-point or
reference velocity). In servo drives such as this, the velocity feedback can either be
obtained by differentiating the position feedback signal (readily achieved in both
analog and digital servo drives) or from an additional element known as a tacho-
generator. A tacho-generator is a d.c. machine that is mounted onto the same shaft as
the main motor and provides an output voltage proportional to the speed of rotation of
the shaft. This closed-velocity loop form of servo drive is shown in Figure 2.8.
Electrical Energy
Input
Input voltage
proportional to
required velocity
Servo-Drive
(Controller)
Electrical
Position Velocity
Energy
Feedback Feedback
Output
Encoder Tacho-
Mechanical
or Generator a.c. or d.c Motor
Output
Resolver
The "velocity" terminology in regard to servo drives will cause some annoyance
to those concerned with engineering etiquette. Strictly, of course we are referring to
the speed of rotation (not velocity). However, this speed is normally directly related to
the linear velocity of some end-effector and so the terms tend to be used
interchangeably.
The closed-position and closed-velocity loop servo drives both have roles to fulfil
in industrial applications. The closed-position loop system is most useful where only
one independent axis of movement is required in order to move some element or "end-
effector" to a given position. However, where two or more motors are used to drive an
end-effector to a given position, the axes are often interdependent. The path taken to
reach that position also needs to be controlled through the velocities of the servo
motors.
28 D.J. Toncich - Computer Architecture and Interfacing to Mechatronic Systems
The difference between velocity and position control is best demonstrated with a
simple "XY" machine, as shown in Figure 2.9 (a), where one motor controls X
movement and the other controls Y movement. Figure 2.9 (b) shows two paths taken
by the end-effector in order to reach the point "P". Path (i) is obtained using velocity
control of servo motors so that a straight line is generated between the starting point
and the final destination. This is called "linear interpolation". Path (ii) is what can
result from using two position controlled servo motors, which each attempt to reach
their final positions independently. In path (ii) it is clear that the "X" movement is
faster than the "Y" movement and hence when the X motor reaches its final position,
the Y motor still has to continue for some time. Since it is obviously not possible to
have "total velocity control" over a motor, because of acceleration and deceleration,
most multiple-axis machines (robots and CNCs) use a dual feedback loop arrangement
incorporating both velocity and position.
End-Effector
Position
X
Drive
Y Y
Drive
X
(a)
Y
P
(i)
(ii)
X
(b)
There are many different types of servo drive control available for industrial
applications. The first distinction between drives is that some are designed for d.c.
motors and others are designed for a.c. motors (induction and synchronous motors).
Direct current motors are much simpler to control than alternating current motors but
cost considerably more and are less reliable. As a result of technology limitations,
older servo drives were only designed to control d.c. motors and a.c. drives did not
emerge until the 1980s.
The older types of servo drives (both d.c. and a.c.) are analog in nature and are
characterised by the fact that the circuit boards are relatively bulky. Modern drives
utilise digital technology to control the power flow to the motors and as a result, less
"waste" heat is generated and hence the drives can be much smaller. Traditional servo
drives did not have any in-built "intelligence" and could thus only carry out simple
forms of closed-loop control. The most prolific form of control was (and still is) the
so-called Proportional-Integral-Differential or PID control which is a classical, closed-
loop control methodology.
In recent years, servo drives have also begun to utilise the low-cost processing
power that has become available through microprocessors and Digital Signal Processors
(DSPs). This enables manufacturers to design servo drives that can "intelligently"
control the flow of energy to the motors through some complex algorithm. A number
of commercially available indexers (stepper motors) are now also equipped with
microprocessor control. In addition to allowing a broader range of control algorithms
to be implemented (in addition to PID), the on-board processor can also allow the servo
drive controller to be networked, so that it will respond to positioning or velocity
commands.
Servo motors and drives, both a.c. and d.c., are not only the basis for a great
range of modern machinery design but are also contributors to the improved factory
environment that now exists in many Western countries. Servo drive systems are much
quieter than hydraulic and pneumatic systems and considerably reduce noise emission
levels in the factory when they replace these older drive systems in low power
applications (up to a few kilowatts). The servo motors not only provide quieter
operation but also the ability to position elements with a high degree of accuracy over
an entire range of displacements. Hydraulic and pneumatic systems, on the other hand,
tend to be used only for point to point positioning and are not suitable for graduated
positioning. However, the hydraulic and pneumatic drives still have advantages in
situations where extremely high forces need to be applied to move actuators or end-
effectors from one position to another.
30 D.J. Toncich - Computer Architecture and Interfacing to Mechatronic Systems
The CNC machine is very much a "fish out of water" in the worlds of computing
and manufacturing. CNC has never provided a full-fledged computer control system
(in the way most engineers would understand it) and the machines which are controlled
by CNC are still designed like machines that should be manually driven. Robotics on
the other hand, benefited enormously by arriving at a more opportune "technological
time" after suitable electronics and processing became available to provide sensible
controls.
In the middle of the twentieth century, the majority of lathes and mills were
manually driven by operators that moved axes by turning hand-wheels. The axes were
composed of "screw-feeds" that were used to move some end-effector (such as a
cutting tool or work-piece fixture) so that the work-piece could be processed. These
machines were designed around a rudimentary, geometric axis system (based on either
orthogonal or cylindrical coordinates) so that the operators could easily relate the
required geometry of a work-piece to the movement of a single hand-wheel on the
machine.
The most logical first step in automating these machines in the 1950s was to
replace each of the manual hand-wheels with a servo motor drive. Initially, the servo
motor drives were all connected to a controller, known as a Numerical Controller or
NC, that would cause each of the drives to move, based on a punched, paper-tape
program. Considering the high cost of computing in the 1950s, these machines
provided an extremely good mechanism for automated processing of work-pieces.
Unfortunately however, as computer technology evolved and low cost microprocessors
proliferated in the 1970s, NC became Computer Numerical Control or CNC, with little
revision of the fundamental concepts. CNC is conceptually little more advanced than
NC and its basic advantage is that it provides the ability for programmers to enter, edit
and simulate cutter paths on the controller itself.
Few people question the design of CNC machines. As with many other industrial
systems, features that were ill-designed due to lack of technology have remained as
industry standards, long after the enabling technologies have emerged. There are many
other limitations that have arisen in CNC, in terms of the design of the computer
control itself. Many CNCs are still designed as though machines were intended to exist
in isolation from other computers and the outside world - that is, as "islands of
automation". However, in industry we now know that it is important for all computer
controllers to either receive instructions from the outside world or send data to the
outside world in order to simplify the task of factory automation.
Computers and Control - Mechatronic Systems 31
Robots, unlike CNC machines, really only came into being (on a large scale) after
the advent of microprocessors and the dawn of "low-cost" computing. Modern robot
design has therefore suffered far less from the manacles of the by-gone manual era than
has CNC machine design. As a result, robots tend to look and perform like devices
designed for a specific function using modern concepts of computer control. Even after
all the advances in CNC design, robots still tend to interact with the outside world in a
far more proficient manner than the CNCs. However, despite the obvious physical
differences between, say, an articulated welding robot and a CNC milling machine, the
principles behind the actual control systems are essentially similar. The schematics of
CNC and robot control systems are shown in Figure 2.10.
Supervisory Controller
(Executing Program)
Reference
Position
Position Feedback
Axis Controller
(Axes 1 to N)
Reference
Velocity Position Transducer
Voltage
Servo Drive End
Motor 1
Controller 1 or Current Effector
Mechanical
Coupling
Velocity Feedback
The axis controller is responsible for achieving the desired position, using
appropriate acceleration and deceleration curves. It does this by sending reference
velocities to the servo-drive controller, on the basis of the actual position that has been
achieved. As a result, a double feedback loop (velocity and position) is established.
32 D.J. Toncich - Computer Architecture and Interfacing to Mechatronic Systems
In older CNC and robotic control systems, a number of processors were used to
implement the entire control. One processor acted as the supervisory controller,
another as the axis controller and so on. In some cases, each axis had its own processor
because the task of closing the position loop was so "processor-intensive". Current
processor technologies enable a typical four axis machine to be controlled by one
microprocessor which performs all processing (supervisory, axis control, etc.) functions
in real-time through multi-tasking.
The transducers used to provide velocity and position feedback on both robots
and CNC machines vary according to the specific applications. Commonly, shaft-
mounted tacho-generators are used to provide velocity feedback and linear resolvers or
pulse-code transducers (encoders) provide position feedback.
Both CNC and robot control systems share another common trait in that they tend
to be very specialised in their design. They are optimised to achieve multi-axis control,
with minimum user programming, and hence the languages that they use tend to be
somewhat restrictive.
For historical reasons, related to early hardware limitations, CNC machines were
(and still are) traditionally programmed in a "G-Code" language. This dated system
provides a user with a number of sub-programs, commonly prefaced with either a "G",
"F", "S", or "T" and suffixed with a subroutine number or parameter. These facilitate
the movement of a cutting tool through a predefined path; the selection of a cutting tool
and so on. However, few (if any) of these languages will allow a programmer to do
more than this.
G-Code languages were never intended to provide the user with routines for
accessing various aspects of the machine controller itself and for interfacing it to the
outside world. These features, which are now both desirable and important, are
difficult or impractical to implement on CNCs. For example, with older CNCs, it is
often difficult to display user programmed screens as a part program executes. Further,
it is generally not possible to access the serial communications facilities of a CNC
through the G-Code language itself.
Computers and Control - Mechatronic Systems 33
CNC designers often attempt to augment the limited features of the G-Code
languages by running additional (concurrent) tasks on the CNC. For example, many
CNCs have programs designed to handle serial communications and remote commands,
running as tasks, while a part program executes. This type of task is referred to as a
Direct Numerical Control or DNC task/facility. It generally enables a host computer to
remotely control a CNC machine through a serial link. There are other tasks, such as
concurrent, graphic information displays, which are also added by a number of
manufacturers.
The deficiency with older forms of CNC architecture is that they ultimately
provide a closed (black) box to the end-user. It is often difficult for end-users to re-
program CNCs in order to change graphics displays, or the way in which serial
communication occurs. So, while traditional CNCs provided great flexibility in terms
of cutting and shaping materials, they generally provided very little flexibility in terms
of tailoring the user environment. Modern CNC designs, however, have improved
since the early 1990s and are gradually moving towards high-level, structured
languages and open-architecture programming capabilities.
Robot controllers have generally been better than traditional CNCs in terms of
programming flexibility. Unlike CNC machines, robots seldom, if ever, work as
devices in total isolation from other systems. They are generally linked to other
computer controlled or logic controlled mechanical systems. For example, a spray-
painting robot must be linked to the production line that feeds it with work-pieces for
painting - otherwise there can be no inter-locking between line movement and robot
cycles. As a result, programming languages on robots have tended to reflect the
systems oriented nature of these devices. However, it is far more difficult to categorise
the capabilities of robot controllers, because they are far more diverse in software
architecture than CNC systems.
CNC systems and robot controllers generally come with built-in Programmable
Logic Controllers, usually of a specialised and complementary design, and normally
produced by the CNC or robot manufacturer. The PLCs are integrated into the CNC or
robot control system, under the control of the main processor. They are used to control
a range of sundry functions requiring high voltage or current switching. For example,
on a CNC machine, the internal PLC may control the switching of coolant pumps, the
opening and closing of doors, etc. On a robot, the PLC may control the opening and
closing of grippers and the switching of inter-locked equipment. The inputs and
outputs of PLCs on both robot and CNC systems are accessible from within the robot
programming language or G-Code programming language. This scheme is shown in
Figure 2.11.
CNC Inputs
Integrated
or
Purpose-Built
Robot Control
PLC
Outputs
Servo Servo
..
Drive 1 Drive N
CNC and robot controls are generally both provided with a "hard-wire" interface
to the outside world. This provides a simple means of integrating the devices into
automated systems. In a hard-wire interface, spare inputs and outputs from the
integrated PLC are selectively connected to external devices so that they can be inter-
locked. Program execution is then made dependent upon the condition of inputs.
For example, if we wished to use a robot to feed a CNC machine with work-
pieces, a hard-wire inter-locking arrangement, such as the one shown in Figure 2.12
may be used.
Computers and Control - Mechatronic Systems 35
PLC PLC
In such a system, the CNC machine program should start execution as soon as the
robot has loaded a part (ie: when the robot program has been completed). The robot
should unload a part when the CNC machine program has ended. This can be achieved
by the robot setting output number "n" high when it completes a program (last
executable line of code) and the CNC machine setting output "x" high when it
completes a program (last executable line of code). The first lines of code on both the
CNC and robot are to wait for inputs "y" and "m", respectively to go high before
continuing.
This form of inter-locking is suitable for simple systems, but is unable to deal
with problems that occur during the execution of a robot program or CNC program.
For example, the robot may jam a component while loading the CNC machine and stop
while its grippers are still inside the machine. The CNC has no way of knowing the
actual position of the robot and so may damage the grippers. These sorts of issues can
only be resolved by having the robot and CNC intelligently communicate with one
another through a data communications link. These links require specialised
communications software packages (known as protocols) to execute on each of the
devices. Robots have been equipped with communications protocols since the early
1980s and CNCs became available with similar protocols shortly thereafter. The actual
implementation of a control system via a communications protocol is the subject of
another book and is outside the scope of this text.
36 D.J. Toncich - Computer Architecture and Interfacing to Mechatronic Systems
By the latter part of the 1980s, a number of companies had recognised the need
and potential for equipment suitable for interfacing personal computers to the outside
world. Vendors began to launch a range of "building-block" products that could be
used by engineers, with limited knowledge of computer hardware, to implement
engineering control systems. Since that time, the interfacing-board market has grown
to the extent where plug-in interfaces have almost become a commodity.
There are literally thousands of different types of products that are suitable for
mechatronic control systems in industrial and laboratory environments. In general,
these are designed to plug directly into a variety of commonly available personal
computers and workstations. At their most basic level, these interfacing boards provide
the ability for computers to input and output analog voltage signals through a number
of different channels. This is shown schematically in Figure 2.13.
Operating System
1
User Interface : Analog Outputs
Program Board
N
Interface 1
Board : Analog Inputs
Software Library
N
Figure 2.13 - Basic Interface Board Arrangement for Data-Acquisition and Control
in Analog Systems
Computers and Control - Mechatronic Systems 37
An interface board such as the one shown in Figure 2.13 would also typically
provide a library of software routines that would carry out the low level hardware
access to the input and output channels of the board. The end user can utilise these
routines in a common high-level language program such as C or Pascal without ever
understanding the complexities of the board or the processes that transfer data between
the board and the computer's memory areas. As with nearly all consumer items, the
more one pays, the more one gets. A more sophisticated version of the board could
provide protection and isolation between the external signals and the computer
hardware.
The basic arrangement of Figure 2.13 assumes that the end-user will wish to
develop control software entirely on the "host" personal computer. However, there are
many instances where the development of a control algorithm may be a case of
"reinventing the wheel". A typical example would be the implementation of a basic
PID control, where an incoming feedback signal is processed via a standard algorithm
to produce a required output signal. A number of boards are equipped with their own
"on-board" microprocessors or Digital Signal Processors that are available to carry out
basic "closed-loop" control functions. The host personal computer then essentially
becomes a development tool that provides a screen and keyboard/mouse input
arrangement. However, when the control system is fully implemented, the system
designer can develop software that will enable the personal computer screen and
keyboard to become the interface between the user and the control system. This is
shown schematically in Figure 2.14.
Figure 2.14 - Using Advanced Interface Boards with "On-Board Processors" for
Standard Closed-Loop Control Functions
38 D.J. Toncich - Computer Architecture and Interfacing to Mechatronic Systems
The concept shown in Figure 2.14 is often extended to provide more than just a
simple general-purpose control. A number of intelligent controller boards are available
for specific functions including:
To some extent, a number of plug-in boards available for personal computers and
workstations really do little more than replicate the functionality available in a
Programmable Logic Controller. There is however, one major advantage in using plug-
in interface boards in preference to PLCs and that is the fact that the interface board
connects directly into the bus structure of the host computer. This provides the fastest
possible link between the outside world and the computer. Most PLCs can only be
connected to a computer via a network or point-to-point communications link, both of
which are relatively slow for real-time control. In some instances, PLCs have evolved
to a level where there is really no difference between the functionality of an interface
board and a PLC - this is particularly true of PLCs that plug directly into the bus
structure of a personal computer or workstation in much the same way as the
arrangement of Figure 2.14.
The major disadvantage of nearly all plug-in boards (and PLCs) is their relative
cost. An interface board can often cost as much or more than the host computer
system. If the board is to be used for a "one-off" system design then this is not an
issue, since the cost of developing an interface board would be a much more expensive
proposition. However, if the objective is to develop control systems for mass
production, then clearly the off-the-shelf interfaces are unacceptable.
One of the reasons for the relatively high cost of interface boards is the fact that
they are designed to be "general-purpose". Most of the boards accept a wide range of
voltage and current inputs and can provide a wide range of output voltages and
currents. This sort of functionality is expensive. In situations where many boards need
to be produced and cost is of the essence, specialised boards with strictly limited
functionality (in other words, purpose-built) need to be designed from first principles.
The focus of this book is to help you to come to terms with the basic principles behind
the design of interfaces so that you can understand how commercial systems operate,
their limitations and the appropriateness of designing from first principles.
Computers and Control - Mechatronic Systems 39
In some cases, the decisions in regard to control system design are already fixed
by overriding physical or commercial factors. For simple controller applications, the
cost of a personal computer plus interfacing boards may be too high to make such a
solution viable. In other situations, the physical size of a personal computer and
interfacing boards precludes the use of such a solution. There are several ways to
resolve these control problems. The first is to design a complete microprocessor or
DSP based controller from first principles. This is normally the most cost-effective
solution where mass production is involved, but is expensive for low volume
applications. The other alternatives are based upon the tailoring of so-called "miniature
controllers" or "micro-controllers".
PC Workstation
Operating System Miniature Controller
µP EEPROM
Software
Serial Link
Development
Kit
A/D D/A
The difficulty, of course, lies in getting all these different types of controllers to talk to
one another so that a cohesive manufacturing system can be produced.
Annual Volume
Dedicated
Systems
100000
F.T.L.
10000
FMS with CNCs, AGVs & Robots
1000
100
Robot
Fed CNC
10
Stand-alone CNC
1
Part Variety
1 10 100 1000
The systems mapped onto the graph in Figure 2.16 have differing performance
characteristics and also place different demands upon the data communications used by
their control systems. We shall now examine the structure of each of the integrated
systems and the way in which communication between devices occurs.
The dedicated, in-line transfer machine is shown in Figure 2.17 and is a high-
volume, low part variety system. It is composed of a number of machining stations and
a transfer conveyor. Each of the machining stations is designed and tooled for a
specific application. For each station, tools are loaded into an induction motor driven,
multi-spindle cutting head, which has an advance and retract motion. When a work-
piece comes into position within a machine, the head advances for a fixed period, then
retracts, to allow the work-piece to move down-line to the next destination. Each
machining module is generally controlled by a PLC, which is hard-wired to its sensors,
coolant pumps, etc. These machining modules are generally not user-programmable
devices. They are pre-programmed to perform only a fixed task.
Supervisory PLC
PLC
Transfer Mechanism
(Conveyor)
The transport mechanism for in-line transfer machines is also a PLC controlled
device. In simple systems, the transport mechanism controller is also the system
controller, and is hard-wire inter-locked to the dedicated machining modules. In more
complex systems, a separate, high powered PLC is used to coordinate the running of
the system and drive mimic-panels and graphic information displays.
Computers and Control - Mechatronic Systems 43
Rotary transfer machines are analogous to in-line transfer machines except that
parts transfer, from machine to machine, occurs through via an indexing mechanism in
a circular path. The control principles however are almost identical.
• The amount of information which any, one machine can feed back to a
supervisor is comprised of little more than off/on limit-switch status
Dedicated manufacturing systems, of the type shown in Figure 2.17, fulfil a vital
role in the high-volume production of a small variety of parts. However, in order to
vary the type of part that passes through such a system, it is necessary to manually re-
tool each of the machining stations. If the type of part to be produced is radically
altered, then such systems require major re-engineering, or as is often the case,
complete replacement. Since these systems are designed for the production of a
specific item, their cost and production life are calculated on the basis of anticipated
product life.
The transfer line arrangement of Figure 2.17, whilst very fast, does not provide
the optimal transport mechanism for maximum production flexibility. Robots, Gantry
Robots and Automated Guided Vehicles (AGVs), on the other hand, provide a high
degree of transportation flexibility at the cost of production throughput. All three
devices use relatively sophisticated control systems. AGVs in particular, commonly
use a powerful PLC as a Constant System Monitor (CSM), which governs the positions
to which vehicles move.
The Flexible Manufacturing System (FMS), designed for a very wide variety of
parts, is more likely to resemble the schematic shown in Figure 2.18, rather than that of
2.17. The intelligence level of each module (machine) within the system is much
greater than that within the dedicated production line. CNC machines in sophisticated
FMS environments may even be augmented with specialised robots to transfer tools
from AGVs to machine tool carousels and vice-versa. The practicality of such systems
has long been questioned by industrialists and their reliability has been unsatisfactory.
The primary reason for this is the difficulty of creating a cohesive and robust control
system that can recover from the numerous system faults that arise when handling a
wide range of parts.
Computers and Control - Mechatronic Systems 45
AGV
CNC CNC
AGV
Programmable
Machining Modules
CNC CNC
AGV
• Coordinate (inter-lock) the role of the work-piece transport system with the
operation of CNC machines.
46 D.J. Toncich - Computer Architecture and Interfacing to Mechatronic Systems
Some of these functions can be (and sometimes are) implemented through the
hard-wire inter-locking of devices to the FMS controller, which can be a powerful PC,
PLC, workstation or mini-computer. However, FMS control is more appropriately
achieved through data communications between the controller and the other
computerised (intelligent) modules within the system. In a complex, FMS
environment, the system controller must have the capacity to interrogate other
equipment whilst programs are running. This gives the controller access to a wide
variety of information regarding the status and error-conditions of machines, thereby
allowing for intelligent decision making in the control algorithm.
Simple, hard-wiring techniques only allow devices to exchange one piece of data
per wire (say an on/off state or transducer voltage). They do not allow one computer to
transfer data files to another computer. This of course means that down-loading of
CNC machine programs from a supervisory computer cannot be achieved with the
hard-wired system alone. In simple hard-wired, FMS systems, machine programs are
normally resident in the local memories of each machine during a production run.
Programs are generally down-loaded (or file-dumped) to machines, via data
communications links, prior to the start of automatic FMS control.
One of the major benchmarks of FMS is the ability to tolerate and reconcile fault
conditions. Each module in the system performs a complex task and is therefore
subject to a large number of possible faults or errors. It is costly for an FMS controller
to shut down an entire system, simply because one machine has developed a fault. The
objective is for the controller to attempt to maintain orderly and safe system operation
even under certain fault conditions. However, as previously stated, this is far more
readily achieved in a rarefied academic environment than it ever has been in industry.