Assignment 2.1 - Tangub

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 104

PLC IN ACTION

STUDENT NAME:
Tangub, Ernest Matthew M.
STUDENT NUMBER:
1910288

Electronics 3: Electronic Systems and Design


R.A. ALIMUIN
What is PLC?

Electronics 3: Electronic Systems and Design


R.A. ALIMUIN
PLC
A Programmable Logic Controller (PLC) is a ruggedized computer used
for industrial automation. These controllers can automate a specific
process, machine function, or even an entire production line. It is an
industrial computer control system that continuously monitors the state
of input devices and makes decisions based upon a custom program to
control the state of output devices.

PLC by Rockwell Automation PLC Omron NX1P2-9024DT


Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
What is inside a PLC?

Electronics 3: Electronic Systems and Design


R.A. ALIMUIN
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
What Programming Language Is Used
To Program A PLC?
• While Ladder Logic is the most commonly used PLC programming
language, it is not the only one. The following table lists of some of
languages that are used to program a PLC.

• Ladder Diagram (LD) Traditional ladder logic is graphical programming


language. Initially programmed with simple contacts that simulated the
opening and closing of relays, Ladder Logic programming has been
expanded to include such functions as counters, timers, shift registers, and
math operations.
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
• Function Block Diagram (FBD) - A graphical language for depicting signal
and data flows through re-usable function blocks. FBD is very useful for
expressing the interconnection of control system algorithms and logic.
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
• Structured Text (ST) – A high level text language that encourages structured programming. It has a
language structure (syntax) that strongly resembles PASCAL and supports a wide range of
standard functions and operators. For example;
If Speed1 > 100.0 then
Flow_Rate: = 50.0 + Offset_A1;
Else
Flow_Rate: = 100.0; Steam: = ON
End_If;
• Instruction List (IL): A low level “assembler like” language that is based on similar instructions list
languages found in a wide range of today’s
Electronics PLCs.
3: Electronic Systems and Design
R.A. ALIMUIN
• Sequential Function Chart (SFC) A method of programming complex
control systems at a more highly structured level. A SFC program is an
overview of the control system, in which the basic building blocks are
entire program files. Each program file is created using one of the other
types of programming languages. The SFC approach coordinates large,
complicated programming tasks into smaller, more manageable tasks.
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
What Are Input/Output Devices?
• Electrical noise, such as spikes in the power lines or
load kick-back would have serious impact on a
PLC's internal circuits since its CPU operates at
very low voltages levels. This is where the
Input/Output (I/O) portion of a PLC plays a critical
role. The I/O, both inputs and outputs, protects the
CPU from electrical noise. The I/O section is where
status signals are filtered to remove noise, validate
voltage levels, and CPU decisions are made and
put into operation. The PLC Inputs provide their
status to a storage area within the CPU and outputs
are driven from similar stored status in the CPU.
Electronics 3: Electronic Systems and Design
PLC’s Input and Output
R.A. ALIMUIN Modules and Connections
• Real world devices such as pushbuttons, limit switches and sensors are
connected through the input modules in the PLC. These modules detect a
change in the state of input signals and provide a stored image to input
elements in ladder logic. The input elements simulate the actions of relay
contacts within the Programmable Logic Controller. In turn, output elements
are "energized," which produces desired output signals to drive loads such
as motor controllers, contactors, solenoids, and pilot lights, via the output
modules in the I/O's. As a general rule, each instruction in ladder logic
requires one word of memory. Each instruction is programmed so that series
contacts are ANDed and parallel contacts are ORed.

Electronics 3: Electronic Systems and Design


R.A. ALIMUIN
PLC – Parts (Types of Input Devices)

• Switches and Pushbuttons


• Sensing Devices
• Limit Switches
• Photoelectric Sensors
• Proximity Sensors
• Condition Sensors
• Encoders
• Pressure Switches
• Level Switches
• Temperature Switches
• Vacuum Switches
• Float Switches Types of PLCs Input Devices

Electronics 3: Electronic Systems and Design


R.A. ALIMUIN
PLC – Parts (Types of Output Devices)
• Valves
• Motor Starters
• Solenoids
• Actuators
• Horns and Alarms
• Stack lights
• Control Relays
• Counter/Totalizer
• Pumps
• Printers
Types of PLCs Output Devices
• Fans
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
History (Invention of PLC Programming)
• The first PLC was introduced in the late 1960s.
• A programmable logic controller is an industrial
computer. It is designed to help in the control of
manufacturing processes.
• The automobile sector was the first industry to
deploy PLCs into its operations. Their aim was
to replace the hardwired relays and timers with
programmable and flexible controllers.
• Since then, PLCs have been broadly adopted as
the standard automation control system in
discrete manufacturing industries.
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
The first PLC began being developed in 1968. General Motors
designed a specification for a ‘Standard Machine Controller’ and
distributed it to vendors for a quote. Some of the major elements of
the specification included:

