PLCS
makezine.com/23/primer
RUGGED AND UNSTOPPABLE
An hour’s downtime in a factory is very expensive,
so PLCs are designed to work reliably no matter
what. I may make lots of mistakes getting a PLC
program to run, but once it works, it will usually
keep working reliably forever. The bricks work in
extremely hot, cold, or humid conditions, and are
unaffected by electromagnetic interference. You
can switch them on and off at will without worrying
about crashing hard disks or corrupting data.
I recently bought a used PLC from a carwash
company and it arrived with water dripping out of
it. I nearly sent it back, but out of curiosity I tried
plugging it in. It worked perfectly, and has ever
since. An engineer from Rockwell Automation told
me he’d found a PLC in a tea factory that was completely full of tea leaf dust but had been working fine
for more than ten years.
When a PLC does finally fail, you can replace it
easily using just a screwdriver — no circuit boards
or soldering. Figure C shows a modern PLC “brick”
with 2 rows of screw terminals, one for inputs such
as switches and sensors, and one for outputs such
as transistors and relays (the red rectangles).
There’s even a small, built-in power supply for the
sensors. That way, engineers configuring assembly
lines or conveyors (Figure D) can plug in standardized sensors and pneumatic rams, rather than
having to design and build circuits from scratch.
A
Relay
Ladder
X1 X2
Set
switch
Reset
switch
Relay
contact
( M1 )
X1 = Set
X2 = Reset
Relay
coil
B
M1
RELAY AND LADDER LOGIC
PLCs evolved out of the era when all industrial
process control and machine tool control was done
with relays. Entire computers had been made of
relays, most famously the Z3, built by German computer pioneer Konrad Zuse in 1941. Machines often
had rows of cabinets full of relays wired together,
and on an even larger scale, telephone exchanges
were literally whole buildings full of relays.
Alongside these relays there were ingenious
electromechanical devices like time-delay relays,
cam timers, and uniselectors. Time-delay relays
have piston dashpots that slow the movement of
the relay contacts. Cam timers use geared motors
to turn mini camshafts that operate a row of micro
switches. Uniselectors are stepping relays that use
a series of pulses (particularly the old telephone
dialing pulses) to move contact wiper arms to many
different positions.
In our flip-flop ladder rung, M1 represents one
of hundreds of individually addressable relays in
the PLC. A relay’s switch and coil components are
treated separately in ladder logic, so M1 refers to
both parts.
To program a PLC, you hook it up to a PC via a
serial cable, and then run an interface application
that lets you write and upload your programs. You
106 Make: Volume
23