Sie sind auf Seite 1von 42

et438b-7.

pptx 1
A manual mixing operation is to be automated using
sequential process control methods. The process
composed of three steps:

a.) filling a tank to a predetermined level


b.) agitating the liquid for 30 minutes
c.) draining the tank for use in another part of
process

Does the ladder logic schematic that follows perform


this function correctly?

et438b-7.pptx 2
Energized
Press start
open Solenoid A
energized
Tank fills to tank begins to
limit fill
open

Timer goes Timer energized


To 30 minutes closed Motor starts

When tank open


drains flow switch Mixer motor off
resets. Timer resets Solenoid B on

closed

et438b-7.pptx 3
Let contact state represent a logical value
= Logic 0 Called Form A
Contact

= Logic 1 Called Form B


Contact

Implement AND gate

et438b-7.pptx 4
potential grd

output

AB=C Energized
inputs

Conditions A AND B must be present to energize


output C
Note: all contacts are considered instantaneous
and not held unless modified

With electromechanical relays fan-in and fan-out limited by


number of contacts in relays

et438b-7.pptx 5
OR
Function

potential grd

Energized
A + B = C Boolean expression

Either A OR B will cause coil C to be energized


Contacts A, B represent conditions or states in
the sequential process

et438b-7.pptx 6
NOT Function

Boolean Expression
B=A

Contact of opposite state creates inversion

et438b-7.pptx 7
Combine the AND function with the NOT function to get a NAND operation.

120 Vac grd

Energized
Any contact
open associated with coil
D will change
De-energized state like a NAND
TTL gate.
Rung 1 implements the AND function
Rung 2 implements the NOT function
et438b-7.pptx 8
Energized

Close AND

open NAND

A B C = E and A B C = E

Can add a memory action to the above by including


a feedback from the output coil to the inputs

et438b-7.pptx 9
Can add a memory action to the above by including
a feedback from the output coil to the inputs

Energized

B and
C are
not
sealed
Close

open

et438b-7.pptx 10
Energized

The output can not


change unless the
circuit is de-energized.
Close

open

Contact E in rung 2 is a feedback from the output


that makes circuit ignore state changes of A, B and C
after the condition A B C is detected.
et438b-7.pptx 11
Three-wire control- used for manual and automatic motor starting.
START
STOP OL1 OL3

M1 seals-in the start


PB. Motor stops M1
when power lost OL2

120 Vac Control wiring GRD

motor Thermal overloads


actuate the control
contacts OL1 to
OL3

Motor
Power Runs
wiring

et438b-7.pptx 12
OR

A OR B OR C
Energize E

OR
output

NOR
output

Notice that Relay logic is similar


Outputs A+B+C = E to TTL. Can use
Truth tables and Boolean
A+B+C = E expressions to do designs
et438b-7.pptx 13
Mechanically latched relay - maintains state even when power removed.
Has two coils (operate, reset)

Typical wiring

Operate
Latched

Reset
Latched

Close Inputs A and B set the output


contacts E and
Close
reset then respectively. This
give toggle action
that “remembers” the last
Typical Applications input state even when
Reversing Motor starters. Reclose Relay Cut-out power is removed
et438b-7.pptx 14
Energize and re-energize
circuit - Load 2 on
No continuity in rungs 1-4
E Continuity in rung 6
On 1

Press A: continuity
2
rung 2 Both loads
on
E1
On 3
Press B: continuity
4 rung 4 Both loads off

1
Load1
Close off
5

Open Load 2
off 6
2
Remember all contacts are drawn with the coils
de-energized
et438b-7.pptx 15
Rung 1: when input
TR-E A is energized timer
On TR-E starts

Open Load off


1
Close Load on
2

Open Load off


3

Schematic indicates that this is a on-delay timer. After defined interval


TR-E in rung 2 opens and TR-E in rung 3 closes
Load 1 is deactivated after time delay
Load 2 is activated after time delay

Load 3 is instantaneously deactivated by TR-E


et438b-7.pptx 16
Loads are toggled between a common point

Typical “Form C” contacts


include both a NO and NC
contact arrangement.

Used in some sensors for


more flexibility

Contact A creates a remote control toggle switch


et438b-7.pptx 17
Combinational Systems
• Detect patterns of inputs
• Use true tables, Boolean Algebra
• Multiple inputs and/or outputs
• Sum of Products or product of sums Boolean
Implementations
• Reduce to minimum implementation

Sequential Systems
• Follow steps, transition from one step to another.
• Use state transition diagrams or tables with Boolean
Algebra
• State Machine implemented in software or hardware
• Decisions made base on current condition of system and
input information

et438b-7.pptx 18
Boolean Variables False =0 True =1

Boolean
Operators

EOR=XOR

Alternate
Implementation
X  A B  AB

et438b-7.pptx 19
Axioms of Boolean Algebra
Idempotent Associative Distributive

AA A ( A  B )  C  A ( B  C ) A ( B  C ) ( A  B ) ( A  C )
A A  A ( A  B )  C  A ( B  C ) A ( B  C ) ( A  B ) ( A  C )

Identity Complement DeMorgan’s Absorption