• Should use solid state components which should be modular and


expandable
• Should contain 16 units that can be expanded to 256
• Should have 16 outputs that can be expanded to 128
• Should offer easy programming and reprogramming
• Should not lose stored programs during power outages, therefore, have
at least 1k of memory that can be expanded to 4k
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
• Richard E. Morley, who worked for Bedford associates, designed a device
known as the Modular Digital Controller.
• This device met all the requirements the Standard Machine Controller was
asking for. When the Modular Controller was tested in General Motors, it
showed a 60 percent reduction in downtime.

Modular Digital Controller


Richard E. Morley

Electronics 3: Electronic Systems and Design


R.A. ALIMUIN
History (Modicon PLC)

• Bedford Associates changed its name to


Modicon PLC. They began producing the
Modicon 084, the first PLC.
Bedford Associates

• What differentiated the Modicon 084 from other


products in the market was its programming
technique. The others were utilizing ‘Boolean
Statements’ to manipulate their equipment.
Modicon 184, upgraded version of
the Modicon 084
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
History (Modicon PLC)
• Boolean algebra was by the Irish
Mathematician George Boole and presented
in The Mathematical Analysis of Logic (1847).
Boolean mathematics is the math of ones and
zeros, True and False. At it’s core, it consists of
three expressions, AND, OR and NOT. All
computers use this type of logic. George Boole

• Despite the simplicity of Boolean Logic and The


Genius of George Boole, Boolean Statement
programs were okay for computer scientists.
Core Boolean Statements in
However, plant engineers found them difficult to Graphic Representation
work with, as compared to relay logic.
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
History (Modicon PLC)
• The engineers were used to relay control
systems which employed ladder diagrams.
This is because whenever relay circuits are
drawn between a hot and neutral common,
Control Systems
they resemble the rungs of a ladder.
• Morley’s genius idea was to incorporate
‘ladder logic’ into his system. Ladder Logic is
essentially a graphic representation of
Boolean Logic. This was the game changer.
The engineers would find it easier to Ladder Logic

understand and use than Boolean Logic. 


Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
History (Modicon PLC and Allen-Bradley)

• By the time the 70s were coming to a close,


Allen-Bradley and other competitors had
developed systems that rivaled Modicon.
Innovation started becoming key to capturing
market share. Allen-Bradley PLC

• PLCs were becoming faster and more


powerful. There was also the rapid evolving of
programming and documentation tools.
• The initial PLCs did not have a platform for
program documentation. Thus, a program had
Evolution of Allen-Bradley’s PLCs
to be hand-written or drawn on a drafting
board before it was entered later.
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
History (Modicon PLC and Allen-Bradley)

• This is the period that saw to the development of the


Data Highway by Allen-Bradley and Modbus by
Modicon. These innovations allowed PLCs to
exchange information with each other.
• There was also the development of programming Allen-Bradley’s Data Highway
terminals. These allowed programmers to remotely
enter logic programs. The final program could then
be recorded on cassette tape then downloaded to a
PLC.
• They could also generate printouts. This eliminated
the need for the hand-drawings that consumed a lot
of time. Modicon’s Modbus
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
History (Late Decade of the 70s)
• One of the most significant milestones in PLC history
was the introduction of the International
Electrotechnical Commission (IEC) 61131-
3 specification in 1982.
• It was the standard by which PLC software being Logo of the International
developed was to be held against. It became Electrotechnical Commission
published in 1993 as IEC 1131 International Standard
for Programmable Controllers.
• The introduction of the IEC 61131-3 was necessary
as it brought consistency to all the software products
on the market. This allows engineers and technicians
to easily understand logic and program flow from any IEC-61131-3 Function
PLC software. Electronics 3: Electronic Systems and Design Blocks and Categories
R.A. ALIMUIN
History (IEC 61131-3)

• It provides the only global standard for


industrial control programming. It
harmonizes the way people design and
operate industrial controls by standardizing
the programming interface. A standard
programming interface allows people with
different backgrounds and skills to create
different elements of a program during
different stages of the software life-cycle:
specification, design, implementation,
testing, installation and maintenance. Yet all
pieces adhere to a common structure and
work together harmoniously.
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
History (IEC 61131-3)

• IEC 61131-3 defines, as a minimum set, the basic programming


