Download as pdf or txt
Download as pdf or txt
You are on page 1of 33

DEPARTMENT OF INDUSTRIAL &

SYSTEMS ENGINEERING
COMPUTER INTEGRATED
MANUFACTURING -
CIM360S
WEEK 8
PROGRAMMABLE LOGIC CONTROLLERS
(PLC’S)
1. Discrete Process control*
• Logic control *
• Sequencing *
2. Ladder Logic diagrams *
3. Programmable Logic Controllers
• Components of the PLC
• PLC Operating Cycle
• Additional Capabilities of the PLC
• Programming the PLC
• * - covered in week 7

Ganduri L 2022 2
Programmable Logic Controllers
• A Programmable Logic Controller (PLC) can be
defined as a micro-computer-based controller
that uses stored instructions in programmable
memory to implement logic, sequencing,
timing, counting, and arithmetic functions
through digital or analog input/output (I/O)
modules, for controlling machines and
processes.
• PLC are in both process and discrete industries
• E.g. chemical processing, paper mill
operations, food production
Ganduri L 2022 3
Programmable Logic
Controllers

• Are associated with


discrete manufacturing
industries to control
individual machine cells,
transfer lines, MH
equipment and
automated storage
systems

Ganduri L 2022 4
Advantages of using Programmable
Logic Controllers (PLC’s)
1. Programming the PLC is easier than wiring the relay
control panel
2. The PLC can be reprogrammed whereas conventional
controls must be rewired and are often scrapped
instead
3. The PLCs take less floor space than relay control
panels
4. Reliability is greater, and maintenance is easier
5. The PLC can be connected to computer systems more
easily than relays
6. PLCs can perform a greater variety of control
functions than can relay controls
Ganduri L 2022 5
Components of the PLC

Ganduri L 2022 6
Components of the PLC
1. Processor
2. Memory unit
3. Power supply
4. I/O module
5. Programming device

Ganduri L 2022 7
Processor
• CPU of the programmable controller.
• Executes the various logic and sequencing
functions of operating on the PLC inputs to
determine the appropriate output signals.
• Also contains operating system memory

Ganduri L 2022 8
Memory unit
• Connected to the CPU
• Contains the programs of logic, sequencing and I/O
operations
• Holds data files associated with these programs,
including I/O status bits, counter and timer constants
and other variable and parameter values.
• its contents are entered by the user
• operating system memory - directs the execution of
the control program and coordinates I/O operations
• The operating system is entered by the PLC
manufacturer and cannot be accessed or altered by the
user

Ganduri L 2022 9
Power supply
• A power supply of 115V ac is typically used to
drive the PLC
• It converts the 115V ac into direct current
voltages of +/-5
• These low voltages are used to operate
equipment that may have much higher
voltage and power ratings than the PLC itself.

Ganduri L 2022 10
I/O module
• Provides the connections to the industrial equipment or
process that is to be controlled
• Inputs to the controller are signals from limit switches, push
buttons, sensors etc
• Outputs from controller are on/off signals to operate motors,
valves

Ganduri L 2022 11
Programming device
• Programs the PLC
• The device is detachable from the PLC cabinet to be
shared among different controllers
• Different PLC manufacturers provide different devices,
ranging from simple teach-pendant type devices,
similar to those used in robotics to special PLC
programming keyboards and displays
• Personal computers can also be used to program PLC
but they have to remain connected to the PLC
1. to serve a process of monitoring or supervisory
function and
2. for conventional data processing applications related
to the process
Ganduri L 2022 12
PLC Operating cycle
• The steps in the PLC control program are executed
simultaneously and continuously
• A certain amount of time is required for the PLC
processor to execute the program during one cycle of
operation
• The typical operation cycle of the PLC is called the scan
• It consists of 3parts
1. Input scan
2. Program scan
3. Output scan

Ganduri L 2022 13
Cycle
• During the Input scan, the inputs to the PLC are
read by the processor and the status of these
inputs is stored in the memory
• Next,
• The control program is executed during the
program scan
• The input values stored in the memory are used
in the control logic calculations to determine the
values of the outputs
• Finally, in the output scan – the outputs are
updated to agree with the calculated values
• The time to perform the cycle (scan) = scan time

Ganduri L 2022 14
Scan time (cycle time)
• The scan time depends on:-
1. the number of inputs that must be read,
2. Complexity of control functions to be
performed
3. The number of outputs that must be changed
4. Clock speed of the processor
It typically varies from 1 and 25msec.

Ganduri L 2022 15
Challenges in scan
• Value of input can change immediately after it
has been sampled
• Since the program uses the input values from the
memory, any output values that are dependant
on that input are determined incorrectly
• However the risk is reduced because time
between updates is so short that it is unlikely
that the out put value being incorrect for such a
short time will have a serious effect on the
process operation
Ganduri L 2022 16
Additional capabilities of the PLC
• Principal control operations accomplished by the PLC is
the logic control and sequencing functions
• Additionals include
1. Analog control
2. Arithmetic functions – (addition, subtraction,
multiplication and division)
3. Matrix functions – matrix operations using stored
values in the memory unit, can compare errors on
input and corresponding values
4. Data processing and reporting – business applications
of PLC

Ganduri L 2022 17
Programming the PLC
• Is the means by which the user enters the control
instructions to the PLC through the programming
device
• Basic control instructions consist of switching, logic,
sequencing, counting and timing
• All PLC programming methods provide instruction sets
that include these functions
• Additional instructions are required to accomplish
analog control for continuous processes, complex
control logic, data processing and reporting etc.
• To meet this various PLC languages have been
developed