Theorem
A 0  A A A 1 ( A  B )  A B A  A B  A  B
A 1 1 A A  0
( A B )  A  B A  A B  A
A 0  0 ( A) A Order of Operations
A 1  A 10 1. NOT
2. AND
3. OR
et438b-7.pptx 20
Example: Simplify the following expression using the axioms of
Boolean Algebra.
X ( A  B  C )  A ( B  C )
Add
X ( A ) ( B  C )  A ( B  C ) Parentheses

Apply DeMorgans’s Theorem to first term


A ( B  C ) ( A ) ( B  C ) Apply
DeMorgan’s
X  A ( B  C )  A ( B  C ) Here
X  A ( B  C )  A ( B  C ) ( B  C ) ( B  C )
X  A B  A  C  A B  A  C
Expand
Collect common terms and factor Expressions
C ( A  A )  A  C  A  C
et438b-7.pptx 21
Example Continued
X  A  B  A  B  C ( A  A ) Use
Complement
Axiom
A A 1

X  A  B  A  B  C 1 Use Identity
Axiom
C 1  C

X  A B  A B  C

Simplified Expression

et438b-7.pptx 22
1.) Obtain description of process
2.) Define control action
3.) Define Inputs and Outputs
4.) Develop Truth Table or Boolean Equation of Process

Process control description

A heating oven with two bays can heat one ingot in each bay.
When the heater is on it provides enough heat for two ingots. If
only one ingot is present, the oven may overheat so a fan is used
to cool the oven when it exceeds a set temperature.
Control Action

When only one ingot is in the oven and the temperature exceeds
the setpoint, turn on the fan
et438b-7.pptx 23
Define I/O variables Inputs: B1 = bay1 ingot present
B2 = bay2 ingot present
T = temperature sensor

Create Truth Table Output: F= fan start

T B2 B1 F
0 0 0 0
0 0 1 0 If there is no over temperature
0 1 0 0 don’t start the fan
0 1 1 0
1 0 0 1 Over temperature in empty oven: safety fan start
1 0 1 1
Start fan in lightly load ovens with over temp.
1 1 0 1
1 1 1 1 Over temperature in full oven: safety fan start

et438b-7.pptx 24
Select elements from truth table in SOP (sum-of-
products) form then simplify.

T B2 B1 F F  T  B 1 B 2  T  B 1  B 2  T  B 1  B 2  T  B 1  B 2
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 1
F  T  (B1 B2  B1 B2  B1 B2  B1 B2)
1 0 1 1 F  T  (B2  (B1 B1)  B2  (B1 B1))
1 1 0 1
F  T  (B2  B2)
1 1 1 1
FT Requires only Temp
control
Ignore unloaded and full load cases and try again
et438b-7.pptx 25
F  T  B 1 B 2  T  B 1  B 2
Revised Truth Table
T B2 B1 F
F  T ( B1 B 2  B1 B 2 )
0 0 0 0
0 0 1 0
0 1 0 0
Ladder Logic Representation
0 1 1 0
1 0 0 0
1 0 1 1 B1 B2

1 1 0 1
T F
1 1 1 0
B1 B2

et438b-7.pptx 26
Avoid multiple complemented variables in
ladder logic (No NAND, NOR)

NAND NOR
X  A B  A  B X  A  B  A B

NAND/NOR can not be implemented effectively using software.


(Programmable Logic Controllers)

et438b-7.pptx 27
Definitions
State - current operational mode of system

Examples: On/Off, Idle, Tank filling, dispensing product.

Conditions (inputs) - inputs required for leaving the


current state and moving to another state

Examples: Coins inserted, button pressed, OL activated

Actions (outputs) - actions performed by system when


the transition from one state to another take place

Examples: Start motor, turn on light, sound alarm.

et438b-7.pptx 28
When a set of inputs (conditions) become valid for
leaving a state, the system is directed to the
destination state

State exit
input To other
conditions states
Current Next
State State

State State
entry input outputs
conditions

et438b-7.pptx 29
State transition diagrams allow designers to examine the
interaction between desired conditions and find their logical
relationships and sequence. Use in digital computer design

Else
B Else
State
A
State 2
1 State
Else
If C true go to State 1 3
Else State 3
C

If Condition A true go to State 2


If B true go to State 3
Else stay in State 1
Else State 2

et438b-7.pptx 30
Informal: State X =(State X +Arrival from another state) and has not left
for another state
Re-seti,= logical condition to
State State
reset state variable i and leave
n m
setn resetm
. .
. .
State State State
j seti i reseti k

. .
. .
. set2 reset2 .

State State
2 set1 reset1 2

Seti =logical condition to


State State
set state variable i and enter state
1 1
et438b-7.pptx 31
Set
Conditions
Functions of
Formal Definition:
state and inputs

  m
  state i   set (state j , I)i    reset (state i , I) k 
n
1
state i
 j1  k 1