elements, syntactic and semantic rules for the most commonly used
programming languages. This includes the graphical languages Ladder
Diagram (LD) and Functional Block Diagram (FBD), and the textual
languages Instruction List (IL) and Structured Text (ST), as well as the
Sequential Function Chart (SFC) language, used to structure the
internal organization of a program. Via decomposition into logical
elements, modularization and modern software techniques, each
program is structured, increasing its re-usability, reducing errors and
increasing programming and user efficiency.
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
History (Decade of the 80s)
• The ‘80s saw the introduction of the first
personal computers in offices. While you can’t
compare their speed to today’s computers,
they were still a lot faster than drawing on
drafting boards.
Apple’s Macintosh, 1984.
• In fact, nearly every designer had replaced
their drafting board with a desktop computer
by the time the 1980s were coming to a close.
• The adoption of personal computers was not
relegated just to the design arena, but also the
shop floor. Drafting Boards, 1980s.
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
History (Decade of the 80s)
• The PCs began being used to interface with PLCs
directly. Coupled with software improvements, this made
monitoring machine motions a lot easier.
• By this period, the PLC program was widely recognized
as the most useful diagnostic tool. It allowed for effective
troubleshooting, thus many considering it to be the
window to machines. PLCs and PCs
• Nonetheless, machine diagnostics were still in their
primitive stages.
• As PLC’s evolved, other programming languages were
developed. These include flow charts, structured text,
and instruction list. Nonetheless, ladder logic remains
popular due to its graphical and intuitive design. Flowchart Programming
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
• The PCs began being used to interface with PLCs
directly. Coupled with software improvements, this
made monitoring machine motions a lot easier.
• By this period, the PLC program was widely
recognized as the most useful diagnostic tool. It
allowed for effective troubleshooting, thus many
considering it to be the window to machines.
• Nonetheless, machine diagnostics were still in their PLCs and PCs

primitive stages.
• As PLC’s evolved, other programming languages
were developed. These include flow charts,
structured text, and instruction list. Nonetheless,
ladder logic remains popular due to its graphical and
Flowchart Programming
intuitive design. Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
• As the ‘90s rolled in, end users began making special
requests. They wanted their new machinery to come
with industrial terminals that had PLC monitoring
software.
• Plant managers wanted their technicians doing actual
troubleshooting. As such, the PLC programs at that
time were simple in design.
Programmable Logic Controllers,
• In an attempt to save time, plant managers wanted to Early 1990s.
have machines that could tell them what was amiss.
Instead of spending hours troubleshooting.
• This is what led to the development of the
programmable human-machine interface (HMI).
Human-Machine Interface (HMI)
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
Advantages to Other Controllers
• There are a few key features that set PLCs apart from
industrial PCs, microcontrollers, and other industrial
control solutions:

• I/O – The PLC’s CPU stores and processes program


Industrial PCs
data, but input and output modules connect the PLC to
the rest of the machine; these I/O modules are what
provide information to the CPU and trigger specific
results. I/O can be either analog or digital; input devices
might include sensors, switches, and meters, while
outputs might include relays, lights, valves, and drives.
Users can mix and match a PLC’s I/O in order to get the Microcontroller
right configuration for their application.
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
• Communications – In addition to input and output devices, a PLC might
also need to connect with other kinds of systems; for example, users might
want to export application data recorded by the PLC to a supervisory
control and data acquisition (SCADA) system, which monitors multiple
connected devices. PLCs offer a range of ports and communication
protocols to ensure that the PLC can communicate with these other
systems.