Ganduri L 2022 18
International std for Programmable
controllers (IIEC 1131-3)
• A standard for PLC programming
• Specifies 3 graphical languages and two text-
based languages for programming PLCs,
respectively
1. Ladder logic diagrams
2. Function block diagrams
3. Sequential functions charts
4. Instruction list (text based)
5. Structured text (text based)

Ganduri L 2022 19
Features of the 5 PLC languages
specified in the IIEC 1131-3
LANGUAGE ABBREVIATION TYPE Application best
suited for
Ladder logic (LD) Graphical Discrete control
diagram
Function block (FBD) Graphical Continuous control
diagram
Sequential function (SFC) Graphical Sequencing
chart
Instruction list (IL) Textual Discrete control
Structured text (ST) Textual Complex logic,
computations etc.

Ganduri L 2022 20
Ladder logic diagram (LD)
• The most widely used PLC programming language
• Very convenient for shop personnel who are familiar
with ladder and circuit diagrams but may not be
familiar with computers and computer programming
• To use (LD), they do not need to learn an entirely new
programming language
• Direct entry of the (LD) into PLC memory requires the
use of a keyboard and monitor with graphics capability
to display symbols representing the components and
their interrelationships in the (LD)

Ganduri L 2022 21
• The PLC keyboard is often designed with keys for each
of the individual symbols (shown in Figure 1)
• Programming is accomplished by inserting the
appropriate components into the rungs of the ladder
diagram
• The components are of two basic types: Contact and
coils (week 7notes)
• Contacts represent input switches, relay contacts and
similar elements
• Coils represent loads such as motors, solenoids, relays
timers and counters
• In effect, the programmer inputs the ladder logic circuit
diagram rung by rung into the PLC memory with the
monitor displaying the results for verification

Ganduri L 2022 22
Figure 1. Symbols used in the ladder
diagrams for logic and sequencing
components
Ladder symbol Hardware component

Normally open contacts (switch, relay, other ON/OFF devices

Normally closed contacts (switch, relay, etc.)

Output loads (motor, lamp, solenoid, alarm etc.

TMR Timer
120S

Counter
CTR

Ganduri L 2022 23
Function block diagrams (FBD)
• (FBD) provides a means of inputting high-level instructions
• Instructions are composed of operational blocks
• Each block has one or more inputs and one or more
outputs
• Within a block, certain operations take place on the inputs
to transform the signals into the desired outputs
• The function blocks include operations such as
1. timers and counters
2. Control computations using equations (e.g. proportional-
integrative-derivative (PID) control)
3. Data manipulation
4. Data transfer to other computer-based systems

Ganduri L 2022 24
Sequential function charts (SFC)
• (SFC) – also called the Grafcet method
• Graphically displays the sequential functions
of an automated system as a series of steps
and transitions from one state of the system
to the next
• Reference – Boucher T.O

Ganduri L 2022 25
Instruction list (IL)
• (IL) programming also provides a way of
entering the ladder logic diagram into PLC
memory
• The programmer uses a low level language to
construct the ladder diagram by entering
statements that specify the various
components and their relationships for each
rung of the ladder diagram
• E.g.

Ganduri L 2022 26
Table 2 : Typical low-level language
instruction set for a PLC
STR Store a new input and start a new rung
T Logical AND referenced with the previously entered element. This is
interpreted as a series circuit relative to the previously entered element
OR Logical OR referenced with the previously entered element. This is
interpreted as a parallel circuit relative to the previously entered element
NOT Logical NOT or inverse of entered element
OUT Output element for the rung of the ladder diagram
TMR Timer element. Requires one input signal to initiate timing sequence. Output
is delayed relative to input by a duration specified by the programmer in
seconds. Resetting the timer is accomplished by iterrrupting (stopping) the
input signal
CTR Counter element. Requires two inputs: one is the incoming pulse train that is
counted by the CTR element, the other is the reset signal indicating a restart
of the counting procedure

Ganduri L 2022 27
In this e.g.
• Let us explain (IL) using the hypothetical PLC (IL)
• Our PLC language is a composite of various
manufacturers languages
• It contains few features than most commercially
available PLCs
• We assume that the programming device has a
keyboard and monitor
• Monitor is useful to verify the ladder logic diagram
• Instructions are in table 2 above with a concise
explanation of each instruction. Let us examine the use
of these commands with several examples

Ganduri L 2022 28
Example: Language Commands for
AND, OR, and NOT circuits
• Using the command set in Table 2 write the
PLC programs for the three ladder diagrams
below, depicting the AND, OR, and NOT
circuits

Ganduri L 2022 29
Ganduri L 2022 30
Ganduri L 2022 31
Commands for the 3circuits are listed
below, with explanatory comments

COMMAND COMMENT
(a) STR X1 Store input X1
AND X2 Input X2 in series with X1
OUT Y Output Y
(b) STR X1 Store input X1
OR X2 Input X2 parallel with X1
OUT Y Output Y
(c) STR NOT X1 Store inverse of X1
OUT Y Output Y
Ganduri L 2022 32
Conclusion
• DESCRIBED
2. Programmable Logic Controllers
• Components of the PLC
• PLC Operating Cycle
• Additional Capabilities of the PLC
• Programming the PLC

Ganduri L 2022 33

You might also like