Lecture Notes Part 7 ET 438 B Sequential
Lecture Notes Part 7 ET 438 B Sequential Control and Data Acquisition et 438 b-7. pptx 1
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? et 438 b-7. pptx 2
Ladder Diagram Example Energized Press start open Tank fills to limit Solenoid A energized tank begins to fill open Timer goes To 30 minutes Timer energized Motor starts closed When tank drains flow switch resets. Timer resets open Mixer motor off Solenoid B on closed et 438 b-7. pptx 3
Combinational and Sequential Logic with Relays and Contacts Let contact state represent a logical value Implement AND gate et 438 b-7. pptx 4
Combinational and Sequential Logic with Relays and Contacts grd potential 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 et 438 b-7. pptx 5
More Logic Functions 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 et 438 b-7. pptx 6
More Logic Functions NOT Function Boolean Expression B=A Contact of opposite state creates inversion et 438 b-7. pptx 7
Constructing Other Logic Functions Combine the AND function with the NOT function to get a NAND operation. 120 Vac grd Energized open De-energized Rung 1 implements the AND function Rung 2 implements the NOT function et 438 b-7. pptx Any contact associated with coil D will change state like a NAND TTL gate. 8
Multiple Input AND/NAND 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 et 438 b-7. pptx 9
Memory Action AND/NAND 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 et 438 b-7. pptx 10
All Inputs Latched AND/NAND 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. et 438 b-7. pptx 11
Motor Control Example Three-wire control- used for manual and automatic motor starting. STOP M 1 seals-in the start PB. Motor stops when power lost START OL 1 M 1 120 Vac OL 3 OL 2 Control wiring GRD motor Thermal overloads actuate the control contacts OL 1 to OL 3 Motor Runs Power wiring et 438 b-7. pptx 12
Multiple Input OR/NOR Function OR A OR B OR C Energize E OR output NOR output Outputs Notice that Relay logic is similar to TTL. Can use Truth tables and Boolean expressions to do designs A+B+C = E et 438 b-7. pptx 13
Ladder Logic Memory Elements Mechanically latched relay - maintains state even when power removed. Has two coils (operate, reset) Typical wiring Operate Latched Reset Latched 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 Close et 438 b-7. pptx 14
Off-Return Memory E On 1 2 E 1 On Energize and re-energize circuit - Load 2 on No continuity in rungs 1 -4 Continuity in rung 6 Press A: continuity rung 2 Both loads on 3 4 Press B: continuity rung 4 Both loads off 1 Close Load 1 off 5 Open Load 2 off 6 2 Remember all contacts are drawn with the coils de-energized et 438 b-7. pptx 15
Timer Sub-Circuits TR-E On Open Load off Close Rung 1: when input A is energized timer TR-E starts 1 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 et 438 b-7. pptx 16
Form “C” Contact 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 et 438 b-7. pptx 17
Designing Sequential Control Systems 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 et 438 b-7. pptx 18
Review of Logic Gates and Boolean Algebra Boolean Variables False =0 True =1 Boolean Operators EOR=XOR Alternate Implementation et 438 b-7. pptx 19
Review of Logic Gates and Boolean Algebra Axioms of Boolean Algebra Idempotent Associative Distributive Identity Complement De. Morgan’s Theorem Absorption Order of Operations 1. NOT 2. AND 3. OR et 438 b-7. pptx 20
Review of Logic Gates and Boolean Algebra Example: Simplify the following expression using the axioms of Boolean Algebra. Add Parentheses Apply De. Morgans’s Theorem to first term Apply De. Morgan’s Here Collect common terms and factor et 438 b-7. pptx Expand Expressions 21
Review of Logic Gates and Boolean Algebra Example Continued Use Complement Axiom Use Identity Axiom Simplified Expression et 438 b-7. pptx 22
Logic Design 1. ) Obtain description of process 2. ) Define control action 3. ) Define Inputs and Outputs 4. ) Develop Truth Table or Boolean Equation of 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 et 438 b-7. pptx 23
Logic Design Define I/O variables Create Truth Table T B 2 B 1 Inputs: B 1 = bay 1 ingot present B 2 = bay 2 ingot present T = temperature sensor Output: F= fan start F 0 0 0 1 1 0 0 1 1 1 1 0 1 1 1 If there is no over temperature don’t start the fan Over temperature in empty oven: safety fan start Start fan in lightly load ovens with over temp. Over temperature in full oven: safety fan start et 438 b-7. pptx 24
Logic Design Select elements from truth table in SOP (sum-ofproducts) form then simplify. T B 2 B 1 F 0 0 0 1 1 0 0 1 1 1 1 0 1 1 1 Requires only Temp control Ignore unloaded and full load cases and try again et 438 b-7. pptx 25
Logic Design Revised Truth Table T B 2 B 1 F 0 0 0 1 1 0 0 0 1 1 1 1 0 Ladder Logic Representation et 438 b-7. pptx 26
Simplified Forms of Functions Avoid multiple complemented variables in ladder logic (No NAND, NOR) NOR NAND/NOR can not be implemented effectively using software. (Programmable Logic Controllers) et 438 b-7. pptx 27
State-Based Designs 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. et 438 b-7. pptx 28
State-Based Designs When a set of inputs (conditions) become valid for leaving a state, the system is directed to the destination state Current State exit input conditions To other states Next State outputs State entry input conditions et 438 b-7. pptx 29
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 Else B Else State 1 State 2 A If C true go to State 1 Else State 3 C If Condition A true go to State 2 Else stay in State 1 et 438 b-7. pptx State 3 If B true go to State 3 Else State 2 30
State Equations Informal: State n . . State j . . . State 2 State 1 State X =(State X +Arrival from another state) and has not left for another state setn seti Re-seti, = logical condition to reset state variable i and leave State m resetm State i set 2 . . State k reseti . . . reset 2 set 1 State 2 reset 1 Seti =logical condition to set state variable i and enter state et 438 b-7. pptx State 1 31
State Equations Formal Definition: Set Conditions Functions of state and inputs Where: statei = a variable that reflects state i is on 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 et 438 b-7. pptx Reset Conditions Functions of state and inputs 32
Example Write the state equation for a motor starting control described in the state diagram below with the following input and outputs S 1 (Start) X 1=1 I 0=pressed stop button (PB 1) I 1= pressed start button (PB 2) I 2 = motor overload condition (OL) O 1 = start motor (M) S 0 (Stop) X 1=0 Only 1 state variable required for two conditions X 1=0 or X 1=1 Output equation et 438 b-7. pptx 33
Example Boolean Equation to ladder logic diagram Substitute variable names Construct Ladder et 438 b-7. pptx 34
Design Example: Reciprocating Motion Process 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. et 438 b-7. pptx 35
Design Example: Reciprocating Motion Process Determine the inputs, outputs and states of system Inputs: I 0: press start I 1: press stop I 2: Table at reverse limit (1 LS) I 3: Table at forward limit (2 LS) Outputs: I 3 I 2 O 0 I 1 O 1 et 438 b-7. pptx O 0: Start motor forward (2 CR) O 1: Start motor reverse (3 CR) States: S 0: off S 1: on-forward, S 2: on reverse, 36
Design Example: Reciprocating Motion Process Assume machine starts at reverse limit. (1 LS changes state) S 1 (onforward) S 2 (onreverse) S 0 (Stop) I 0: press start I 1: press stop I 2: Table at reverse limit (1 LS) I 3: Table at forward limit (2 LS) O 0 start forward action O 1 start reverse action et 438 b-7. pptx 37
Design Example: Reciprocating Motion Process Define set and reset conditions Define 2 state variables X 1 and X 2 X 1 Condition 0 0 Off (S 0) 0 1 On-Forward (S 1) 1 0 On-Reverse (S 2) 1 1 Not allowed S 1 (onforward) S 0 (Stop) X 1=1 X 2=0 S 2 (onreverse) O 0 et 438 b-7. pptx X 1=0 X 2=1 O 1 Outputs 38
Design Example: Reciprocating Motion Process Convert state equations into ladder diagram et 438 b-7. pptx 2 CR = O 0 3 CR =O 1 I 0=start I 1=stop I 2=1 LS I 3=2 LS 39
States With Prioritization Systems with multiple entries and exits from a state require blocking of Alternatives. D B S 0 S 2 Two Choices IF A THEN block C IF C THEN block A A C A given priority to C S 1 A or C can occur independently to exit S 1. Must give one transition priority over other. Block setting of conflicting state et 438 b-7. pptx C over A 40
Prioritization Example S 1 S 0 Inputs A B C D E F FS Outputs P Q R Write state equations for this system. Give state S 2 priority over S 0 S 2 Output Map State P Q R S 0 0 1 1 S 1 1 0 1 S 2 1 1 0 et 438 b-7. pptx 41
Prioritization Example Write state equations using transitions S 0 blocked if S 2 is active Simplify using De. Morgam’s Theorem Output Equations Output Map State P Q R S 0 0 1 1 S 1 1 0 1 S 2 1 1 0 et 438 b-7. pptx 42
- Slides: 42