Basics of Programmable Logic Controller
Basics of Programmable Logic Controller
CONTROLLER
Introduction
Control Type
1.Sequence Control
2.Sophisticated Control
3.Supervisory Control
Sequence control Functions:
I/O update
Program Scan
FACTORS INFLUENCING SCAN TIME
Power Supply
Computer
Signals To
Signals From CPU Solenoids
Input Central Output
Switches Motors
Interface Processing Unit Interfac
Sensors e Heater
Memory
Etc. Lamps
Motor starter
Example of Digital input Connections
A normally (NO) pushbutton is used in the following example.One
side of the pushbutton is connected to the first PLC input.The other
side is connected to an internal 24VDC power supply.Many PLCs
require a separate power supply to power the inputs.In the open
state,no voltage is present at the PLC input.This is the off
condition.When the pushbutton is depressed,24VDC is applied to
the PLC input .This is the ON condition.
ANALOG INPUT
solenoids
Digital Relay or
Output contactor
light
ANALOG OUTPUT
L1
PILOT LAMP L2
SWITCHES
RELAY
Digital Logic Functions
• We can construct simply logic functions for
our hypothetical lamp circuit, using multiple
contacts, and document these circuits quite
easily and understandably with additional
rungs to our original ”ladder.” If we use
standard binary notation for the status of the
switches and lamp (0 for unactuated or de-
energized; 1 for actuated or energized), a
truth table can be made to show how the logic
works:
OR GATE Logic
AND gate logic
NOT gate Logic
NAND Gate Logic
NOR Gate Logic
EXCLUSIVE OR Logic Gate or
EXOR Gate
Basic PLC I/O Connections
Fig.01
• When the normally-closed ”Stop” pushbutton switch is
unactuated (not pressed), the PLC’s X2 input will be
energized, thus ”closing” the X2 ”contact” inside the
program. This allows the motor to be started when
input X1 is energized, and allows it to continue to run
when the”Start” pushbutton is no longer pressed.
• When the ”Stop” pushbutton is actuated, input X2 will
de-energize, thus ”opening” the X2 ”contact” inside the
PLC program and shutting off the motor. inability to
turn off the motor.In addition to input (X) and output (Y)
program elements, PLCs provide ”internal” coils and
contacts with no intrinsic connection to the outside world.
These are used much the same as”control relays” (CR1,
CR2, etc.) are used in standard relay circuits: to provide
logic signal inversion when necessary.
PLC Basic Commands
TIM 00 10000
10000 10001
TIM 02 10002
TIM 03
10002 10002
END
Address Instruction Data Address Instruction Data
Ladder Diagram
HARDWARE A I 1.0
A I 1.1
I 1.0 = Q 4.0
&
I 1.1 Q 4.0 STL-Statement List
L1 I 0.1
I 0.1 Q
8
circuit diagram Ladder diagram Function block.
diagram 1
Statement list
O I 0.0
O I 0.1
= Q 8.0
XOR –BINARY LOGIC OPERATIONS
I 0.4 I 0.5 STL statement list
( ) Q 8.0 A I 0.4
X I 0.4
AN I 0.5
X I 0.5
AN I 0.4 Q
I 0.4 I 0.5 = Q 88.0
A I 0.5 .
1
I 0.4 Q 8.0 0 Q 8.0
I 0.4 XOR =
& I 0.5
I 0.4
OR Operation
• In this example an OR
operation is used in
network 1.
• It can be seen that if either
input I0.2 (input 3)or (O in
the statement list) input
I0.3 (input 4),or both are
true,then output Q0.1
(output 2) will be true.
PLC Status
• When viewing the ladder diagram in the status
mode,controlelements that are active,or true (logic
1),are highlighted.In theexample shown the toggle
switch connected to input 1 has been closed.Power
can now flow through the control element associated
with input 1 (I0.0)and activate the output (Q0.0).The
lamp will illuminate.
PLC Forcing
• Forcing is another useful tool in the commissioning of an
application.It can be used to temporarily override the input
or output status of the application in order to test and
debug the program.
• The force function can also be used to override discrete
output points.
• The force function can be used to skipportions of a
program by enabling a jump instruction with a forced
memory bit.Under normal circumstances the toggle
switch,shown in the illustration below,would have to be
closed to enable input 1 (I 0.0) and turn on the output
light.Forcing enables input 1 even though the input toggle
switch is open.With input 1 forced high the output light will
illuminate.When a function is forced the control bit
identifier is highlighted.The element is also highlighted
because it is on.
Common Terms with I/O Cards
U1
OPTOISO
+ R2
Vs1 560 D1 Internal
24 DIODE
- circuits
Opto-isolator MOV
+
Vs1
24
-
D2
DIODE RLY1
U1 24VCOIL
OPTOISO
Opto-isolator R2
560 Q1
NPN
D1
R1 DIODE
560
TYPICAL FIELD SIGNAL CONNECTIONS
AC LINE
TB
1
AUX
STOP 2
START 3
1LS 4
5
Typical Current Input Channel
1A
1B
R2
2A 220K
+
2B C1 U1
R1 1uF IDEAL
3A 10M
D1
R3
220K
A/D
BAV70
+
C2
1uF
+ V2 + V1
24 24
Analog to digital converter
4-20mA
transmitter
CB K
PUMP STOPPED
K 4
MOTOR START CR
TOL
37 38 3
1
OUTPUT
MODULE
K
K
PLC INPUT
2 MODULE
CR K
DRIVE 15 07 MCC
READY 8
13 CR 11 PLC OUTPUT MODULE
25 14 12 PLC COMMON
ACTIVE TERMINAL
27 07 5 6
9 K 10