Professional Documents
Culture Documents
Automation
Automation
1 / 63
Programmable Logic Control (PLCs)
1 Introduction to Relay control system
2 Programmable Logic Control (PLC)
PLC components
PLC Programming Languages
Elements of Ladder Diagram
3 PLC Digital Programming
Timers/Counters
Ladder Diagram (LAD) Programming
4 PLC Analog Programming
Conversion Operation
PLC Compare Instruction
5 Technical Specification
2 / 63
Introduction to Relay control system
3 / 63
Introduction to Relay control system
4 / 63
Programmable Logic Control (PLC)
Although relays are used for control logic, they are still essential for
switching large power loads.
5 / 63
Programmable Logic Control (PLC)
PLC Circuits
6 / 63
Programmable Logic Control (PLC)
PLC
It is a special form of microprocessor-based controller that uses pro-
grammable memory to store instructions and to implement functions
such as logic, sequencing, timing, counting, and arithmetic in order
to control machines and processes
Areas of applications
Manufacturing / Machining
Food / Beverage
Mining
Petrochemical / Chemical
7 / 63
Programmable Logic Control (PLC)
Advantages of PLCs
Wiring between input and output devices are done in the PLC
program, because relays lack flexibility
Troubleshooting aids make programming easier and faster to
make changes
Reliable components of PLC makes these to operate for years
before failure, because PLC’s are rugged and designed to
withstand vibrations, temperature , humidity and noise
9 / 63
Programmable Logic Control (PLC)
PLC components
11 / 63
Programmable Logic Control (PLC)
PLC components
13 / 63
Programmable Logic Control (PLC)
PLC components
14 / 63
Programmable Logic Control (PLC)
PLC components
15 / 63
Programmable Logic Control (PLC)
PLC components
16 / 63
Programmable Logic Control (PLC)
PLC Programming Languages
17 / 63
Programmable Logic Control (PLC)
PLC Programming Languages
Examples
LD: Ladder Diagram
ST Sleeve-in
SFC: Sequential Function Chart
Instruction List (IL) Mnemonics
21 / 63
PLC Digital Programming
NO Contact of PLC
The NO contact scans for the signal state ON (1) at the specified
bit address.
This contact is used for scanning the signal state of input devices
or output devices or other internal program elements such as timer
and counter.
22 / 63
PLC Digital Programming
23 / 63
PLC Digital Programming
24 / 63
PLC Digital Programming
NC Contact of PLC
PLC NC contact scans for the signal state OFF (0) at the specified
bit address.
25 / 63
PLC Digital Programming
26 / 63
PLC Digital Programming
27 / 63
PLC Digital Programming
Latch Circuit
Coil Sets a bit when the rung is true(1) and resets the bit when the
rung is false (0)
After being energized,
latch circuit
maintains that state.
If power fails, latch
rung will be
de-energized. When
power is restored,
machine will not
automatically
restarted, it can be
manually restarted by
pressing START
28 / 63
PLC Digital Programming
Timers/Counters
Timers/Counters
29 / 63
PLC Digital Programming
Timers/Counters
PLC Timers
The number of timers that you can use in your user program is
limited only by the amount of memory in the CPU.
There are many types of timers but the most common types are
PLC on delay timer
PLC off delay timer
30 / 63
PLC Digital Programming
Timers/Counters
When the duration PT expires, the output Q has the signal state
1. Output Q remains set as long as the start input is still 1. When
the signal state at the start input changes from 1 to 0, output Q is
reset.
31 / 63
PLC Digital Programming
Timers/Counters
The timer function is started again when a new positive signal edge
is detected at the start input.
The current time value can be queried at the ET output. The time
value starts at T #0s and ends when the value of duration PT is
reached. The ET output is reset as soon as the signal state at the
IN input changes to 0.
32 / 63
PLC Digital Programming
Timers/Counters
33 / 63
PLC Digital Programming
Timers/Counters
34 / 63
PLC Digital Programming
Timers/Counters
The time value starts at T #0s and ends when the value of dura-
tion PT is reached. When the duration PT expires, the ET output
remains set to the current value until input IN changes back to 1.
35 / 63
PLC Digital Programming
Timers/Counters
PLC Counters
Counters are used to detect pieces numbers and events. There are
two basic counter types a) Count Up (CTU) b) Count down (CTD)
Example: When the input to count up counter goes true the accu-
mulator value will increase by 1. If the accumulator value reaches
the preset value the counter bit will be set.
A count down counter will decrease the accumulator value until the
preset value is reached.
36 / 63
PLC Digital Programming
Timers/Counters
Count Up
The CTU counter counts up by 1 when the value of parameter CU
changes from 0 to 1. The CTU timing diagram shows the operation
of unsigned integer count value (where PV = 3).
If the value of parameter CV (current count value) is greater
than or equal to the value of parameter PV (preset count
value), then the counter output parameter Q = 1.
If the value of the reset parameter R changes from 0 to 1,
then the current count value is reset to 0.
37 / 63
PLC Digital Programming
Timers/Counters
Count Down
The CTD counter counts down by 1 when the value of parameter CD
changes from 0 to 1. The CTD timing diagram shows the operation
for an unsigned integer count value (where PV = 3).
If the value of parameter CV (current count value) is equal to
or less than 0, the counter output parameter Q = 1.
If the value of parameter LOAD changes from 0 to 1, the
value at parameter PV (preset value) is loaded to the counter
as the new CV (current count value).
38 / 63
PLC Digital Programming
Timers/Counters
39 / 63
PLC Digital Programming
Ladder Diagram (LAD) Programming
LAD Programming
The ladder diagram provides graphic display of program flow and
strongly resembles to relay logic. It provide a method to symbolically
show how relay control schemes are implemented.
40 / 63
PLC Digital Programming
Ladder Diagram (LAD) Programming
42 / 63
PLC Digital Programming
Ladder Diagram (LAD) Programming
Example1
Switching a lamp using push button using Omron PLC
43 / 63
PLC Digital Programming
Ladder Diagram (LAD) Programming
44 / 63
PLC Digital Programming
Ladder Diagram (LAD) Programming
45 / 63
PLC Digital Programming
Ladder Diagram (LAD) Programming
46 / 63
PLC Digital Programming
Ladder Diagram (LAD) Programming
47 / 63
PLC Digital Programming
Ladder Diagram (LAD) Programming
48 / 63
PLC Digital Programming
Ladder Diagram (LAD) Programming
49 / 63
PLC Digital Programming
Ladder Diagram (LAD) Programming
50 / 63
PLC Digital Programming
Ladder Diagram (LAD) Programming
Example
The process of making tea every day in the morning for seven days
(water in the tank is enough for 7 days) is given in the figure below
51 / 63
PLC Digital Programming
Ladder Diagram (LAD) Programming
Procedure
When pressing the start button, valve1 (V1) opens, so the water
pass through the valve to the heating tank.
When the water level reaches the float switch (FS), the valve should
close and heating must begin.
When the temperature reach the required level the thermostat dis-
connects the heater element E and opens valve2 (V2) for 10 seconds
then the alarm bell B is activated to show the sign that tea is ready.
52 / 63
PLC Analog Programming
For example: The speed range of 500 ... 1500 r/min can be con-
verted by means of a transducer into a voltage range of 0 ... +10V.
If a speed of 865 rpm is measured, the transducer would read out a
voltage of +3.65 V. 53 / 63
PLC Analog Programming
The more binary digits are used for digital representation, the finer
is the resolution. with 1 bit, the range is divided into 2; 0...+5V
or +5V ... +10V. With 2 bits, the range can be divided into 4
individual ranges; i.e. 0 ... 2.5/2.5 ... 5/5 ... 7.5/7.5 ... 10V
54 / 63
PLC Analog Programming
55 / 63
PLC Analog Programming
Note: For analog value processing, the data types ’INT’ and ’REAL’
play an important part since entered analog values are present as
integers in the format ’INT’ and for accurate further processing,
only floating point numbers ’REAL’ can be used because of the
rounding off error in the case of ’INT’.
56 / 63
PLC Analog Programming
Conversion Operation
Conversion Operation
57 / 63
PLC Analog Programming
Conversion Operation
Normalizing Instructions
If an analog input value is present as digitalized value, it usually
has to be normalized so that the numerical values correspond to
the physical values in the process. Likewise, the analog output to
the output word usually takes place only after the output value is
normalized.
59 / 63
PLC Analog Programming
PLC Compare Instruction
Normalize the input to a value between 0.0 and 1.0, and then scale it
between -30.0 and 70.0 o C . The resulting value is the temperature
represented by the analog input in o C :
60 / 63
PLC Analog Programming
PLC Compare Instruction
61 / 63
PLC Analog Programming
PLC Compare Instruction
62 / 63
Technical Specification
63 / 63