You are on page 1of 23

LOGIC CONTROL

AND PLC
Duong Minh Duc
Industrial Automation Department
School of Electrical Engineering
Duc.duongminh@hust.edu.vn
TDH-VD-BK 1
Contents

1. Fundamental of Logic Control


2. Synthesis and Simplification of
Combinational Logic Circuit
3. Sequential Logic Circuit Synthesis
4. Introduction to PLC
5. PLC programming technique

TDH-VD-BK 2
1. Fundamental of Logic Control

1.1. Logic control concept


1.2. Boolean Algebra
1.3. Logic function representation

TDH-VD-BK 3
1.1. Logic Control Concept

Car parking
Automatic door

TDH-VD-BKSCADA in Power System 4


Automatic transfer system
1.1. Logic control concept

Smart Agriculture Car Assembly

Oil and Gas industry


Food and beverage industry
TDH-VD-BK 5
1.1. Logic control concept
• Systems using logic control
– System with many working modes, and obey the
commands from operators.
– Switching among working modes according to
specified sequences and conditions.
– Time sequences and interaction among system’s
parts must be guaranteed.
– Immediate response to some certain events

TDH-VD-BK 6
1.1. Logic control concept
• Research Fields using logic control
– Computer Science
– Programming
– Simulation
– Communication
– Industrial System Control

TDH-VD-BK 7
1.1. Logic control concept
• Modelling of logic control system
– Boolean Algebra
– Finite State Machine
– Statechart
– GRAFCET (of SFC)
– Petri net

TDH-VD-BK 8
1.2. Boolean Algebra

• Logic variable: x [0, 1]


• Logic function: f(x1, x2, …, xn) [0, 1]
where x1, x2, …, xn [0, 1]
– Example: One variable function : f ( x) = x
f ( x) = x
f ( x) = x + x
f ( x) = x.x
Two variable function: f ( x1 , x2 ) = x1 + x2
TDH-VD-BK
f ( x1 , x2 ) = x1 x2 + x1 9x2
1.2. Boolean Algebra
• Basic logic operation

– Negation: NOT
• Value table:

x f ( x) = x
1 0
0 1

• Expression in circuit diagram

x x x x

TDH-VD-BK 10
1.2. Boolean Algebra
• Basic logic operation
– Disjunction: OR
• Value table:
x y f(x,y) = x + y
0 0 0
0 1 1
1 0 1
1 1 1

• Expression in circuit diagram


x x+ y x x+ y
y y 1
TDH-VD-BK 11
1.2. Boolean Algebra
• Basic logic operation
– Conjunction: AND
• Value table:
x y f(x,y) = xy
0 0 0
0 1 0
1 0 0
1 1 1

• Expression in circuit diagram


x x xy
xy
y y &
TDH-VD-BK 12
1.2. Boolean Algebra
• Basic laws
– Commutativity : x+y = y+x
xy=yx
– Associativity: x+y+z =(x+y)+z=x+(y+z)
xyz =(xy)z=x(yz)
– Distributivity: x(y+z)=xy+xz
x+(yz) =(x+y)(x+z)
– De Morgan’s law:

x1 + x2 + ... + xn = x1.x2 .....xn


x1.x1.....xn = x1 + x2 + ... + xn
TDH-VD-BK 13
x y z yz x+y x+z Left Right
0 0 0 0 0 0 0 0
0 0 1 0 0 1 0 0
0 1 0 0 1 0 0 0
0 1 1 1 1 1 1 1
1 0 0 0 1 1 1 1
1 0 1 0 1 1 1 1
1 1 0 0 1 1 1 1
1 1 1 1 1 1 1 1

TDH-VD-BK 14
1.2. Boolean algebra
• Some other basic laws
1 x+0 = x
x.1 = x

2 x.0 = 0
x+1 = 1

3 x+x = x
x.x = x

4 x + x =1
x.x = 0
5 x+xy = x
x.(x+y) = x

6 xy + xy = x
( x + y )( x + y ) = x
TDH-VD-BK 15
Note: duality law
1.3. Logic function representation
• Truth table
x1 x2 x3 f(x1,x2,x3)
0 0 0 1
0 0 1 0
0 1 0 “x”
0 1 1 “x”
1 0 0 0
1 0 1 1
1 1 0 “x”
1 1 1 1

“x” is don’t-care term

TDH-VD-BK 16
1.3. Logic function representation
• Karnaugh map

x1 x2 f(x1,x2)
x2 0 1
0 0 1
x1
0 1 0
0 1 0
1 0 0
1 0 1
TDH-VD-BK
1 1 1

17
x2
x1 x2 x3 f(x1,x2,x3)
x3
0 0 0 1
0 0 1 0 x2x3
x1 00 01 11 10
0 1 0 “x”
0 1 0 “x” “x”
0 1 1 “x”
1 0 1 1 “x”
1 0 0 0 x1
1 0 1 1
1 1 0 “x”
1 1 1 1

TDH-VD-BK 18
x3
x4
x3x4
x1x2 00 01 11 10
00
01
x2
11
x1
10
x3
x4
x5 x5
x3x4x5
x1x2 000 001 011 010 110 111 101 100
00

01
x2
11
x1
10
TDH-VD-BK 19
000 001
00 011 010
01 110 111
11 101 100
10

TDH-VD-BK 20
1.3. Logic function representation
• Ladder diagram
Device Type Symbol
Button Normally Open (NO)
Normally Close (NC)
Limit switch NO
NC
Relay Coil

NO contact
NC contactTDH-VD-BK 21
Principle
– The two poles of the power source are drawn as vertical
rails of a ladder
– Horizontal “rungs” showing the button, switch contacts,
relay contacts, relay coils drawn in between the power
rails.
– Choose the appropriate device for each logic variable
– Variable without negation: NO type
– Variable with negation: NC type
– Disjunction: in parallel connection
– Conjunction : in series connection
– Output variable: relay coil

TDH-VD-BK 22
1.3. Logic function representation
• Ladder diagram
Example:
𝑌 = 𝑓 𝑥1 , 𝑥2 = 𝑥1 . 𝑥2 + 𝑥1 . 𝑥2

TDH-VD-BK 23

You might also like