This sort of relay electromechanical control was surprisingly reliable,
though it did have its limitations. ‘The Doctor’, who writes and
dispenses an illegible prescription form, is one of my older coin
operated machines, made in 1987 with relay logic. It depended on a
number of micro-switches triggering everything in the right order. Last
year I replaced the relays with a PLC and was amazed how much simpler it
became. The accurate timers within the PLC made half the micro-switches
redundant. The machine is now much more reliable and even has a xenon
beacon that flashes when the prescription forms run out.
Digital control is so useful and so universal today
that it’s not obvious why it took so long to take over. However,
replacing cabinets full of relays with a digital equivalent was not
straightforward. Although relay logic is relatively simple, a digital
version required a surprisingly fast processor. The ladder logic used to
design relay circuits is sometimes described as an ‘IF….THEN’ high
level programming language. Each
step of the ladder consists of a series of virtual inputs or relay
contacts with an output relay coil on the end. IF the conditions of the
contacts are met, THEN the coil will be energised. The program executes
each step of the ladder, and then jumps back to beginning again.
Relays can switch at about 60 cycles a second so to get 60
complete scans of the ladder running its high level programming language
needed a lot of processing power. Desktop PCs only became fast enough to
run PLC programs about 10 years ago.
When Modicon introduced the PLC, not only did they
have to invent a new architecture to get the processors to run fast
enough, they also had to make the electronics a lot more reliable.
Computers of the time were certainly not reliable. To overcome this,
their basic idea for the PLC was to make everything bigger. Larger
ferrite cores for memory and wider tracks on the circuit board were
included to create more ‘energy per bit’. This increased the signal
to noise ratio and hence the reliability. Fans were also avoided, as any
outside air entering the PLC could be dirty and cause corrosion.
The finished PLCs were still not reliable enough at
first, so Modicon engineers built a test chamber called ‘the blue
box’. Each PLC had to run for a minimum of 24 hours in arctic and
tropical conditions. It was then vibration tested, run next to a Tesla
coil to test for electromagnetic interference, and finally hit
repeatedly with a rubber hammer. When one of the first Modicon PLCs was being taken to show a
customer, the engineers tripped and dropped it as they entered the
factory. What made the sale was not that the PLC still worked after
being dropped but the engineers’ casual assumption that dropping
wouldn’t affect it. By the standards of the time these PLCs were
astonishingly reliable. Some have run for 50,000 hours without any
problems. I have had trouble with some really old Mitsubishi ones I
found in a scrapyard, but apart from that I’ve only ever had one
completely fail, and that was replaced free of charge. I have also fried
quite a few outputs, but that has always been my fault for overloading
them.
Although the first PLCs simply imitated relays they
quickly became more sophisticated. Mathematical functions were added,
followed by a form of flow chart programming. This enabled just a small
section of the ladder to be active at any time and quickly became
essential as programs became longer and more complex. Real time clocks
were added, though these were perhaps too simple as there were only 2
digits for the year. Some of the panic about the millennium bug was
based on the PLCs embedded in essential equipment. I suspect the reason
why there were no problems was that the real time clocks were never
widely used. They were awkward to program and irrelevant to most
industrial control.
Today, all computers are a lot more reliable than
they were in the 1970s, so PLCs now use a lot of the same chips (ARM
risk processors are often used). However today’s PLCs are still built
to run in really tough environments. They still have no cooling fans,
and work at temperatures up to 60 degrees centigrade, far hotter than
any PC. They also still work next to a tesla coil, I’ve tried it.
(The input filtering that allows them to work in a strong
electromagnetic field restricts the speed of today’s PLCs to about 100
cycles a second.)
5-10 years ago, there was a vogue for ‘soft PLCs’.
These were software programs that ran on Windows PCs, with ladder
programming identical to traditional PLCs. When they first appeared, it
was predicted that they would finally make traditional PLCs redundant
but this never happened. A limited custom operating system is obviously
capable of being much more reliable than any complete PC operating
system.
Making use of the computing power available today,
PLCs now have plug-in modules for motion control of servo motors,
industrial modems for operating them remotely, and SCADA computer
interfaces which allows a diagram of the machine or process to be
displayed on a touch screen. PLCs can be connected to distant motors or
sensors via a network, which saves a lot of wiring. Some factories even
link all their PLCs together on a network, but there are many different
incompatible network systems and if the network fails, a whole factory
can grind to a halt. Some companies, including Ford, prefer to keep
their machines separate for this reason.
At the other end of the spectrum, there are now
simple PLCs called intelligent relays designed to replace just one or
two relays or timers. These are programmed graphically in logic blocks,
quite similar to programming a Lego Mindstorm controller. Its easy to
get a simple program to run, but I find them very frustrating. If a
program has more than a few logic blocks it becomes difficult arranging
them on the screen so the connections remain visible. Every edit tends
to cover some of the connections up again. Last year, while helping a
friend put together a giant sculpture clock, I spent three days inside a
cramped steel sphere cursing his ‘intelligent’ relay.
Generally though I’m a huge fan of PLCs. I’m
not a typical factory automation engineer who can just buy all the
modules they want to make their PLCs do anything. But for me their basic
limitations have advantages. Being restricted to a limited number of
slow switching on/off digital outputs forces me to keep my entire
machines cheap and simple. For a simulator ride my PLC will just trigger
a compact flash card video player to start playing. The PLC then
controls the motion by timed on/off outputs to the actuators. There is
no communication with the video but they stay quite adequately in synch
and the jerky unrealistic movements are amazingly effective. Commercial
simulators have software which runs a timeline with the video and
analogue outputs to the actuators. Much more sophisticated, but the
final effect isn’t that different from mine.
I wish computers could be a bit more like PLCs.
They certainly don’t need their enormous complexity for most tasks and
they certainly could be more robust. If only every computer was built to
be dropped, run next to a tesla coil and hit with a rubber hammer.
Also see Electricity
|