Вы находитесь на странице: 1из 13

What is a PLC?

NEMA, the National Electrical Manufacturers Association, defines a programmable logic


controller (PLC) as:
a programmable controller is a digitally operating electronic apparatus hich uses a
programmable memory for the internal storage of instructions for implementing specific
functions, such as logic, se!uencing, timing, counting and arithmetic, to control through
digital or analog input"output, #arious types of machines or process$

Programmable Logic Controllers, programmable controllers, or PLCs are specialized
industrial computers. The PLC accepts inputs from switches and sensors (measures or
senses the system), evaluates these based on a program (logic), and changes the state of
outputs to control a machine or process.

nitially, programmable logic controllers were used to replace traditional hard!wired
relay logic% hoe#er, ith its e#er increasing functionality it is found in many more
comple& applications$ PLCs are used in any industrial application here operating
re!uirements are comple&, are constantly changing, or here high reliability is necessary$
A Very Brief History of the PLC
'he ad#ent of the PLC began in the ()*+,s and ()-+,s to replace traditional .hard/ired.
controls, and has since become the predominant choice for industrial controls$ "efore
PLCs, much of machine control relied on contacts and relays providing hard!wired
#logic# for machine controls$ Changes to the logic ere labor intensi#e and costly$
0n ()*1, 2M,s 3ydramatic di#ision specified the design criteria for hat ould become
the first programmable logic controller$ 'hey re!uested a solid/state system that ould:
sur#i#e the industrial en#ironment
be easily programmed by plant engineers and technicians, and
be easily reprogrammed and re/used
'he inning proposal came from 4edford Associate / hich introduced the M5dular
60gital C5Ntroller (M560C5N)$ 'he M560C5N is still a popular brand of PLC today,
but is oned by Schneider Electric. Other prevalent PLC brands today are: Allen-
Bradley, Sieens, Oron, and !E.
'he Automoti#e 0ndustry as a ma7or early adopter of programmable logic controllers
(PLC)$ 'hey anted a programming method that could be easily understood by their
e&isting controls engineers and technicians$ 'he result of this desire as a programming
language called 8elay Ladder Logic (or .ladder logic.)$
'he layout of Ladder Logic is #ery similar to reading the diagrams for hard ired relay
controls$ Ladder Logic is still one of the most popular .language. for programming
PLCs, but many others ha#e de#eloped o#er the years$
Basic PLC Components
Programmable controllers ha#e gron throughout industrial control applications because
of the ease they bring to creating a controller: ease of programming, ease of iring, ease
of installation, and ease of changing$ PLCs span a ide range of si9es, but all contain si&
basic components:
processor or central processin" #nit $CP%&'
rac( or o#ntin"'
inp#t assebly'
o#tp#t assebly'
po)er s#pply'
pro"rain" #nit, device, or PC*so+t)are
:e ill start ith e&plaining the physical components you see hen loo;ing at a PLC
system / and then e&plore hat goes on inside each part, and ho the components relate
to each other$
Rack Assembly
Most medium to large PLC systems are assembled such that the indi#idual components /
CP<, 0nput"5utput, Poer =upply / are modules that are held together ithin a rac;$
0n smaller PLC systems / all of these components may be contained in a single housing or
.bric;. / these smaller systems are sometimes referred to as .bric;s. or .shoebo&. PLCs$
Power Supply
'he poer supply pro#ides poer for the PLC system$ 'he poer supply pro#ides
internal 6C current to operate the processor logic circuitry and input"output assemblies$
Common poer le#els used are >?@ 6C or (>+ @AC$
Processor (CPU)
'he processor, central processing unit, or CP< is the .brain. of the PLC$ 'he si9e and
type of CP< ill determine things li;e: the programming functions a#ailable, si9e of the
application logic a#ailable, amount of memory a#ailable, and processing speed$
<nderstanding the CP< can be a comple& sub7ect and e ill tac;le that in other articles$
Input/Output Assembly
0nputs carry signals from the process into the controller, they can be input sitches,
pressure sensors, operator inputs, etc$ 'hese are li;e the senses and sensors of the PLC$
5utputs are the de#ices that the PLC uses to send changes out to the orld$ 'hese are the
actuator the PLC can change to ad7ust or control the process / motors, lights, relays,
pumps, etc$
Many types of inputs and outputs can be connected to a PLC, and they can all be di#ided
into to large groups / analog and digital. ,i"ital inp#ts and o#tp#ts are those that
operate d#e to a discrete or binary chan"e - on*o++, yes*no. Analo" inp#ts and
o#tp#ts chan"e contin#o#sly over a variable ran"e - press#re, teperat#re,
potentioeter.
Programming Deice
'he PLC is programmed using a specialty programmer or softare on a computer that
can load and change the logic inside$ Most modern PLCs are programmed using softare
on a PC or laptop computer$ 5lder systems used a custom programming de#ice$
Basic Operation of a PLC system
'he operation of the PLC system is simple and straightforard$ 'he Process or CP<
completes three processes: (() scans, or reads, from the input de#ices (>) e&ecutes or
.sol#es. the program logic, and (A) updates, or rites, to the output de#ices$
P!C Program
Bor the PLC to be useful, it must first ha#e a Program or Logic for the CP< to e&ecute$ A
system engineer or PLC programmer ill first create the program logic in a programming
de#ice (these days it is usually softare running on a personal computer)$ 'his logic can
be ritten in Ladder Logic, 0nstruction List, =e!uential Bunction Charts, or any of the
0EC languages$
'he programmer ill then donload the program to the PLC$ 'his is usually done by
temporarily connecting the programmer to the PLC$ 5nce the program is installed or
donloaded to the CP< / it is usually not necessary for the PC to remain connected$
"asic Scan
5nce the program is in the CP< / the PLC is then set to .run., and the PLC e&ecutes the
application program repeatedly$ 0n addition to e&ecuting the program, the CP< regularly
reads the status of the input de#ices, and sends data to the output de#ices$ 'he 0nput
system senses the status of the real orld inputs (a sitch, a le#el, etc$), translates them to
#alues that can be used by the CP<, and rites those #alues to the 0nput table$ 'he
application program is e&ecuted, and rites #alues to the 5utput table$ 'he 5utput
system then con#erts the output #alue to a real orld change (motor turns on, #al#e
opens, etc$)
'his process of reading inputs, e&ecuting logic, and riting outputs is called the PLC
=can or =eep$
'he CP< continuously 8eads 0nputs, =ol#es Logic, and :rites to the outputs (there are
other tas;s the CP< does / hich ill be discussed later)$ 0t is important to understand
the scan because it may dictate ho a programmer structures logic$
#emory
'he control program or application program is stored in memory$ As the PLC e&ecutes
logic, it may also read and store #alues to memory$ 'he #alues may also be used and
refernced by the application program$