Reset
out i  h i (state 1 , state 2 ,...state N ) Conditions
Functions of
Where: state and
statei = a variable that reflects state i is on inputs
statei+1 = next value of state variable
outi = desired outputs of state i
hi( ) = output function of state variables
n = number of transitions into state i
m = number of transitions out of state i
N = total number of system states
seti= logical condition to set state variable i
reseti = logical condition to reset state variable i
et438b-7.pptx 32
Write the state equation for a motor starting control described in the state
diagram below with the following input and outputs
I0=pressed stop button (PB1)
S1 I1= pressed start button (PB2)
I1 (Start) I2 = motor overload condition (OL)
X1=1

O1 = start motor (M)


I0  I2
S0
(Stop) Only 1 state variable required
X1=0 reset 1  I0  I2 for two conditions X1=0 or X1=1
set 1  I1
X 11  X 1  set1   reset1   Output equation


X11  X1  I1  I0  I2  M  O1  X1

X11  X1  I1  I0  I2


et438b-7.pptx 33
Boolean Equation to ladder logic diagram

X11  X1  I1  I0  I2 Substitute variable names

X1  M
M (M  PB2)  PB1  OL
Construct
I0  PB 1 Stop
Ladder I1  PB2 Start
I2  OL Overload
START
PB2
M
STOP
OL
PB1

et438b-7.pptx 34
A work piece must travel back and forth on a conveyor. The location
of the work piece is determined by two limit switches. When the
location is detected control signal are sent to a reversing motor
contactor. The machine is started and stopped from a local set of
push button switches. Develop a ladder logic diagram to implement
this control.
et438b-7.pptx 35
Determine the inputs, outputs and states of system
Inputs: I0: press start
I1: press stop
I2: Table at reverse limit (1LS)
I3: Table at forward limit (2LS)

Outputs:
O0: Start motor forward (2CR)
O1: Start motor reverse (3CR)
I3 I2
States:
O0 S0: off
I0 S1: on-forward,
I1 S2: on reverse,
O1

et438b-7.pptx 36
Assume machine starts at reverse limit. (1LS changes state)

T1, 2  I3
T0,1  I0
S1
(on-
forward) T2,1  I2
T1,0  I1 S2
(on-
reverse)
S0
(Stop)

O0 start forward
action
I0: press start
I1: press stop O1 start reverse
I2: Table at reverse limit (1LS) action
I3: Table at forward limit (2LS)

et438b-7.pptx 37
Define set and reset conditions
Define 2 state variables X1 and X2 set X1  I0  I2  X2

X2 X1 Condition reset X1  I1  I3
0 0 Off (S0)
set X 2  I3  X1
0 1 On-Forward (S1)
reset X 2  I2
1 0 On-Reverse (S2)
1 1 Not allowed X11  (X1  set x1 )( reset x1 )
X11  (X1  (I0  I2  X2))( I1  I3)
T0,1  I0 T1, 2  I3
S1
(on-
X11  (X1  (I0  I2  X2))( I1 I3)
forward)

T2,1  I2
T1,0  I1 X 2 1  (X 2  set x 2 )( reset x 2 )
X1=1 S2
S0
(Stop) X2=0
(on-
reverse)
X 2 1  (X 2  I3  X1)( I2)
O0
O1 Outputs X1  O0, X2  O1
X1=0
X2=1
et438b-7.pptx 38
Convert state equations into ladder diagram 2CR = O0
3CR =O1
2CR 1  (2CR  Start  1LS  3CR )(Stop  2LS) I0=start
3CR 1  (3CR  2LS  2CR )(1LS) I1=stop
1LS I2=1LS
I3=2LS
3CR

STOP
2LS

START 2CR

2CR
1LS 2LS

2CR 3CR

3CR
et438b-7.pptx 39
Systems with multiple entries and exits from a state require blocking of
Alternatives.

D S2
S0 B

Two Choices
IF A THEN block C
IF C THEN block A
C A given priority to C
A S1
S0 1  (S0  A  S1)  (B  S0)
S11  (S1  (B  S0  D  S2))  (A  S1  C  S1)
S2 1  (S2  C  S1 A)  (D  S2)
A or C can occur independently to exit S1.
Must give one transition priority over other. C over A
Block setting of conflicting state S0 1  (S0  A  S1 C)  (B  S0)
S2 1  (S2  C  S1)  (D  S2)
et438b-7.pptx 40
FS
A ( C  D)
S1
S0 BA
FE
E(C  D  F)
Inputs Outputs Write state equations
A P for this system. Give state S2
B Q S2 priority over S0
C R
D T01  (A(C  D))  S0
E
F Output Map T10  (F  E)  S1
FS State P Q R T1  FS
S0 0 1 1 T12  B  A  S1
S1 1 0 1 T21  (E(C  D  F))  S2
S2 1 1 0

et438b-7.pptx 41
Write state equations using transitions

S01  (S0  T10  T12 )  T21 S0 blocked if


S2 is active
S11  (S1  T01  T21  T1 )  (T10  T12 )

S11  (S1  T01  T21  T1 )  (T10  T12 ) Simplify using


DeMorgam’s Theorem
1
S2  (S2  T12 )  T21

Output Map Output Equations


State P Q R P  S1  S2
S0 0 1 1 Q  S0  S2
S1 1 0 1 R  S0  S1
S2 1 1 0

et438b-7.pptx 42

Das könnte Ihnen auch gefallen