Professional Documents
Culture Documents
Manufacturing Systems
Exercise
1) on-off control,
2) sequential control,
3) feedback control, and
4) motion control.
CONTROL DEVICES
1) mechanical control - cam, governor, etc.,
2) pneumatic control - compressed air, valves, etc.
3) electromechanical control - switches, relays, a timer,
counters, etc,
4) electronics control - similar to electromechanical
control, except uses electronic switches.
5) computer control.
PROGRAMMABLE LOGIC
CONTROLLER
Invented in 1968 as a substitute for hardwired relay panels.
Working
memory
registers
PLC Configuration
What devices does a PLC interact with?
• INPUT RELAYS-(contacts)These are connected to the outside
world. They physically exist and receive signals from switches,
sensors, etc. Typically they are not relays but rather they are
transistors.
• INTERNAL UTILITY RELAYS-(contacts) These do not receive
signals from the outside world nor do they physically exist. They are
simulated relays and are what enables a PLC to eliminate external
relays. There are also some special relays that are dedicated to
performing only one task. Some are always on while some are always
off. Some are on only once during power-on and are typically used for
initializing data that was stored.
• COUNTERS-These again do not physically exist. They are simulated
counters and they can be programmed to count pulses. Typically these
counters can count up, down or both up and down. Since they are
simulated they are limited in their counting speed. Some
manufacturers also include high-speed counters that are hardware
based. We can think of these as physically existing. Most times these
counters can count up, down or up and down.
What devices does a PLC interact with?
Continued
• TIMERS-These also do not physically exist. They come in many
varieties and increments. The most common type is an on-delay type.
Others include off-delay and both retentive and non-retentive types.
Increments vary from 1ms through 1s.
• OUTPUT RELAYS-(coils)These are connected to the outside world.
They physically exist and send on/off signals to solenoids, lights, etc.
They can be transistors, relays, or triacs depending upon the model
chosen.
• DATA STORAGE-Typically there are registers assigned to simply
store data. They are usually used as temporary storage for math or
data manipulation. They can also typically be used to store data when
power is removed from the PLC. Upon power-up they will still have
the same contents as before power was removed. Very convenient
and necessary!!
SWITCHES
Non-locking Locking
P1
Double pole
Single Pole single throw
P2
(DPST)
Double Multiple Throw Multiple Pole
switch
Throw
(SPDT
Break-before-make Make-before-break
TERMS
Throw - number of states
Pole - number of connecting moving parts (number of individual circuits).
SPDT
A serial switch box (A-B box) has
two 25 pin serial ports to switch from.
A B
Output
DPST Input
Knob
TYPES OF SWITCHES
1. Basic switch, operated by a mechanical level,
2. Push-button switch,
3. Slide switch,
4. Thumbwheel switch,
5. Limit switch,
6. Proximity switch, and
7. Photoelectric switch.
contact
coil
input
Accumulator
reset
contact
output
Input
Rese t
Output
Count 0 12 3 4 5 0 1
TIMER
A timer consists of an internal clock, a count value register,
and an accumulator. It is used for or some timing purpose.
Clock
Accumulator
reset
Register
Clock
contact
Contact
Reset
output
Output
Count 0 1 2 3 4 5
Time 5 seconds.
AN EXAMPLE OF RELAY LOGIC
For process control, it is desired to have the process start (by turning
on a motor) five seconds after a part touches a limit switch. The
process is terminated automatically when the finished part touches a
second limit switch. An emergency switch will stop the process any
time when it is pushed.
L1
LS1 PB1 LS2 R1
R1
TIMER R2
R1
PR=5
PLC ARCHITECTURE
Programmable controllers replace most of the relay panel
wiring by software programming.
PC
Program
Loader
Switches
Printer
I/O
Processor
Modules Machines
Cassette
Loader
Power
EPROM Memory Supply
Loader
A typical PLC
PLC COMPONENTS
1. Processor Microprocessor based, may allow arithmetic
operations, logic operators, block memory moves,
computer interface, local area network, functions, etc.
With such a diagram the power supply for the circuits is always shown as
two vertical lines with the rest of the circuit as horizontal lines. The
power lines, or rails as they are often termed, are like the vertical sides of
a ladder with the horizontal circuit lines like the rungs of the ladder. The
horizontal rungs show only the control portion of the circuit; in the case
of Figure 11.1 it is just the switch in series with the motor.
Circuit diagrams often show the relative physical location of the circuit
components and how they are actually wired. With ladder diagrams no
attempt is made to show the actualphysical locations and the emphasis is
on clearly showing how the control is exercised.
Ladder Diagrams
3. A ladder diagram is read from left to right and from top to bottom,
Figure 11.3 showing the scanning motion employed by the PLC. The top
rung is read from left to right. Then the second rung down is read from
left to right and so on.
PLC Ladder Programming
In drawing a ladder diagram, certain conventions are adopted:
When the PLC is in its run mode, it goes through the entire ladder
program to the end, the end rung of the program being clearly denoted,
and then promptly resumes at the start. This procedure of going through
all the rungs of the program is termed a cycle. The end rung might be
indicated by a block with the word END or RET for return, since the
program promptly returns to its beginning.
4. Each rung must start with an input or inputs and must end with at least
one output. The term input is used for a control action, such as closing
the contacts of a switch, used as an input to the PLC. The term output is
used for a device connected to the output of a PLC, e.g., a motor.
6. A particular device can appear in more than one rung of a ladder. For
example, we might have a relay that switches on one or more devices.
The same letters and/or numbers are used to label the device in each
situation.
7. The inputs and outputs are all identified by their addresses, the
notation used depending on the PLC manufacturer. This is the address of
the input or output in the memory of the PLC.
LADDER DIAGRAM
A ladder diagram (also called contact symbology) is a
means of graphically representing the logic required in
a relay logic system.
Rail
start emergency stop
PB1 PB2
R1
Rung R1
R1
A
Ladder Representation
PLC WIRING DIAGRAM
01 01 02 20 11 A
02 12
20
03
20 11
External
switches
Stored program
SCAN
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. Output
Input
begin
Idle
Scan cycle
Resolve
logic
PLC INSTRUCTIONS
1) Relay,
2) Timer and counter,
3) Program control,
4) Arithmetic,
5) Data manipulation,
6) Data transfer, and
7) Others, such as sequencers.
LOGIC STATES
ON : TRUE, contact closure, energize, etc.
OFF: FALSE, contact open , de-energize, etc.
Do not confuse the internal relay and program with the external
switch and relay.
Internal symbols are used for programming.
External devices provide actual interface.
(In the notes we use the symbol "~" to represent negation. AND
and OR are logic operators. )
AND and OR LOGIC
PB1 PB2 R1
R1 = PB1.AND.PB2
PB1 R1
OR PB2
COMBINED AND & OR
PB1 R1
PB2 pb3
RELAY
A Relay consists of two parts, the coil and the contact(s).
Contacts:
a. Normally open -| |-
b. Normally closed -|/|-
c. Off-on transitional -||-
d. On-off transitional -| |-
()
Coil:
a. Energize Coil -( )-
b. De-energize -(/)-
c. Latch -(L)-
d. Unlatch -(U)-
TIMERS AND COUNTERS
Input
True False True
Timers: RTO counting stop counting
resume
a. Retentive on delay -(RTO)- RTF stop counting stop
b. Retentive off delay -(RTF)-
c. Reset -(RST)-
RTO reach PR value, output ON
RTF reach PR value, output OFF
Counter:
PR value in 0.1 second
a. Counter up -(CTU)-
b. Counter down -(CTD)-
c. Counter reset -(CTR)-
SEQUENCER
Sequencers are used with machines or processes involving repeating
operating cycles which can be segmented into steps.
Output
Step A B C Dwell time
1 ON OFF OFF 5 sec.
2 ON ON OFF 10 sec.
3 OFF OFF ON 3 sec.
4 OFF ON OFF 9 sec.
Rockwell/ Allen Bradley PLC
I/O points are numbered, they correspond to the I/O
slot on the PLC.
I/O uses 1-32
Internal relays use 033 - 098
Internal timers/counters/sequencers use 901-932
Status 951-982
Programming a PLC
Oil is consumed randomly.
The tank needs to be
refilled by turning on a
pump. Two hydrostatic
switches are used to detect
a high and low level.
Ladder Logic for Tank
Logic for Ladder Solution
Logic for Ladder Solution
When the water level is below both switches, the float switch physical contacts are both
closed, and a true (logic 1) value is passed to the Fill Valve output. Water begins to fill
the tank. The internal "Fill Valve" contact latches the circuit so that even when the "Low
Level" contact opens (as the water passes the lower switch), the fill valve remains on.
Since the High Level is also normally closed, water continues to flow as the water level
remains between the two switch levels. Once the water level rises enough so that the
"High Level" switch is off (opened), the PLC will shut the inlet to stop the water from
overflowing; this is an example of seal-in (latching) logic. The output is sealed in until a
high level condition breaks the circuit. After that the fill valve remains off until the level
drops so low that the Low Level switch is activated, and the process repeats again.
How does it work?
How does it work?
Programmable Logic Controllers (PLC)
Industrial control circuits are designed to serve several functions:
i. Switching: It is necessary to switch on control elements to operate
actuators like hydraulic cylinders, electric motors, pneumatic valves etc.
For example, a pneumatic or hydraulic cylinder may be used to actuate
the door closing function in a CNC machine.
ii. Sequencing: Certain functions in machines should be performed in a
particular order. For example, if two cylinders, shown in Fig. 11.2 are to
be operated in sequence, the sequence may be any one of the following:
(iii) Output module: The output module interfaces the output devices like
contactors, lamps, relays, solenoid valves etc. with the CPU. The output
module acts in just opposite manner to input module. A signal from CPU
is received by the output module, once for each scan. If the CPU signal
code matches the assigned number of the module the module is turned
on. The output modules will have 4,6,8,12,16 or 32 terminals.
(iv) Power supply
(v) Racks and chassis to mount the elements
OPERATION OF A PLC
Figure 11.4 shows the operational sequence of a PLC. The PLC system
software executes the user program. The speed with which the operations
are carried out will depend upon the specifications of the microprocessor.
The usual method of operation of a PLC is to scan all the inputs, process
the user program and then scan all outputs. This is called a scan cycle.
Part Conveyor
Robot
Machine
Jefferson street
Cycle time
Main 3 1 4
Jefferson 5 1 2
WIRING DIAGRAM
input output
64 Jefferso n Red
65 Jefferso n Yellow
Programmable
Controller
66 Jefferso n Green
67 Main Red
70 Main Yellow
71 Main Green
PROGRAM (1) 901
RUNG1 RTO
80
901 901
RUNG2 RST
901 902
RUNG3 67 M. Red
902
RUNG4 67
RTO
30
RUNG5 901 902
RST
901 903
RUNG6 66 J. Green
903
RUNG7 66
RTO
901 903 20
RUNG8 RST
902 904 M. Green
RUNG9 71
904
71
RUNG10 RTO
901 904 40
RUNG11 RST
904 905
RUNG12 70 M. Yellow
PROGRAM (2)
905
70
RUNG13 RTO
901 905 10
RUNG14 RST
903 906
RUNG15 65 J. Yellow
906
65
RUNG16 RTO
901 906 10
RUNG17 RST
902 907
RUNG18 64 J. Red
907
RUNG19 64
RTO
901 907 50
RUNG 20 RST