PLC on a chip - fact or fantasy?
What is
a Programmable Logic Controller? It is a highly specialised industrial
computer, running highly specialised software designed for ease
of use and reliability in the industrial control environment. At
heart it is just another variety of computer running software, says
Chris Hazlewood, product manager at Mitsubishi
COMPUTERS
AND SOFTWARE ARE EVOLVING at a terrifying rate and the PLC is
no exception. Amongst the most exciting developments are Soft Logic,
embedded PLCs, Windows CETM and JAVA-based embedded controllers.
There has been a lot of debate recently about whether PLCs could
be replaced by Soft Logic (a PC running a program that performs
the function of a PLC), but most of this ignores the fact that a
huge proportion of the market for PLCs is for so called 'Micro PLCs'.
These are PLCs
with small numbers of I/O designed to control, say, a pump topping
up a tank or a sausage slicing machine. For these applications,
many of which are stand alone, the complexity and overhead cost
of a PC cannot be justified. Furthermore, the major benefits of
screen and keyboard have no value in unattended installations where
an operator interface is not required. Also, the present rather
unstable operating systems for PCs leave a lot to be desired, especially
for such unattended locations where a re-boot could mean a journey
to a remote site during the night.
Soft Logic
has its market, but it lies in medium to large control installations
where the operator interface of the PC is appreciated, where links
to corporate IT systems and archiving to hard disk is a benefit,
where networking is involved and where an alternative to the PLC
solution is considered an important element. Change in the micro
PLC market will come from a quite different quarter: embedded control.
What is an
embedded control? This comes from a device that has been stripped
down to its essential components and suitably packaged for building
directly into a product needing control facilities. At the extreme
it could be a PLC or PC on a chip. It is often assumed that this
is the domain of PC/104, the new emerging standard which effectively
minimises the deployment of the traditional computer onto a circuit
board the size of a beer mat. Manufacturers of these products believe
this is the future of control technology.
Rugged controllers
But let's not
forget that PLC manufacturers have been developing and will continue
to develop small, faster, and wholly more rugged control products
not only for the present, but for five years, ten years and 20 years
hence. The question we should actually be asking is not "Will the
PC replace the PLC?" but probably "What technology will be absorbed
in tomorrow's industrial controllers?"
To answer this
we really need to look in more detail at what problem we really
want to solve: how to make effective embedded control which allows
development, expansion and maintenance, while still performing its
core but essential task of controlling! So what would we expect
to see performing the task of embedded control today? Usually, the
device would be packaged in a small PCB sub-assembly, probably with
a plastic case, that can conveniently be built into a product needing
control. The concept will be familiar to designers involved with
the development of consumer durables such as washing machines, TVs
and video recorders which commonly use embedded micro controllers.
However, embedded
micro controllers are typically fixed function, with the program
built-in by the maker. Programs are normally written using C++ applications
and are then compiled to suit the target device. This approach is
practical because the products normally require no variation from
unit to unit.
But industrial
machine makers will often need to customise individual machines,
and that usually means customising real-time programs. Recently,
some manufacturers of industrial PLCs have offered a PLC programmed
in C, but there are inherent technical issues with this.
Essentially,
C++ is a non-starter for an electrical engineer commissioning a
one-off machine in his customer's factory in a foreign country.
For real-time user programming, you need a familiar high level language
such as traditional ladder logic, or more recently, the flexible
structured text and sequence function charts of IEC1131-3. Fortunately,
these languages can now be implemented conveniently in PC programming
tools, so if you create a device that can run the resulting code,
you have the PLC on a chip concept described above.
In fact, if
you look closely inside a micro PLC, you will find a PLC on a chip.
The challenge is to make the device 'OEM friendly' by packaging
it so that an OEM can assemble it into his product conveniently
and without risk of damaging it, but without adding significant
cost or size. Accomplish that and you have an embedded controller
that can be programmed like a PLC. More accurately, you have a full
strength PLC packaged like a micro controller.
Tiny PLC
An
example is the Mitsubishi MELSEC FX2NC. In a housing just 30mm by
90mm by 75mm, this PLC packs 16 inputs and 16 outputs and has space
for 8K program steps in RAM, plus an optional 16K program steps
in EPROM. Up to 256 I/O can be supported in larger housings. To
program it, OEMs simply use the familiar MM+ or PCS WIN programming
tools that they use for the full size PLCs. Ladder logic, and even
IEC61131 to some extent, were developed to suit historical approaches
to programming industrial controllers. IEC61131 also bravely tried
to help the user by developing a common programming language which
could be ported across PLC vendors. But not all IEC61131 compliant
software stores programs on the hard disk in the same way - and
not all compliant software has all manufacturers' drivers. The ability
to take a program written for a PLC from one vendor and run it on
a PLC from another vendor is still a long way off. In the IT industry,
market pressure for applications that will run on Mac, PC or UNIX
platforms, or other environments such as the Web has given rise
to Java byte code. Java provides truly platform-independent code,
because the programming interface has been removed from the direct
control of the hardware. It is also highly re-usable because it
is object oriented and because its structure breaks code into discrete
component applications.
But Java is
more than a programming environment. Essentially users develop their
program as a Java application which then calls in resources or classes
to do certain specific tasks. Each class is only accessed as and
when it is needed, and if not in use it is discarded. The active
class in turn triggers the native code on the JVM to enable the
action or event to occur. The example shown supposes the user's
program calls the Java.net class which in turn triggers the TCP/IP
functions of the JVM to be used.
Where's the
advantage in this? Well, the Java code is compiled into standard
byte code which is then interpreted by the JVM. This means there
is no need to write code to suit a specific chipset, but just to
stick to the standard and have truly portable applications. If you
are struggling to picture this in your mind, think of the classes
as a similar concept to DLLs, except the Java classes operate directly
with a chip's lower level services.
Java is not
the answer to everything but it does offer us all some interesting
alternatives!
- Mitsubishi
Electric
Email c113@industrialnetworking.co.uk
|