• HMI – In order to interact with the PLC in real time, users need an HMI, or
Human Machine Interface. These operator interfaces can be simple
displays, with a text-readout and keypad, or large touchscreen panels more
similar to consumer electronics, but either way, they enable users to review
and input information to the PLC in real time.
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
PLC – Advantages
• Rugged and designed to withstand vibrations,
temperature, humidity and noise
• PLC has a lot of contacts and low cost and safe
• It has a very faster scan time, it has a fast operating
PLC Systems and Relay Systems
time
• A wide range of control application
• It has capable to communicate with a computer in
the plant
• It has great computational capabilities 
• It has shorter training time required
PLC in Industries
• It has a small physical size
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
• It has project cost can be accurately calculated
• It has supervisory control capability
• PLCs are easily programmed and it was relatively easily understood programming
language
• Have interfacing for input and output already inside the controller
• One single programmable logic controller can easily run many machines so it is
flexible
• It has high-speed counters
• It has shorter project implementation time
• Troubleshooting in programming and reprogramming
• The documentation was easy to do
• It has a high level of reliability and low maintenance
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
PLC – Disadvantages
• There is too much work required in connecting wires
• It has fixed circuit operation
• PLCs manufacturers offer only closed-loop architecture
• PLC is new technology so that should require training
• There is a limitation of working of PLCs under high temperature, vibrations
conditions
• Some PLCs turn on when power is restored and may cause an accident
• There is a difficulty with changes or replacement
• Need extra security equipment such as really
• Some application that performs a single function is not efficient in the use of PLC
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
• Limited usage environment high temperature and harsh vibration can disrupt
electronics equipment on the PLC
• PLC is not considered necessary when it has applied to industrial systems that
do not need to change the wiring
• PLC is designed by semiconductor, which depends on the thermal characteristics
• It is always difficult to find an error and require a skillful workforce
• When uses PLC, a problem occurs hold up time is indefinite usually long
• Number of operational modules must be added to maximize flexibility and
performance
• PLCs are propitiatory, meaning that the software and the use of parts can't be
easily used by one manufacturer in combination with some uses by another
manufacturer
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
PLC Basics
• PLCs were invented by Dick Morley in 1964. Since then PLC has
revolutionized the industrial and manufacturing sectors. There is a wide
range of PLC functions like timing, counting, calculating, comparing, and
processing various analog signals.

• The main advantage of PLC over a “hard-wired” control system is that


you can go back and change a PLC after you’ve programmed it, at little
cost (just the cost of the programmer’s time). In a hard-wired control
system, you’re essentially having to rip out wires and start from scratch
(which is more expensive and takes longer). Let’s look at an example to
better understand this advantage.
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
• Imagine you have a light connected to a switch. In general, the light
operates under two conditions – ON and OFF. Now you are given a task
that when you turn ON the switch, the light should glow only after 30
seconds. With this hard-wired setup – we’re stuck. The only way to
achieve this is to completely rewire our circuit to add a timing relay.
That’s a lot of hassle for a minor change.

Electronics 3: Electronic Systems and Design


R.A. ALIMUIN
• This is where a programmable logic controller comes into the picture,
which doesn’t require any additional wiring and hardware to make sure of
a change. Rather it requires a simple change in code, programming the
PLC to only turn on the light 30 seconds after the switch is turned ON.
So, by using a PLC, it is easy to incorporate multiple inputs and outputs.

• This is just a simple example – a PLC has the ability to control much
larger and more complex processes. A PLC can be customized
depending on the application and needs of the user.

Electronics 3: Electronic Systems and Design


R.A. ALIMUIN
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
Physical Structure of PLC

Electronics 3: Electronic Systems and Design


R.A. ALIMUIN
• Programmable Logic Controllers continuously monitors the input values
from various input sensing devices (e.g. accelerometer, weight scale,
hardwired signals, etc.) and produces corresponding output depending
on the nature of production and industry. A typical block diagram of PLC
consists of five parts namely:

• Rack or chassis
• Power Supply Module
• Central Processing Unit (CPU)
• Input & Output Module
• Communication Interface Module
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
Rack or Chassis

• In all PLC systems, the PLC rack or chassis forms the most
important module and acts as a backbone to the system. PLCs
are available in different shapes and sizes. When more complex
control systems are involved, it requires larger PLC racks.

• Small-sized PLC is equipped with a fixed I/O pin configuration.


So, they have gone for modular type rack PLC, which accepts
different types of I/O modules with sliding and fit in concept. All
I/O modules will be residing inside this rack/chassis.
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
• PLC rack or chassis is a
hardware assembly that
plugs communicating
modules together (like
input, output, CPU, power
supply, communication,
and additional function
modules) in a single
frame.

Electronics 3: Electronic Systems and Design


R.A. ALIMUIN
Power Supply Module

• This module is used to provide the required power to the whole PLC
system. It converts the available AC power to DC power which is
required by the CPU and I/O module. PLC generally works on a 24V
DC supply. Few PLC uses an isolated power supply.

• The power supply module is the power house that energizes the PLC
to carry out its function. The power supply module converts the input
source power into signal level voltage used by the PLC processor
and other modules.
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
CPU Module and Memory

• CPU module has a central processor, ROM & RAM memory. ROM
memory includes an operating system, drivers, and application
programs. RAM memory is used to store programs and data. CPU is
the brain of PLC with an octal or hexagonal microprocessor.

• Being a microprocessor-based CPU, it replaces timers, relays, and


