CH 4 Intro To PLC
CH 4 Intro To PLC
Hard-wired Control
Relay as main components
Any modification in control program
involves re-wiring of the circuit
Cumbersome and difficult to modify
when production requirement changes
regularly
Difficult to maintain because any small
problem in design could be a major
problem in terms of tracing and rewiring
Mechanical Relays and switches failed
regularly (coil failure, contact wear and
contamination, etc.)
Difficult to diagnose problems and
replace relays and switches
Consumed a lot of power
PLC Advantages
Easily programmed & reprogrammed
High reliability and
flexibility
Capable of performing
complex mathematics
functions
Less wiring
Wiring between devices
and relay contacts are
done in the PLC program
Easier and faster to make
changes
PLC
Definition by IEC 1131 (PLC standard):
A digitally operating electronic system,
designed for use in an industrial environment,
which uses a programmable memory for the
internal storage of user-oriented instructions
for implementing specific functions such as
logic, sequencing, timing, accounting and
arithmetic, to control through digital or analog
inputs and outputs, various types of machines
or processes.
Special features:
1. Rugged and are designed to withstand vibrations, temperature, humidity
and noise
2. The interfacing for input and output is part of controller
3. Easily programmable and primarily use logic and switching functions
PLC Origin
- Developed to replace relays in the late 1960s
- Costs dropped and became popular by 1980s
- Now used in many industrial designs
EUROPEAN
JAPANESE
1.
2.
3.
4.
5.
6.
7.
1.
2.
3.
4.
1.
2.
3.
4.
Allen Bradley
Gould Modicon
Texas Instruments
General Electric
Westinghouse
Cutter Hammer
Square D
Siemens
Klockner & Mouller
Festo
Telemechanique
Toshiba
Omron
Fanuc
Mitsubishi
7
PLC Applications
Manufacturing / Machining
Food / Beverage
Metals
Power
Mining
Petrochemical / Chemical
PLC Sizes
1. SMALL
2. MEDIUM
3. LARGE
Hardwired Relay
PLC
Reliability
Low
High
Size of controller
Bulky
Compact
Programming
Time consuming
Easy
Flexibility
Re-wiring required
Re-programming
required
Cost
Expensive
Less expensive
Maintenance
Poor
Minimum
Difficult
Power consumption
High
Low
I M
N O
P D
U U
T L
E
PROCESSOR
From SENSORS
Pushbuttons,
contacts,
limit switches, etc.
PROGRAMMING
DEVICE
O
U
T
P
U
T
M
O
D
U
L
E
To OUTPUT
Solenoids,
contactors,
alarms, etc.
I/O MODULES
Provides signal conversion and isolation between the
internal logic- level signals inside the PLC and the fields
high level signal.
13
PROGRAMMING DEVICE
Used to enter the desired program that will determine the
sequence of operation and control of process equipment or
driven machine.
14
16
I/O Module
The I/O interface section of a PLC connects it to external
field devices.
The main purpose of the I/O interface is to condition the
various signals received from or sent to the external input
and output devices.
Input modules converts signals from discrete or analog
input devices to logic levels acceptable to PLCs processor.
Output modules converts signal from the processor to
levels capable of driving the connected discrete or analog
output devices.
17
I/O Module
DC INPUT MODULE
IS NEEDED TO:
Prevent voltage
transients from
damaging the
processor.
Helps reduce the
effects of
electrical noise
USE TO
DROP THE
VOLTAGE
TO LOGIC
LEVEL
FROM
INPUT
DEVICE
Current
Limiting
Resistor
OPTOISOLATOR
Buffer,
Filter,
hysteresis
Circuits
TO
PROCESSOR
18
I/O Module
AC INPUT MODULE
IS NEEDED TO:
Prevent voltage
transients from
damaging the
processor.
Helps reduce the
effects of
electrical noise
CONVERTS THE AC
INPUT TO DC AND
DROPS THE
VOLTAGE TO LOGIC
LEVEL
FROM
INPUT
DEVICE
Rectifier,
Resistor
Network
OPTOISOLATOR
Buffer,
Filter,
Hysteresis
Circuits
TO
PROCESSOR
19
Input Connections
20
I/O Module
DC / AC OUTPUT MODULE
IS NEEDED TO:
Prevent voltage
transients from
damaging the
processor.
Helps reduce the
effects of
electrical noise
FROM
PROCESSOR
TTL
Circuits
OPTOISOLATOR
Amplifier
RELAY
TRIAC
XSISTOR
TO
OUTPUT
DEVICE
21
Output Connections
DC Output Wiring
Connections
AC Output Wiring
Connections
I/O Circuits
1. Pilot Duty Outputs
Typically are used to drive high-current electromagnetic loads e.g.
solenoids, relays, valves, and motor starters.
These loads are highly inductive and exhibit a large inrush current.
Pilot duty outputs should be capable of withstanding an inrush current of
10 times the rated load for a short period of time without failure.
2. General - Purpose Outputs
Usually low-voltage and low-current and are used to drive indicating
lights and other non-inductive loads.
Noise suppression may or may not be included on this types of
modules.
3. Discrete Inputs
Used to sense the status of limit switches, push buttons, and other
discrete sensors.
Noise suppression is of great importance in preventing false indication
of inputs turning on or off because of noise.
23
I/O Circuits
4. Analog I/O
Circuits of this type sense or drive analog signals.
Analog inputs come from devices, such as thermocouples, strain gages,
or pressure sensors, that provide a signal voltage or current that is
derived from the process variable.
Standard Analog Input signals: 4-20mA; 0-10V
Analog outputs can be used to drive devices such as voltmeters, X-Y
recorders, servomotor drives, and valves through the use of
transducers.
Standard Analog Output signals: 4-20mA; 0-5V; 0-10V
5. Special - Purpose I/O
Used to interface PLCs to very specific types of circuits such as
servomotors, stepping motors PID (proportional plus integral plus
derivative) loops, high-speed pulse counting, resolver and decoder
inputs, multiplexed displays, and keyboards.
This module allows for limited access to timer and counter presets and
other PLC variables without requiring a program loader.
24
Discrete Input
A discrete input also referred as digital input is an input that is either ON or
OFF are connected to the PLC digital input. In the ON condition it is referred to
as logic 1 or a logic high and in the OFF condition maybe referred to as logic o
or logic low.
NO Momentary PB
NC Momentary PB
NO switch
NC switch
NO contact
NC contact
IN
OFF
Logic 0
PLC
Input
Module
24 V dc
IN
OFF
Logic 1
PLC
Input
Module
24 V dc
26
Analog Input
Tank
IN
PLC
Analog
Input
Module
Digital Output
A discrete output is either in an ON or OFF condition.
Solenoids, contactors coils, lamps are example of devices
connected to the discrete or digital outputs.
Below, the lamp can be turned ON or OFF by the PLC output.
OUT
PLC
Lamp
Digital
Output
Module
28
Analog Output
An analog output is an output signal that has a continuous signal.
Typical outputs may vary from 0 to 20mA, 4 to 20mA or 0 to10V.
PLC
0 to 10V
Analog
Output
Module
Supply air
29
PLC Operation
Read all field input devices via the
input interfaces, execute the user
program stored in application
memory, then, based on whatever
control scheme has been
programmed by the user, turn the
field output devices on or off, or
perform whatever control is necessary
for the process application.
This process of sequentially reading
the inputs, executing the program in
memory, and updating the outputs is
known as scanning.
While the PLC is running, the scanning
process includes the following four
phases, which are repeated
continuously as individual cycles of
operation:
PHASE 1
Read Inputs
Scan
PHASE 2
Program
Execution
PHASE 3
Diagnostics/
Comm
PHASE 4
Output
Scan
A PLC scan cycle begins with the CPU reading the status of its inputs
Once the program is executed, the CPU performs diagnostics and communication
tasks
An output status scan is then performed, whereby the stored output values are sent
to actuators and other field output devices. The cycle ends by updating the outputs.
As soon as Phase 4 completed, the entire cycle begins again with Phase 1 input scan.
The time it takes to implement a scan cycle is called SCAN TIME. The scan time
composed of the program scan time, which is the time required for solving the control
program, and the I/O update time, or time required to read inputs and update
outputs. The program scan time generally depends on the amount of memory taken by
the control program and type of instructions used in the program. The time to make a
single scan can vary from 1 ms to 100 ms.
PLC Setup
List of parts:
1. OMRON CPM2A PLC
2. RS232 Serial Cable
3. UC-232A USB-to-Serial Converter
4. CX-Programmer Software
Power
Cable
Output
Lamps
Switch
Selector
CPM2A
PLC
Input
Sockets
Output
Sockets
RS232
Port
Input Switches
0.01
0.02
0.03
0.04
0.05
0.06
0.07
0.08
0.09
0.10
0.11
COM
1CH
1.00
1.01
1.02
1.03
1.04
1.05
1.06
1.07
1.08
1.09
1.10
1.11
OMRON CPM2A
11.00 COM
11.01
COM
11.02 11.03
11.07 COM
11CH
10.00 COM
10.01
COM
10.02 10.03
10.07 COM
10CH
Connection to PLC
Response
Command
USB-to-Serial Conv.
RS-232 Cable
CPM2A PLC
Start
ON
OFF
M
Start
ON
OFF
M
The process:
When PB1 is
momentarily
pressed, motor
M is switched
ON
When PB2 is
momentarily
pressed, motor
M is switched
OFF
Ladder diagram:
24 V
0V
PB1
PB2
ON
ON
H/W
M
ON
S/W
Hardware Implementation
+
NO PB1_ON
24 V DC
NC PB2_OFF
0CH
0.00
0.01
0.02
0.03
0.04
0.05
0.06
0.07
0.08
0.09
0.10
0.11
COM
1CH
1.00
1.01
1.02
1.03
1.04
1.05
1.06
1.07
1.08
1.09
1.10
1.11
OMRON CPM2A
11.00 COM
11.01
COM
11.02 11.03
11.07 COM
11CH
10.00 COM
10.01
COM
10.02 10.03
10.07 COM
10CH
CONTACTOR
MOTOR
L
~ 240 V AC
N