Download - Ladder Diagram Example
![Page 1: Ladder Diagram Example](https://reader037.vdocuments.mx/reader037/viewer/2022102511/5681416d550346895dad4ee3/html5/thumbnails/1.jpg)
et438b-7.pptx 1
Lecture Notes Part 7ET 438B Sequential Control and Data Acquisition
![Page 2: Ladder Diagram Example](https://reader037.vdocuments.mx/reader037/viewer/2022102511/5681416d550346895dad4ee3/html5/thumbnails/2.jpg)
et438b-7.pptx 2
Ladder Diagram Example
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?
![Page 3: Ladder Diagram Example](https://reader037.vdocuments.mx/reader037/viewer/2022102511/5681416d550346895dad4ee3/html5/thumbnails/3.jpg)
et438b-7.pptx 3
Ladder Diagram Example
Press startEnergized
Solenoid Aenergizedtank begins tofill
Tank fills tolimit
closed
open
Timer energizedMotor starts
Timer goesTo 30 minutes
closed
open
Mixer motor offSolenoid B on
When tankdrains flow switchresets. Timer resets
open
![Page 4: Ladder Diagram Example](https://reader037.vdocuments.mx/reader037/viewer/2022102511/5681416d550346895dad4ee3/html5/thumbnails/4.jpg)
et438b-7.pptx 4
Combinational and Sequential Logic with Relays and Contacts
Let contact state represent a logical value
Implement AND gate
= Logic 0 Called Form A Contact
= Logic 1 Called Form B Contact
![Page 5: Ladder Diagram Example](https://reader037.vdocuments.mx/reader037/viewer/2022102511/5681416d550346895dad4ee3/html5/thumbnails/5.jpg)
et438b-7.pptx 5
Combinational and Sequential Logic with Relays and Contacts
inputs
output
potential grd
A B = C
Conditions A AND B must be present to energizeoutput CNote: all contacts are considered instantaneousand not held unless modified
With electromechanical relays fan-in and fan-out limited by number of contacts in relays
Energized
![Page 6: Ladder Diagram Example](https://reader037.vdocuments.mx/reader037/viewer/2022102511/5681416d550346895dad4ee3/html5/thumbnails/6.jpg)
et438b-7.pptx 6
More Logic Functions
potential grd
Either A OR B will cause coil C to be energizedContacts A, B represent conditions or states inthe sequential process
ORFunction
A + B = C Boolean expression
Energized
![Page 7: Ladder Diagram Example](https://reader037.vdocuments.mx/reader037/viewer/2022102511/5681416d550346895dad4ee3/html5/thumbnails/7.jpg)
et438b-7.pptx 7
More Logic Functions
NOT Function
Boolean ExpressionB = A
Contact of opposite state creates inversion
![Page 8: Ladder Diagram Example](https://reader037.vdocuments.mx/reader037/viewer/2022102511/5681416d550346895dad4ee3/html5/thumbnails/8.jpg)
et438b-7.pptx 8
Constructing Other Logic Functions
120 Vac grd
Combine the AND function with the NOT function to get a NAND operation.
Rung 1 implements the AND functionRung 2 implements the NOT function
Any contact associated with coil D will changestate like a NAND TTL gate.
Energized
open
De-energized
![Page 9: Ladder Diagram Example](https://reader037.vdocuments.mx/reader037/viewer/2022102511/5681416d550346895dad4ee3/html5/thumbnails/9.jpg)
et438b-7.pptx 9
Multiple Input AND/NAND
Can add a memory action to the above by includinga feedback from the output coil to the inputs
A B C = E and A B C = E
Energized
open
Close AND
NAND
![Page 10: Ladder Diagram Example](https://reader037.vdocuments.mx/reader037/viewer/2022102511/5681416d550346895dad4ee3/html5/thumbnails/10.jpg)
et438b-7.pptx 10
Memory Action AND/NAND
Can add a memory action to the above by includinga feedback from the output coil to the inputs
B andC are notsealed
Energized
open
Close
![Page 11: Ladder Diagram Example](https://reader037.vdocuments.mx/reader037/viewer/2022102511/5681416d550346895dad4ee3/html5/thumbnails/11.jpg)
et438b-7.pptx 11
All Inputs Latched AND/NAND
Contact E in rung 2 is a feedback from the output that makes circuit ignore state changes of A, B and Cafter the condition A B C is detected.
The output can not change unless the circuit is de-energized.
Energized
open
Close
![Page 12: Ladder Diagram Example](https://reader037.vdocuments.mx/reader037/viewer/2022102511/5681416d550346895dad4ee3/html5/thumbnails/12.jpg)
et438b-7.pptx 12
Motor Control ExampleThree-wire control- used for manual and automatic motor starting.
motor
M1 seals-in the start PB. Motor stops when power lost
Thermal overloads actuate the control contacts OL1 to OL3
Powerwiring
120 Vac GRDControl wiring
M1
STOPSTART
OL1
OL2
OL3
Motor Runs
![Page 13: Ladder Diagram Example](https://reader037.vdocuments.mx/reader037/viewer/2022102511/5681416d550346895dad4ee3/html5/thumbnails/13.jpg)
13et438b-7.pptx
Multiple Input OR/NOR Function
Notice that Relay logic is similar to TTL. Can useTruth tables and Boolean expressions to do designs
OR
ORoutput
NORoutput
Outputs A+B+C = E
A+B+C = E
A OR B OR CEnergize E
![Page 14: Ladder Diagram Example](https://reader037.vdocuments.mx/reader037/viewer/2022102511/5681416d550346895dad4ee3/html5/thumbnails/14.jpg)
et438b-7.pptx 14
Ladder Logic Memory ElementsMechanically latched relay - maintains state even when power removed. Has two coils (operate, reset)
Typical wiring
Inputs A and B set the output contacts E andreset then respectively. This give toggle actionthat “remembers” the last input state even whenpower is removed
Typical Applications Reversing Motor starters. Reclose Relay Cut-out
OperateLatched
Close
Close
ResetLatched
![Page 15: Ladder Diagram Example](https://reader037.vdocuments.mx/reader037/viewer/2022102511/5681416d550346895dad4ee3/html5/thumbnails/15.jpg)
et438b-7.pptx 15
Off-Return Memory
Remember all contacts are drawn with the coilsde-energized
Press B: continuity rung 4 Both loads off
2
1
1
2
3
4
5
6
Energize and re-energize circuit - Load 2 onNo continuity in rungs 1-4Continuity in rung 6
Press A: continuity rung 2 Both loads on
Close
EOn
E1On
Open
Load1 off
Load 2 off
![Page 16: Ladder Diagram Example](https://reader037.vdocuments.mx/reader037/viewer/2022102511/5681416d550346895dad4ee3/html5/thumbnails/16.jpg)
et438b-7.pptx 16
Timer Sub-Circuits
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
Rung 1: when input A is energized timer TR-E starts
Load 1 is deactivated after time delayLoad 2 is activated after time delay
Load 3 is instantaneously deactivated by TR-E
TR-EOn
Open Load off
Open Load off
Close Load on
1
2
3
![Page 17: Ladder Diagram Example](https://reader037.vdocuments.mx/reader037/viewer/2022102511/5681416d550346895dad4ee3/html5/thumbnails/17.jpg)
et438b-7.pptx 17
Form “C” ContactLoads are toggled between a common point
Contact A creates a remote control toggle switch
Typical “Form C” contacts include both a NO and NCcontact arrangement.
Used in some sensors formore flexibility
![Page 18: Ladder Diagram Example](https://reader037.vdocuments.mx/reader037/viewer/2022102511/5681416d550346895dad4ee3/html5/thumbnails/18.jpg)
et438b-7.pptx 18
Designing Sequential Control 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
Combinational 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
Sequential Systems
![Page 19: Ladder Diagram Example](https://reader037.vdocuments.mx/reader037/viewer/2022102511/5681416d550346895dad4ee3/html5/thumbnails/19.jpg)
et438b-7.pptx 19
Review of Logic Gates and Boolean Algebra
False =0 True =1Boolean Variables
BooleanOperators
EOR=XOR
AlternateImplementation
BABAX
![Page 20: Ladder Diagram Example](https://reader037.vdocuments.mx/reader037/viewer/2022102511/5681416d550346895dad4ee3/html5/thumbnails/20.jpg)
et438b-7.pptx 20
Review of Logic Gates and Boolean Algebra
Axioms of Boolean Algebra
AAA
AAA
Idempotent Associative
)CB(AC)BA(
)CB(AC)BA(
Distributive
)CA()BA()CB(A
)CA()BA()CB(A
Identity Complement DeMorgan’s Theorem
AA
A
A
AA
1
00
11
0
01
0
1
A)A(
AA
AA
BA)BA(
BA)BA(
Absorption
ABAA
BABAA
Order of Operations1. NOT2. AND3. OR
![Page 21: Ladder Diagram Example](https://reader037.vdocuments.mx/reader037/viewer/2022102511/5681416d550346895dad4ee3/html5/thumbnails/21.jpg)
et438b-7.pptx 21
Review of Logic Gates and Boolean Algebra
Example: Simplify the following expression using the axioms ofBoolean Algebra.
)CB(A)CBA(X
)CB(A)CB()A(X Add
Parentheses
Apply DeMorgans’s Theorem to first term
)CB()A()CB(A
)CB(A)CB(AX
Apply DeMorgan’s
Here
)CB()CB( )CB(A)CB(AX
CABACABAX Expand
ExpressionsCollect common terms and factor
CACA)AA(C
![Page 22: Ladder Diagram Example](https://reader037.vdocuments.mx/reader037/viewer/2022102511/5681416d550346895dad4ee3/html5/thumbnails/22.jpg)
et438b-7.pptx 22
Review of Logic Gates and Boolean Algebra
Example Continued
)AA(CBABAX
1 AA
Use Complement
Axiom
1 CBABAX
CBABAX
Use Identity Axiom
CC 1
Simplified Expression
![Page 23: Ladder Diagram Example](https://reader037.vdocuments.mx/reader037/viewer/2022102511/5681416d550346895dad4ee3/html5/thumbnails/23.jpg)
et438b-7.pptx 23
Logic Design
1.) Obtain description of process2.) Define control action3.) Define Inputs and Outputs4.) 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
![Page 24: Ladder Diagram Example](https://reader037.vdocuments.mx/reader037/viewer/2022102511/5681416d550346895dad4ee3/html5/thumbnails/24.jpg)
et438b-7.pptx 24
Logic DesignDefine I/O variables Inputs: B1 = bay1 ingot present
B2 = bay2 ingot present T = temperature sensor
Output: F= fan startCreate Truth Table
T B2
B1
F
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 1
If there is no over temperature don’t start the fan
Over temperature in empty oven: safety fan start
Over temperature in full oven: safety fan start
Start fan in lightly load ovens with over temp.
![Page 25: Ladder Diagram Example](https://reader037.vdocuments.mx/reader037/viewer/2022102511/5681416d550346895dad4ee3/html5/thumbnails/25.jpg)
et438b-7.pptx 25
Logic Design
Select elements from truth table in SOP (sum-of-products) form then simplify.
T B2
B1
F
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 1
21 BBTF 21 BBT 21 BBT 21 BBT
TF
)BB(TF
))BB(B)BB(B(TF
)BBBBBBBB(TF
22
112112
21212121
Ignore unloaded and full load cases and try again
Requires only Temp control
![Page 26: Ladder Diagram Example](https://reader037.vdocuments.mx/reader037/viewer/2022102511/5681416d550346895dad4ee3/html5/thumbnails/26.jpg)
et438b-7.pptx 26
Logic Design
T B2
B1
F
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 0
21 BBTF 21 BBT
)BBBB(TF 2121
FT
B1 B2
B1 B2
Ladder Logic Representation
Revised Truth Table
![Page 27: Ladder Diagram Example](https://reader037.vdocuments.mx/reader037/viewer/2022102511/5681416d550346895dad4ee3/html5/thumbnails/27.jpg)
et438b-7.pptx 27
Simplified Forms of Functions
Avoid multiple complemented variables in ladder logic (No NAND, NOR)
BABAX BABAX
NAND NOR
NAND/NOR can not be implemented effectively using software. (Programmable Logic Controllers)
![Page 28: Ladder Diagram Example](https://reader037.vdocuments.mx/reader037/viewer/2022102511/5681416d550346895dad4ee3/html5/thumbnails/28.jpg)
et438b-7.pptx 28
State-Based DesignsDefinitionsState - current operational mode of system
Examples: On/Off, Idle, Tank filling, dispensing product.
Conditions (inputs) - inputs required for leaving thecurrent state and moving to another state
Examples: Coins inserted, button pressed, OL activated
Actions (outputs) - actions performed by system whenthe transition from one state to another take place
Examples: Start motor, turn on light, sound alarm.
![Page 29: Ladder Diagram Example](https://reader037.vdocuments.mx/reader037/viewer/2022102511/5681416d550346895dad4ee3/html5/thumbnails/29.jpg)
et438b-7.pptx 29
State-Based DesignsWhen a set of inputs (conditions) become valid for leaving a state, the system is directed to the destination state
CurrentState
NextState
State entry inputconditions
State exit inputconditions
To other states
State outputs
![Page 30: Ladder Diagram Example](https://reader037.vdocuments.mx/reader037/viewer/2022102511/5681416d550346895dad4ee3/html5/thumbnails/30.jpg)
et438b-7.pptx 30
State Transition Diagrams
State transition diagrams allow designers to examine the interaction between desired conditions and find their logical relationships and sequence. Use in digital computer design
State1
State2
State3
Else
Else
Else
A
B
C
If Condition A true go to State 2Else stay in State 1 If B true go to State 3
Else State 2
If C true go to State 1Else State 3
![Page 31: Ladder Diagram Example](https://reader037.vdocuments.mx/reader037/viewer/2022102511/5681416d550346895dad4ee3/html5/thumbnails/31.jpg)
et438b-7.pptx 31
State EquationsInformal: State X =(State X +Arrival from another state) and has not
left for another state
Statei
State1
State2
Statej
.
.
.
Staten
set1
set2
seti
setn
Seti =logical condition to set state variable i and enter state
.
.
State1
State2
Statek
Statem
.
.
.
.
.
reset1
reset2
reseti
resetm
Re-seti,= logical condition to reset state variable i and leave
![Page 32: Ladder Diagram Example](https://reader037.vdocuments.mx/reader037/viewer/2022102511/5681416d550346895dad4ee3/html5/thumbnails/32.jpg)
et438b-7.pptx 32
State Equations
Formal Definition:
m
1kki
n
1jiji
1i )I,state(reset)I,state(setstatestate
Where:statei = a variable that reflects state i is onstatei
+1 = next value of state variableouti = desired outputs of state ihi( ) = output function of state variablesn = number of transitions into state im = number of transitions out of state iN = total number of system statesseti= logical condition to set state variable i reseti = logical condition to reset state variable i
)state,...state,state(hout N21ii
SetConditions
Functions of state and inputs
ResetConditions
Functions of state and
inputs
![Page 33: Ladder Diagram Example](https://reader037.vdocuments.mx/reader037/viewer/2022102511/5681416d550346895dad4ee3/html5/thumbnails/33.jpg)
et438b-7.pptx 33
Example
S0(Stop)X1=0
S1(Start)X1=1
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)I1= pressed start button (PB2)I2 = motor overload condition (OL)
O1 = start motor (M)
1I
2I0I Only 1 state variable requiredfor two conditions X1=0 or X1=1
1Iset
2I0Ireset
1
1
111 11 resetsetXX
2I0I1I1X1X 1
2I0I1I1X1X 1
Output equation
11 XOM
![Page 34: Ladder Diagram Example](https://reader037.vdocuments.mx/reader037/viewer/2022102511/5681416d550346895dad4ee3/html5/thumbnails/34.jpg)
et438b-7.pptx 34
ExampleBoolean Equation to ladder logic diagram
2I0I1I1X1X 1 Substitute variable names
Overload OLI2
Start PB2I1
Stop PBI
MX
10
1OLPB1PB2)(MM
STOPPB1
OL
STARTPB2
M
M
ConstructLadder
![Page 35: Ladder Diagram Example](https://reader037.vdocuments.mx/reader037/viewer/2022102511/5681416d550346895dad4ee3/html5/thumbnails/35.jpg)
et438b-7.pptx 35
Design Example: Reciprocating Motion Process
A work piece must travel back and forth on a conveyor. The locationof the work piece is determined by two limit switches. When the location is detected control signal are sent to a reversing motorcontactor. The machine is started and stopped from a local set of push button switches. Develop a ladder logic diagram to implementthis control.
![Page 36: Ladder Diagram Example](https://reader037.vdocuments.mx/reader037/viewer/2022102511/5681416d550346895dad4ee3/html5/thumbnails/36.jpg)
et438b-7.pptx 36
Design Example: Reciprocating Motion Process
Determine the inputs, outputs and states of system
I0: press startI1: press stopI2: Table at reverse limit (1LS)I3: Table at forward limit (2LS)
I0
I1
I2I3
Inputs:
O0: Start motor forward (2CR)O1: Start motor reverse (3CR)
Outputs:
O0
O1
States:
S0: offS1: on-forward, S2: on reverse,
![Page 37: Ladder Diagram Example](https://reader037.vdocuments.mx/reader037/viewer/2022102511/5681416d550346895dad4ee3/html5/thumbnails/37.jpg)
et438b-7.pptx 37
Design Example: Reciprocating Motion Process
S0(Stop)
S1(on-
forward)
S2(on-
reverse)
Assume machine starts at reverse limit. (1LS changes state)
I0: press startI1: press stopI2: Table at reverse limit (1LS)I3: Table at forward limit (2LS)
0IT 1,0
O0 start forwardaction
3IT 2,1
O1 start reverseaction
2IT 1,2 101 IT ,
![Page 38: Ladder Diagram Example](https://reader037.vdocuments.mx/reader037/viewer/2022102511/5681416d550346895dad4ee3/html5/thumbnails/38.jpg)
et438b-7.pptx 38
Design Example: Reciprocating Motion Process
Define set and reset conditions
Define 2 state variables X1 and X2
X2 X1 Condition
0 0 Off (S0)
0 1 On-Forward (S1)
1 0 On-Reverse (S2)
1 1 Not allowed
S1(on-
forward)
S2(on-
reverse)
0IT 1,0
2IT 1,2
2X2I0Iset 1X
X1=1X2=0
S0(Stop)
X1=0X2=1
3IT 2,1
101 IT ,
3I1Ireset 1X
1X3Iset 2X 2Ireset 2X
)3I1I))(2X2I0I(1X(1X
)3I1I))(2X2I0I(1X(1X
)reset)(set1X(1X
1
1
1x1x1
)2I)(1X3I2X(2X
)reset)(set2X(2X1
2x2x1
OutputsO0 O1 O1X2 ,0O1X
![Page 39: Ladder Diagram Example](https://reader037.vdocuments.mx/reader037/viewer/2022102511/5681416d550346895dad4ee3/html5/thumbnails/39.jpg)
et438b-7.pptx 39
Design Example: Reciprocating Motion Process
Convert state equations into ladder diagram 2CR = O03CR =O1I0=startI1=stopI2=1LSI3=2LS
)LS2Stop)(CR3LS1StartCR2(CR2 1
)LS1)(CR2LS2CR3(CR3 1
STOP2LS
START
3CR
2CR
2CR
1LS
1LS
2CR
3CR
3CR
2LS
![Page 40: Ladder Diagram Example](https://reader037.vdocuments.mx/reader037/viewer/2022102511/5681416d550346895dad4ee3/html5/thumbnails/40.jpg)
et438b-7.pptx 40
States With PrioritizationSystems with multiple entries and exits from a state require blocking ofAlternatives.
S0
S1
S2
A
B
C
D
A or C can occur independently to exit S1.Must give one transition priority over other.Block setting of conflicting state
Two ChoicesIF A THEN block CIF C THEN block A
)1SC1SA())2SD0SB(1S(1S 1
)0SB()1SA0S(0S 1
)2SD()A1SC2S(2S 1
A given priority to C
)2SD()1SC2S(2S
)0SB()C1SA0S(0S1
1
C over A
![Page 41: Ladder Diagram Example](https://reader037.vdocuments.mx/reader037/viewer/2022102511/5681416d550346895dad4ee3/html5/thumbnails/41.jpg)
et438b-7.pptx 41
Prioritization Example
Inputs OutputsA PB QC RDEFFS
S0
S2
S1
)DC(A
EF
AB
)FDC(E
FS
State
P Q R
S0 0 1 1
S1 1 0 1
S2 1 1 0
Output Map
Write state equationsfor this system. Give stateS2 priority over S0
0S))DC(A(T01
1S)EF(T10
FST1 1SABT12
2S))FDC(E(T21
![Page 42: Ladder Diagram Example](https://reader037.vdocuments.mx/reader037/viewer/2022102511/5681416d550346895dad4ee3/html5/thumbnails/42.jpg)
et438b-7.pptx 42
Prioritization ExampleWrite state equations using transitions
2112101 T)TT0S(0S
)TT()TTT1S(1S 1210121011
)TT()TTT1S(1S 1210121011
21121 T)T2S(2S
S0 blocked if S2 is active
State
P Q R
S0 0 1 1
S1 1 0 1
S2 1 1 0
Output Map
Simplify using DeMorgam’s Theorem
Output Equations
2S1SP 2S0SQ 1S0SR