counters. Two types of processors as a single bit or word processor
can be incorporated with a PLC. One bit processor is used to
perform logic functions. Whereas word processors are used for
processing text, numerical data, controlling, and recording data.
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
• CPU reads the input data from sensors, processes it, and finally
sends the command to controlling devices. DC power source, as
mentioned in the previous discussion is required voltage signals.
CPU also contains other electrical parts to connect cables used by
other units.

Electronics 3: Electronic Systems and Design


R.A. ALIMUIN
PLC Programming

• When using a PLC, it’s important to design and implement concepts


depending on your particular use case. To do this we first need to
know more about the specifics of PLC programming.

• A PLC program consists of a set of instructions either in textual or


graphical form, which represents the logic that governs the process
the PLC is controlling. There are two main classifications of PLC
programming languages, which are further divided into many sub-
classified types.
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
1. Textual Language
• Instruction list
• Structured text

2. Graphical Form
• Ladder Diagrams (LD) (i.e.
Ladder Logic)
• Function Block Diagram
(FBD)
• Sequential Function
Chart (SFC)
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
Ladder Logic

• Ladder logic is the simplest form of PLC programming. It is also


known as “relay logic”. The relay contacts used in relay controlled
systems are represented using ladder logic.
• The below figure shows a simple example of a ladder diagram.

Electronics 3: Electronic Systems and Design


R.A. ALIMUIN
• In the above-mentioned example, two pushbuttons are used to
control the same lamp load. When any one of the switches is closed,
the lamp will glow.

• The two horizontal lines are called rungs and the two vertical lines
are called rails. Every rung forms the electrical connectivity between
Positive rail (P) and Negative rail (N). This allows the current to flow
between input and output devices.

Electronics 3: Electronic Systems and Design


R.A. ALIMUIN
Functional Block Diagrams

• Functional Block Diagram (FBD) is a simple and graphical method to


program multiple functions in PLC. PLCOpen has described using
FBD in the standard IEC 61131-3. A function block is a program
instruction unit that, when executed, yields one or more output
values.

• It is represented by a block as shown below. It is represented as a


rectangular block with inputs entering on left and output lines leaving
at the right. It gives a relation between the state of input and output
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
• The advantage of using FBD is that any number of inputs and
outputs can be used on the functional block. When using multiple
input and output, you can connect the output of one function block to
the input of another. Whereby building a Function Block Diagram.
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
• The Function Block
Diagram (FBD) is a
graphical language for
programmable logic
controller design, that can
describe the function
between input variables
and output variables. A
function is described as a
set of elementary blocks.
Input and output variables
are connected to blocks by
connection lines. Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
Structured Text Programming
• Structured text is a textual programming language that utilizes
statements to determine what to execute. It follows more
conventional programming protocols but it is not case sensitive. A
series of statements (logic) is constituted of expressing assignments
and relationships using several operators. The structures text
operators are listed below in the image.

• Structured Text is PLC programming language defined by PLCOpen


in IEC 61131-3. The programming language is text-based, compared
to the graphics-based ladder diagram or Function Block Diagram.
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
• At first, it may seem better to use a
graphical programming language for
PLC programming. But in my
opinion, that is only true for smaller
PLC programs. By using a text-
based PLC programming language,
your program will take up much
smaller space, and the flow/logic will
be easier to read and understand.
You can, for example, scale a PLC
analog input or output with just one
line of code or set an alarm for your
SCADA system solution.Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
PLC Programming Examples
• A signal lamp is required to be switched on if a pump is running and the
pressure is satisfactory, or if the lamp test switch is closed. In this
application, if there should be an output from the lamp inputs from both
pump and pressure sensors are required. Hence, AND logic gates are
used.

• OR logic is used for the test input condition, it is required to give an


output of lamp on regardless of whether there is a signal from the AND
system. By using END or RET instruction in the ladder diagram, we can
tell PLC has reached the end of the program. The function block diagram
and the ladder diagram are shown below in the figure.
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
• As another example, consider a valve that is to be operated to lift a
load when a pump is running and either the lift switch is operated or
a switch operated indicating that the load has not already been lifted
and is at the bottom of its lift channel.
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
• OR logic is used for two switches and an AND logic is used with two
switches and the pump. Valve will be operated only if the pump is ON
and two switches are operated.

Electronics 3: Electronic Systems and Design


R.A. ALIMUIN
• Consider a drinks machine that allows the selection of tea or
coffee, milk or no milk, sugar or no sugar, and will supply the
required hot drink on the insertion of a coin. From the below-shown
figure, it is seen that either tea or coffee is selected using the first
OR logic gate.

• The first AND gate give an output when either Tea or coffee is
selected and a coin is inserted into the machine. The output from
this AND gate is given to the second AND gate. The second AND
gate operate only when hot water combines with tea. Milk and
sugar are optional additions that can occur after a coin has been
inserted. Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
PLC Communications

