MIME 5070
Computer Aided
Manufacturing
Chapter 7
Programmable Logic Controllers
Fall 2004
Avijit Sarkar
asarkar@[Link]
[Link]
arkar/
1
Decisions in a Manufacturing
System
Depend on values associated with
various inputs or variables
Examples
Is a machine turned on?
Is the coolant off?
Has a MH truck arrived at the dock?
How deep is the hole?
What is the cutting speed?
What is the required surface finish?
2
Decision by Attributes
Decision can be made by answering YES or NO to
a particular question
Also referred to as
Logical decisions
Go NoGo decisions
Amenable to implementation using logical control
Programmable Logic Controllers (PLC) widely
used in manufacturing to implement logical
control
Logical control: controlling the value of logical
variables
3
Decision by Variables
A decision which cannot be made by
answering YES or NO to a question
Less amenable to logical control
More amenable to numerical control
Can be made suitable for logical
automation if it can be broken down
to a series of elementary attribute
type questions
4
Introduction to Automation
To automate a manufacturing system,
not only the control devices need to be
automated but also the flow of
information needs to be automated
Types of controllers
Mechanical
Pneumatic
Electromechanical
Electronic
Computer
Programmable Logic Controllers (PLCs)
5
Functions of
Controllers
1) on-off
control: switches a device on/off
based on the state of a sensor. Example:
thermostat
2) sequential control: used to control a
sequence of events (for example, in a
manufacturing operation).
3) feedback control: provides feedback on
the state of a system (for example,
temperature of a furnace)
4) motion control: used to control motion
(for example, the RPM of a motor)
Programmable Logic
Controllers
PLCs
are electronic interface devices
(PLCs)
used to perform logic operations on input
signals in order to generate a series of
desired output signals or responses
Inputs
Digital signals
Push buttons, microswitches, photocells, limit
switches, and proximity switches
Analog signals
Thermocouples, voltmeters
Outputs
Motors, valves, motor starters, conveyors,
robots etc.
7
Components of PLC
Logic Control and Boolean
Logic
Logic control system: Also referred to as combinational
Operators
logic,
is a switching system whose output at any
moment is determined exclusively by the values of
inputs
Inputs: logical variables
Can have only two possible values
TRUE and FALSE
On-off setting in a mechanical system
High-low voltage in an electronic device
1/0 in binary data representation
Relationships between logical variables constitutes a
logical expression
Logical expressions can be represented by Boolean
algebra
9
Three Basic Operators
Three basic Boolean operators are
used to construct logical
expressions using Boolean logic
AND
OR
NOT
10
AND Operator
Analogous to series connection in an electrical circuit
Allows current to flow only when both inputs are ON
AND operator: O = A.B
0
0
0
1
11
OR Operator & NOT
Operator
OR operator: O= A+B
Analogous to parallel connection in an
electrical circuit
Allows current to flow when if one (or both)
inputs is (are) ON
0
1
1
1
1
0
12
Some Other Operators
13
Symbols for Logic Gates
14
Ladder Diagram
Makes use of representations similar to
electrical circuits
Each rung in the ladder represents a set
of logical relationships between the
inputs that lead to a particular output
The output from one rung of the ladder
could be used as an input in another rung
of the same ladder
Assume all rungs of the ladder are
executed simultaneously unless
otherwise stated
15
Example
Develop a simple ladder diagram
that will allow three switches in a
room to control a single light for
the following cases:
Any of the switches ON will turn the
light ON, but all three must be OFF for
the light to be OFF
Each switch can turn the light ON or
OFF, regardless of the states of the
other switches
16
Scan Cycle
A PLC resolves the logic of a ladder diagram (program) rung by
rung, from the top to the bottom. Usually, all the outputs are
updated based on the status of the internal registers. Then the
input states are checked and the corresponding input registers
are updated. Only after the I/Os have been resolved, is the
program then executed. This process is run in a endless cycle.
The time it takes to finish one cycle is called the scan time. In
some controllers the idle state is eliminated. In this case, the
scan time varies depends on the program length
17
PLC Example 1 - Robotic
Material Handling Control
A robot is used to load/unload parts to a machine from a
System
conveyor.
When the part touches a microswitch, it is scanned
by a barcode reader to identify it. If the part is correct, a
stopper is activated to stop it. A robot is used to pick up the
part and load onto the machine if the robot and the machine
are idle. Otherwise robot waits to unload machine.
18
Solution
19
Example 2
A robot is used to unload finished parts from a
machine onto an AGV and to load raw parts
from the AGV to the machine. Assume that
there are sensors at the AGVs docking station
to indicate the arrival of a vehicle and onboard
sensors indicating whether the machine is
loaded with a part and also to signal
completion of part processing. The robot is
required to unload a processed part from the
machine onto the AGV, pick up a new part for
processing from the AGV, and load it onto the
machine. The AGV is to be dispatched after
completion of the cycle. Construct a ladder
diagram for this task.
20
Solution
I/O
Associated Action
01
AGV has arrived
02
AGV is carrying a new part to be processed
03
AGV has space to store a processed part
04
Machine has a finished part to be unloaded
20
Unload old part from machine onto AGV
21
Pick new part from AGV and load onto the machine
22
Dispatch AGV
01
03
20
01
20
02
21
Ladder Diagram
04
21
22
02
20
01
04
04
21
Example 3 (use of timers)
During the powder metallurgy process, a
punch is used to press blended metal powder
into a compact inside a die. A pushbutton is
used to start the process. When the start
button is pressed, the die is filled with powder.
The punch is then advanced and it applies
pressure to the powder for 10 seconds after
which it is retracted. The pressed compact is
ejected from the die and the cycle repeats.
The cycle can be interrupted by pressing a
stop button. If the stop button is pressed, the
punch is required to retract (if it had been
advanced) before the process is stopped.
Construct a ladder diagram for this task.
22
0
2
0
1
Solution
3
4
30
I/O
Associated Action
01
Start button
02
Stop button
T1
Timer (with limit of 10
seconds)
30
Fill die
31
Advance punch
32
Retract punch
34
Eject part (compact)
3
0
3
1
T
1
T
1
0
2
3
2
0
2
3
1
T1
limit =
10 s
3
2
3
4
23
Explanation of Example 3
When the start button is pushed to initiate the
process, OR if a part has been ejected from the
die (accounts for the process already being in
progress), AND if the stop button has not been
pushed, the die is filled with powder.
After the die is filled, the punch is advanced to
start applying pressure on the powder.
The pressing is timed to last 10s, after which
the timer resets itself.
After the 10s OR any time the stop button is
pressed, the punch retracts.
After the punch retracts OR the stop button
has not been pressed, the part is ejected.
24
Exercise
At the intersection Douglas and Central, a new traffic
light is being installed. The timing for the lights are as
follows:
Road
Dougla
s
Central
Red
30
Yellow
10
Green
40
50
10
20
The lights are controlled by a PLC with the following
outputs: 11: Douglas Red, 12: Douglas Yellow, 13:
Douglas Green, 14: Central Red, 15: Central Yellow, 16:
Central Green. Draw the ladder diagram of the system.
25