PLC Input and Output Devices
-he ter .*O re+ers to .np#t*O#tp#t. .*O is in+oration representin" the data that is
received +ro sensin" devices and the coands that are sent to act#atin" and
indicatin" devices. -he .*O Syste is the collection o+ physical eleents o+ the
control syste that either provide or #se .*O data. -here are t)o a/or types o+
.*O:
,i"ital - binary devices )hich #st be in one o+ only t)o states: on or o++.
Analo" - contin#os devices - sense and respond to a ran"e o+ val#es.

Digital IO
,i"ital inp#t devices ay be either on or o++' they ay not hold
any other val#es. 0or e1aple, di"ital position sensors do not
sense ho) close an ob/ect is, they only tell i+ the ob/ect is )ithin a
ran"e o+ positions. Coon di"ital +ield inp#t devices incl#de p#shb#ttons, liit
s)itches, and photoeyes. Coon di"ital o#tp#t devices incl#de relays, otor
starters, and solenoid valves.
Analog IO
Analog input de#ices sense continuous parameters$ 'he information that they pro#ide is
gi#en as a continuous range of #alues, not 7ust an on or off indicator$ Common analog
inputs
are pressure, temperature, speed, etc$ Analog output de#ices respond to a range of output
#alues from the controller$ Common analog output signals include motor speed, #al#e
position, air pressure, etc$
0"5 modules connect .real orld. field de#ices to the controller$ -hey convert the
electrical si"nals #sed in the +ield devices into electronic si"nals that can be #sed by
the control syste, and translate real orld #alues to 05 table #alues$
0"5 modules communicate ith PLC CP< in one of three ays:
($ 4ac;plane / 'he 0"5 modules can be located in the same rac; or station$
Communications then ta;es place ithin the rac; or across the bac;plane$
>$ 4ac;plane e&tension / bac;plane e&tension modules allo 0"5 modules to be
located in rac;s or stations hich are separated from the controller$
A$ 6e#ice netor; / modules can communicate ith a controller o#er a netor;$
0ndustrial netor;s are used to interconnect field le#el de#ices ith controllers$
Common 05 netor;s are Bield4us, Profibus, and 6e#iceNet$
$Point Count$ an% t&e Si'e o( t&e P!C System
'he number of 0"5 de#ices used ithin a control system is called its Cpoint countD$
Analo" device data re2#ires si"ni+icantly ore anip#lation and processin" than
di"ital device data$ 6igital and analog point counts are typically considered separately$
'he total number of digital and analog points is used to gi#e an indication of the si9e of a
control system$

Ladder Logic
Ladder Logic, or Ladder 6iagrams is the most common programming language used to
program a PLC$
Ladder logic as one of the first programming approaches used in PLCs because it
borroed hea#ily from the 8elay 6iagrams that plant electricians already ;ne$
'he symbols used in 8elay Ladder Logic consists of a poer rail to the left, a second
poer rail to the right, and indi#idual circuits that connect the left poer rail to the right$
'he logic of each circuit (or rung) is sol#ed from left to right$ 'he symbols of these
diagrams loo; li;e a ladder / ith to side rails and circuits that resemble rungs on a
ladder$
'he picture abo#e has a single circuit or .rung. of ladder$
0f 0nput( is 5N (or true) / poer (logic) completes the circuit from the left rail to
the right rail / and 5utput( turns 5N (or true)$
0f 5utput( is 5BB (or false) / then the circuit is not completed and logic does not
flo to the right / and 5utput ( is 5BB$

'here are many logic symbols a#ailable in Ladder Logic / including 'imers, Counters,
Math, and 6ata Mo#es / such that any logical condition or control loop can be
represented in Ladder Logic$ :ith 7ust a handful of basic symbols / a Normally 5pen
Contact, Normally Closed Contact, Normally 5pen Coil, Normally Closed Coil, 'imer,
Counter / most logical conditions can be represented$
Ladder Logic Basics: Contacts & Cois Part ! " #ormay Open
:ith 7ust the Normally 5pen Contact and Normally 5pen Coil / a surprising array of
basic logical conditions can be represented$
3orally Open Contact. 'his can be used to represent any input to the control
logic / a sitch or sensor, a contact from an output, or an internal output$
:hen .sol#ed. the referenced input is e&amined for an 5N (logical () condition$ 0f it is
5N, the contact ill close and allo poer (logic) to flo from left to right$ 0f the status
is 5BB (logical +), the contact is 5pen, poer (logic) ill N5' flo from left to right$
3orally Open Coil$ 'his can be used to represent any discrete output from the
control logic$
:hen .sol#ed. if the logic to the left of the coil is '8<E, the refrenced output is 5N
(logical ()$
Soling a Single Rung
=uppose a sitch is ired to 0nput(, and a light bulb is ired through 5utput( in such a
ay that the light is 5BB hen 5utput( is 5BB, and 5N hen 5utput( is 5N$
:hen 0nput( is 5BB (logical +) the contact remains open and poer cannot flo from
left to right$ 'herefore, 5utput( remains 5BB (logical +)$
:hen 0nput( is 5N (logical () then the contact closes, poer flos from left to right, and
5utput( becomes 5N (the light turns 5N)$

Ladder Logic Basics : $he A#D rung% the O& rung
)&e A*D Rung
'he AN6 is a basic fundamental logic condition that is easy to directly represent in
Ladder Logic$
=uppose a sitch is ired to =itch(, a second
sitch is ired to =itch>, and a light bulb is ired through Light( in such a ay that
the light is 5BB hen Light( is 5BB, and 5N hen Light( is 5N$
0n order for Light( to turn 5N, =itch( must be 5N, AN6 =itch> must be 5N$
0f =itch( is 5BB, poer (logic) flo from the left rail, but stops at =itch($ Light( ill
be 5BB regardless of the state of =itch>$
0f =itch( is 5N, poer ma;es it to =itch>$ 0f =itch> is 5BB, poer cannot flo any
further to the right, and Light( is 5BB$
0f =itch( is 5N, AN6 =itch> is 5N / poer flos to Light( sol#ing its state to 5N$
)&e OR Rung
'he 58 is a logical condition that is easy to represent in Ladder Logic$
=uppose a sitch is ired to =itch(, a second
sitch is ired to =itch>, and a light bulb is ired through Light( in such a ay that
the light is 5BB hen Light( is 5BB, and 5N hen Light( is 5N$ 0n this instance, e
ant to the light to turn 5N if either =itch( 58 =itch> is 5N$
0f =itch( is 5N / poer flos to Light( turning it 5N$
0f =itch> is 5N / poer flos through the =itch> contact, and up the rail to Light( /
turning it 5N$
0f =itch( AN6 =itch > are 5N / Light( is 5N$
'he only ay Light( is 5BB is if =itch( AN6 =itch> are 5BB$

Ladder Logic Basics: Contacts & Cois Part ' " #ormay Cosed
Another set of basic contacts and coils that can be used in Ladder Logic are the Normally
Closed Contact and the Normally Closed Coil$ 'hese or; 7ust li;e their normally open
counterparts / only in the opposite$
:hen .sol#ed. the referenced input is e&amined for an 5BB condition$ 0f the status
is 5BB (logical +) poer (logic) ill flo from left to right$ 0f the status is 5N, poer
ill not flo$
:hen .sol#ed. if the coil is a logical +, poer ill be turned on to the de#ice$ 0f
logical (, poer ill be 5BB$
Basic $imers & Counters " Part !
4any ties )e )ill )ant to ta(e action in a control pro"ra based on ore than
the states o+ discrete inp#ts and o#tp#ts. Soeties, )e )ill )ant to t#rn soethin"
on a+ter a delay, or co#nt the n#ber o+ ties a s)itch is hit. -o do these siple
tas(s, )e )ill need -iers 5 Co#nters.
Simple )imers
A timer is simply a control bloc; that ta;es an input and changes an output based on time$
'here are to basic timer types e ill deal ith initially (there are other ad#anced
timers, but e ill start ith the basics first) / 5n/6elay 'imer and the 5ff/6elay 'imer$
On-,elay -ier / this tier ta(es an inp#t, )aits a speci+ic ao#nt o+ tie, then
t#rns O3 an o#tp#t $or allo)s lo"ic to +lo) a+ter the delay&.
O++-,elay -ier / this tier ta(es t#rns O3 an o#tp#t $or allo)s lo"ic to +lo)& and
(eeps that o#tp#t O3 #ntil the set ao#nt o+ tie has passed, then t#rns it O00
$hence o++-delay&
Simple Counter
A counter simply counts the number of events that occur on an input. There are two
basic types of counters - Up counter and a Down counter.
%p Co#nter / as its name implies, hene#er a triggering e#ent occurs, an up counter
increments the counter$
,o)n Co#nter / hene#er a triggering e#ent occurs, a don counter decrements the
counter$

PLC Communications
'o control a machine or process, many times multiple controllers or intelligent de#ices
must or; together to accomplish the tas;$ 0n order to or; together, these de#ices must
communicate$ 0n order to program a PLC, communications must ta;e place / becasue the
Programming de#ice (computer) must communicate ith the PLC CP< in order to
transfer the configuration and control logic before the PLC can even be"in to r#n. 0or
these reasons, it is iportant +or anyon in a#toation to have a basic #nderstandin"
o+ PLC co#nications.
)ypes o( Communications
'here are three basic le#els"categories of communications that e are usually concerned
ith in industrial control: serial communications, industrial communications netor;s,
and industrial 0"5 netor;s$
'he most basic form of communication is a direct, one ay, connection beteen to
de#ices here data is transmitted one bit at a time$ :e call this serial communication$
Industria #et(or) Communications
An 0ndustrial Netor; is a system of electronic de#ices that are connected in order to
share information$ The networ$ can consist of PLC Controllers, %& 'evices, &perator
nterfaces, ()%*C+'+ computers, and many other elements. ,ach element is uni-uely
addressable ! giving each component (controllers, %& devices, &perator interfaces, etc)
a uni-ue name or label. ndustrial networ$s provide bi!directional, real!time,
(sometimes deterministic)communication. ,ach element has specific electronic
components to allow the transfer of data between the elements, on a shared media, and
according to a protocol.
In%ustrial *etwork Protocols
Netor; protocols establish the rules that must be folloed for to or more de#ices to
share data$ 'hey describe ho de#ices establish and maintain communications$
E1aples o+ net)or( co#nication protocols incl#de ,evice3et, Pro+ib#s-,P, and
Ethernet.
Deterministic *etwork
Many industrial netor;s are deterministic$ 0f a netor; is deterministic, it means that
communication occurs ithin a predetermined time span$ 0ndustrial netor;s #alue
determinism because many control systems re!uire predictable, real/time response to
data$ (Eou ould not ant to miss a critical alarm because of someone sending a (+Mg
e/mail)
*unction Boc) Diagram
Bunction 4loc; 6iagrams (B46) is one of the languages supported by 0EC ((A($ B46 is
a graphical language that allos the user to program elements in .bloc;s.$ 'he bloc;s can
then be ired together li;e electrical circuits$

PLC +ossary A " ,
Address / (() An alphanumeric #alue that uni!uely identifies a specific input or output /
the specific 0"5 rac;, module, terminal, etc$ (>) 0n PLC memory / an alphanumeric #alue
the uni!uely identifies here data is stored$
Analo" ,evice / an apparatus the measure information that could be continuous (e$g$
temperature gauge, pressure, etc$) as opposed to 6iscrete 6e#ice$
Encoder / a rotary de#ice used to transmit position information$ 'he encoder generates
electrical pulses as it mo#es / hich are fed into a high speed counter$

0alse / 0n logic, the binary state of +$ 'he opposite of '8<E$
0lash 4eory / non/#olatile memory usually not re!uiring battery bac;/up$
6i"h Speed Co#nter / allos rapid pulses (pulses that are faster than the PLC scan time)
to be counted independently$ <sed in high speed counting or positioning applications$
.np#ts / any sitches or sensors connected to the PLC that pro#ide input information$
.*O / shorthand or abbre#iation for 0nputs and 5utputs$
4eory / component of the PLC here data and instructions are stored$
F 'op
3e"ative Lo"ic / binary logic such that logic + represents the 5N state$ 'he opposite of
positi#e logic$
3et)or( $ind#strial& / a system of electronic de#ices that are connected in order to share
information$
3orally Closed Contact / ladder logic symbol that ill allo logic flo if input is
logic .+. (5BB) hen sol#ed$
3orally Open Contact / ladder logic symbol that allo logic flo if input is logic is
.(. (5N)
P., $Proportional .nte"ral ,erivative& / a form of closed loop control using a
mathematical formula to tightly control a continuous output #ariable, based on a
continuous input$
PLC $Pro"raable Lo"ic Controller& / a solid state industrial control system,
designed for harsh industrial en#ironemnts, that can be programmed to control a
process or machine$
SCA,A / =uper#isory Control and 6ata Ac!uisition

Вам также может понравиться