• RS-232 is the most common method PLCs use to communicate with


external devices. It is a serial communication standard that uses binary
code to transmit data in American Standard Code of Information
Interchange (ASCII) format. ASCII translates letters and numbers into
binary code that computers can read. ASCII is a 7-bit code (a bit being
“1” or “0”) that, when translated, results in 128 characters. PLC serial
ports transmit and receive data as voltages. PLCs can be either data
terminal equipment (DTE) or data communications equipment (DCE). A
DTE, for example, can be a computer, while a modem is a DCE.
Typically, PLCs are DTEs and external devices are DCEs.
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
• When the PLC and the external device
connected to it are the same equipment
(i.e., DTE/DTE or DCE/DCE), they cannot
communicate with each other and a null-
modem connection must be used.

• In serial communications, data gets


transmitted one bit at time. Data is
separated into its constituent bits for
transmission and reassembled when
received by an external device. A “start
bit” is the initial signal sent and precedes
any other communication bits.
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
• It is considered the “space” or negative voltage. The “stop bit,” the last
code sent, is considered a “Mark” or a positive voltage.

• Eight bits make a byte and PLCs are byte-oriented. ASCII is a seven-bit
code, so the eighth (or “parity byte”) checks to see if data has been
corrupted. Common forms of parity include even (1), or odd (0). The total
number of 1s in the byte adds up to an even or odd number. The sending
equipment determines if the communication is even or odd and receiving
equipment compares the result of the parity to the eighth bit to ensure
they match. If a device transmits 1001101 and computes it to be an odd
value, it will add a 1 to the eighth bit and send 10011011. The receiver
decides the bit is odd and verifies an odd total of 1 characters.
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
• Baud rate is the number of bits per second transmitted from DTE to
DCE. An RS232 transmission would appear as baud rate, data bits,
and parity-stop bits. For example, the string 9600-8-1-1 translates to
a 9600 baud rate, 8 data bits, a 1 for parity, and a 1 stop bit to end
the transmission.

• Software handshaking ensures devices are ready to send and


receive data. The receiver sends the XOFF character when it wants
the transmitter to pause sending data. It sends the XON character
when it is ready to receive data again. XOFF is sometimes referred
to as the hold-off character and XON as the release character.
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
• A delimiter is added to the end of messages to tell receivers to process
the data just received. The most common delimiter is the “carriage
return” (CR). The PLC or external device receives the delimiter and takes
data from its buffer. The buffer temporarily stores data before it is
processed. The line feed (LF) is sometimes sent with the CR character. If
viewed on a computer, the page moves down a line to start a new line of
communication.

Electronics 3: Electronic Systems and Design


R.A. ALIMUIN
PLC Selection Criteria
• Selecting the correct PLC will depend on the needs and size of the
automation system. Above are examples of different PLCs with varying
inputs, outputs, and display options.

• There are several requirements to keep in mind when choosing PLCs. Is


the proposed system new or an existing one? Either way, ensure the
controller works with mating hardware. Environmental conditions will
affect PLC performance. Typical controllers operate in temperatures from
0 to 55°C (32°-130°F). The number of discrete devices (On/Off logic
devices) and analog devices determines the number of I/O connections
the PLC will need. Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
• If the discrete devices are ac or dc, determine if the PLC can support the
required signal.

• Determining CPU requirements is important for calculating the amount of


RAM needed for data manipulation and storage. Counters and timers
use RAM to store set points, current values, and other internal flags. If
data must be stored over a long period of time, CPU memory must be
sized appropriately.

• Program memory or ROM stores program instructions. Analog devices


usually require 25 words of memory per device. Examples of analog
devices are voltage, current, and temperature meters or sensors.
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
• Simple and sequential applications typically require five words of memory
per I/O device. Complex applications are not as predictable and need
more program memory space.

• Serial and Ethernet connection-based I/O hardware are typical choices


for remote connections. Remote devices are needed when the PLC is
located separately. Serial connections have a max distance of 50 feet
while Ethernet connections can go to a max of 328 feet. These remote
devices are referred to as distributed I/O. Finally, be sure the PLC
understands program instructions. Some PLCs come with proportional
integral derivative functions that eliminate the need for technicians to
write specific code for closed-loop process control.
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
Control System Behavior

• The true power and versatility of a PLC is revealed when we want to alter
the behavior of a control system. Since the PLC is a programmable
device, we can alter its behavior by changing the commands we give it,
without having to reconfigure the electrical components connected to it.

• For example, suppose we wanted to make this switch-and-lamp circuit


function in an inverted fashion: push the button to make the lamp turn off,
and release it to make it turn on. The “hardware” solution would require
that a normally-closed pushbutton switch be substituted for the normally-
open switch currently in place.
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
• The “software” solution is much easier: just alter the program so that
contact X1 is normally-closed rather than normally-open.

• In the following illustration, we have the altered system shown in the


state where the pushbutton is unactuated (not being pressed):

Electronics 3: Electronic Systems and Design


R.A. ALIMUIN
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
• One of the advantages of implementing logical control in software rather
than in hardware is that input signals can be re-used as many times in
the program as is necessary. For example, take the following circuit and
program, designed to energize the lamp if at least two of the three
pushbutton switches are simultaneously actuated:

Electronics 3: Electronic Systems and Design


R.A. ALIMUIN
• To build an equivalent circuit using electromechanical relays, three relays
with two normally-open contacts each would have to be used, to provide
two contacts per input switch. Using a PLC, however, we can program as
many contacts as we wish for each “X” input without adding additional
hardware, since each input and each output is nothing more than a
single bit in the PLC’s digital memory (either 0 or 1), and can be recalled
as many times as necessary.

• Furthermore, since each output in the PLC is nothing more than a bit in
its memory as well, we can assign contacts in a PLC program “actuated”
by an output (Y) status. Take for instance this next system, a motor start-
stop control circuit:
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
• The pushbutton switch connected to input X1 serves as the “Start”
switch, while the switch connected to input X2 serves as the “Stop.”
Another contact in the program, named Y1, uses the output coil status as
a seal-in contact, directly, so that the motor contactor will continue to be
energized after the “Start” pushbutton switch is released. You can see
the normally-closed contact X2 appear in a colored block, showing that it
is in a closed (“electrically conducting”) state.

• If we were to press the “Start” button, input X1 would energize, thus


“closing” the X1 contact in the program, sending “power” to the Y1 “coil,”
energizing the Y1 output and applying 120 volt AC power to the real
motor contactor coil. The parallel Y1 contact will also “close,” thus
latching the “circuit” in an energized state:
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
• Now, if we release the “Start” pushbutton, the normally-open X1 “contact”
will return to its “open” state, but the motor will continue to run because
the Y1 seal-in “contact” continues to provide “continuity” to “power” coil
Y1, thus keeping the Y1 output energized:

Electronics 3: Electronic Systems and Design


R.A. ALIMUIN
• To stop the motor, we must momentarily press the “Stop” pushbutton,
which will energize the X2 input and “open” the normally-closed
“contact,” breaking continuity to the Y1 “coil:”

Electronics 3: Electronic Systems and Design


R.A. ALIMUIN
• When the “Stop” pushbutton is released, input X2 will de-energize,
returning “contact” X2 to its normal, “closed” state. The motor, however,
will not start again until the “Start” pushbutton is actuated, because the
“seal-in” of Y1 has been lost:

Electronics 3: Electronic Systems and Design


R.A. ALIMUIN
Fail-safe Design in PLC-Controlled Systems

• An important point to make here is that fail-safe design is just as


important in PLC-controlled systems as it is in electromechanical relay-
controlled systems. One should always consider the effects of failed
(open) wiring on the device or devices being controlled. In this motor
control circuit example, we have a problem: if the input wiring for X2 (the
“Stop” switch) were to fail open, there would be no way to stop the motor!

• The solution to this problem is a reversal of logic between the X2


“contact” inside the PLC program and the actual “Stop” pushbutton
switch:
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
• When the normally-closed “Stop” pushbutton switch is unactuated (not
pressed), the PLC’s X2 input will be energized, thus “closing” the X2
“contact” inside the program. This allows the motor to be started when
input X1 is energized, and allows it to continue to run when the “Start”
pushbutton is no longer pressed. When the “Stop” pushbutton is
actuated, input X2 will de-energize, thus “opening” the X2 “contact”
inside the PLC program and shutting off the motor.

• So, we see there is no operational difference between this new design


and the previous design. However, if the input wiring on input X2 were to
fail open, X2 input would de-energize in the same manner as when the
“Stop” pushbutton is pressed. The result, then, for a wiring failure on the
X2 input is that the motor will immediately shut off.
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
• This is a safer design than the one previously shown, where a “Stop”
switch wiring failure would have resulted in an inability to turn off the
motor. In addition to input (X) and output (Y) program elements, PLCs
provide “internal” coils and contacts with no intrinsic connection to the
outside world. These are used much the same as “control relays” (CR1,
CR2, etc.) are used in standard relay circuits: to provide logic signal
inversion when necessary.

• To demonstrate how one of these “internal” relays might be used,


consider the following example circuit and program, designed to emulate
the function of a three-input NAND gate. Since PLC program elements
are typically designed by single letters, I will call the internal control relay
“C1” rather than “CR1” as would be customary in a relay control circuit:
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
• In this circuit, the lamp will remain lit so long as any of the pushbuttons
remain unactuated (unpressed). To make the lamp turn off, we will have
to actuate (press) all three switches, like this:

Electronics 3: Electronic Systems and Design


R.A. ALIMUIN
Advanced PLC Functionality

• This section on programmable logic controllers illustrates just a


small sample of their capabilities. As computers, PLCs can
perform timing functions (for the equivalent of time-delay relays),
drum sequencing, and other advanced functions with far greater
accuracy and reliability than what is possible using
electromechanical logic devices. Most PLCs have the capacity
for far more than six inputs and six outputs. The following
photograph shows several input and output modules of a single
Allen-Bradley PLC.
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
• With each module having sixteen “points” of either input or output, this
PLC has the ability to monitor and control dozens of devices. Fit into a
control cabinet, a PLC takes up little room, especially considering the
equivalent space that would be needed by electromechanical relays to
perform the same functions:
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
Remote Monitoring and Control of PLCs Via Digital Computer
Networks

• One advantage of PLCs that simply cannot be duplicated by


electromechanical relays is remote monitoring and control via digital
computer networks. Because a PLC is nothing more than a special-
purpose digital computer, it has the ability to communicate with other
computers rather easily. The following photograph shows a personal
computer displaying a graphic image of a real liquid-level process (a
pumping, or “lift,” station for a municipal wastewater treatment
system) controlled by a PLC.
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
• The actual pumping station is located miles away from the personal
computer display:

Electronics 3: Electronic Systems and Design


R.A. ALIMUIN
Applications of PLC

• PLCs are used in various applications in industries such as the


steel industry, automobile industry, chemical industry and the
energy sector. The scope of PLCs dramatically increases based
on the development of all the various technologies where it is
applied.

• In the Travel Industry, PLC has been used to monitor the safety


control system and to operate lifts and escalators.
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
• Glass industry
• PRCs controllers have been in use in the glass industry for decades.
They are used largely to control the material ratio as well as to process
flat glasses. The technology has been advancing over the years and this
has created an increased demand for the PLC control mode for use in
the glass industry.
• The production of glass is an elaborate and sophisticated process so the
companies involved often use PLCs with the bus technology in its
control mode.
• Overall, the PLC is applied in both analogue data recording in the glass
production, and in digital quality and position control.

Electronics 3: Electronic Systems and Design


R.A. ALIMUIN
• Manufacturing cement involves mixing various raw materials in a kiln. The
quality of these raw materials and their proportions significantly impact the
quality of the final product. To ensure the use of the right quality and
quantities of raw materials, the accuracy of data regarding such process
variables is of the essence.

• A distributed control system comprised of PLC in its user mode and a


configuration software are used in the industry’s production and
management processes. The PLC in particular, controls ball milling, coal
kiln and shaft kiln.

• the paper industry, PLCs are used in various processes. These include
controlling the machines that produce paper products at high speeds.
Electronics 3: Electronic Systems and Design
R.A. ALIMUIN
• Other examples of PLC programming applications that are in use in various
industries today include water tank quenching systems in the aerospace
sector, filling machine control system in the food industry, – industrial batch
washing machine control and closed loop textile shrinkage systems.

• PLC is also used in the coal-fired boiler fan change-over system in


hospitals, corrugation machine control system and silo feeding as well as
injection molding control systems in the plastic industry.

• PLC are also in different sectors in the industry, from commercial, to


domestic, and in education.

Electronics 3: Electronic Systems and Design


R.A. ALIMUIN
https://www.allaboutcircuits.com/textbook/digital/chpt-6/programmable-l
ogic-controllers-plc/

https://www.amci.com/industrial-automation-resources/plc-automation-t
utorials/what-plc/?fbclid=IwAR1a5T_8WJavcWA01pCNE7i1rIGNFlS1ef
D6sbb0W2bb2Gw9wkGIlEUj-6c

https://www.electrical4u.com/programmable-logic-controllers/?fbclid=Iw
AR3xNftgvNXe2qNXVTwQp4Of3ELHxLAu_6cHJwfPHW269eOJCLvBB
mAqMhI

Electronics 3: Electronic Systems and Design


R.A. ALIMUIN

You might also like