You are on page 1of 54

Lecture 8

Clock-Mode Sequential Machines
Gas burner start up (application example)

Clock-Mode Sequential Machines
• 8.1 Introduction
• 8.2 Mealy and Moore machine
• 8.3 State table
• 8.4 State diagram

Gas burner start up
(application example)

• 8.5 Introduction
• 8.6 Technological conditions
• 8.7 Variable list
• 8.8 Block diagram of the whole system
• 8.9 Minimal HW configuration of a PLC
• 8.10 State diagram

8.1 Introduction
The various flip-flops, counters and shift
registers are all examples of sequential
machines (automatons).
All these circuits contain memory elements.
The flip-flops are the elementary memory
elements. The counters and shift registers
are composed of more than one such
element.

Introduction -2
All the circuit are capable of assuming more
than one state.
Their outputs do not depend only on the
inputs but also on the state in which the
circuit is at the time when the input is
acting on it.
If we note carefully the circuits of all these
elements, they have a feedback from the
output to the input.

say n. of internal states. a sequential machine will have the following: 1. X2.……Xn} 3. say p.2 Mealy and Moore machine In general. so that Z={Z1. say m. so that X={X1. of inputs.……Sp} 2. A set X having a finite number. S2. so that S={S1.……Zm} . A set S containing a finite number. A set Z containing a finite number. of outputs. 8. Z2.

Mealy and Moore machine-2 4. Xt ) . A characterizing function f that uniquely defines the next state St+1 as a function of the present state St and the present input Xt . so that St+1 = f(St .

Xt ) .A Mealy machine A characterizing function g that uniquely defines the output Zt as a function of the present input Xt and the present internal state St . Mealy and Moore machine-3 5. so that Zt = g(St .

so that Zt = g(St ) .B Moore machine A characterizing function g that uniquely defines the output Zt as a function of the present internal state St . Mealy and Moore machine-4 5.

S.f. M=(X. . outputs. Z and S are the finite and nonempty sets of inputs.g). Mealy and Moore machine-5 A sequential machine can therefore formally be defined as follows: Definition: A sequential machine is a quintuple. where X. and states respectively.Z.

. Xt ) and the g is the output function such that Zt = g(St . such that St+1 = f(St . either a state table or a state diagram is used. Mealy and Moore machine-6 f is the next-state function. Xt ) for a Mealy machine Zt = g(St ) for a Moore machine To describe a sequential machine.

which is the state table.B.O2 The characterizing functions f and g are depicted in tabular form.C and D. . a set of two inputs I1 and I2 and a set of outputs O1 .3 State table Table1 is a state table describing an example sequential machine M1. 8. It can be seen that machine M1 has a set of four internal states A.

O1 C.O2 D A.O1 .O1 B.O1 D.O2 B D. State table-2 • State table of a Mealy machine M1 Present state Next state. output Input I1 I2 A A.O2 A.O1 C B.

the next state is A and the output is O1. . for the present state B when the input is I1. the next state is D and the output is O2. Since the output of the machine M1 depends on both the present state and the input. If the input is I2. Thus the table shows the next state and the output for each combination of the present state and the input. State table-3 For example. it is a Mealy machine.

Therefore. this table has a separate column defining the outputs. . and two input columns defining the next state without having any output associated with it. Here the output is independent of the input and depends only on the present state of the machine. State table-4 Table2 shows the state table of a Moore machine.

State table-5 • State table of a Moore machine M2 Present state Next state Input Output I1 I2 A B C O1 B C D O2 C A C O1 D A C O2 .

Such machines are therefore called completely specified sequential machines (CSSMs). the next state and the output are completely specified. M2 which we have depicted in the two state tables is that for all combinations of present state and input. State table-6 Another interesting property of of the machines M1. .

State table-7 There is another clas of sequential machines. Such machines are known as incompetely specified sequential machines (ISSMs). where sometimes the next state or the output or both may remain unspecified. .

Folowing figures show the state diagrams of machines M1 and M2 respectively.4 State diagram The information contained in the state table can also be shown in a graphical manner with the help of nodes conected by directed graphs. 8. Such diagrams are called state diagrams. .

State diagram-2 State diagram of the Mealy machine M1 .

State diagram-3 State diagram of the Moore machine M2 .

Prentice Hall International. Literature • Nripendra N.1993.ISBN 0-13-010695-X . Biswas: Logic Design Theory.

Gas burner start up (application example) .

5 Introduction • Both startup and shut down of a gas burner is rather complicated by safety reason • There is a risk of explosion for example at gas escape. premature ignition (firing). 8. lighting out of the flame when the gas valve is open etc. • The right startup sequence given by standards • Simplified in our example • Moore machine application .

8.6 Technological conditions At the beginning waiting for Start signal from thermostat Initial checking: • Air pressure sensor checking – (there must not be the air overpressure) • Gas pressure sensor checking – (there must be sufficient gas pressure) .

Technological conditions-2 After the initial checking: Startup of the combustion air compressor and after it the delay τ2=3 s (air compressor is running with sufficient performance) Ventilating of the combustion chamber during τ1=30 s (to prevent creating of detonating mixture from the rest of gas and the air) Checking of sufficient ventilating of the combustion chamber(sufficient high value at the air pressure sensor) .

pulses) • Continuing with these conditions during τ3=4 s • After this delay expiration standard operating checking starts .g. Technological conditions-3 After the sufficient ventilating the burner firing startup: • Gas valve opening • Firing signal generation (e.

Technological conditions-4 Standard operating checking sequence Gas pressure sensor checking -(there must be sufficient gas pressure) Air pressure sensor checking -(there must be sufficient air overpressure) Flame presence sensor checking -(the flame must not disappear when gas valve is open) Thermostat checking -(is there a need for heating. that is for running the burner?) .

standard operating or shut down. only one macro state „shut down“ Errors • When any error occures during start up. then it is necessary to assure properly transition to the error state (shut down and the error message) . Technological conditions-5 Shut down of the gas burner • Similar sequence as with start up • Here not in detail.

.thermostat (there is a need for heating: Sta=1) • Vzd …air pressure sensor (sufficient pressure : Vzd=1) • Ply … gas pressure sensor (sufficient pressure : Ply=1) • Pla …. flame presence sensor (flame is burning: Pla=1) .7 Variable list Inputs of PLC • Sta…. 8.

firing signal (Zps=1: firing signal generation!) . gas valve (Opp =1: gas valve open!) • Zps ….. Variable list-2 Outputs of PLC • Sdv ……air compressor (Sdv=1: air compressor start up!) • Opp ….

Variable list-3 Internal variables – technological parameters • τ1 …delay for ventilating of the combustion chamber (τ1=30s ) • τ2…delay for combustion air compressor starting (τ2=3s ) • τ3… delay for firing signal generation (τ3=4s ) .

8 Block diagram of the whole system Pla I O Ply PLC TP Sta Vzd TP ……technological process ( gas burner ) .8.

Block diagram of the whole system-2 Pla I O Ply PLC TP Sta Vzd .

Block diagram of the whole system-3 Sdv Pla I O Ply Opp ŘS PLC TP Sta Zps Vzd .

τ2. τ3 .Block diagram of the whole system-4 Sdv Pla I O Ply Opp ŘS PLC TP Sta Zps Vzd τ1.

τ3 . τ2. Block diagram of the whole system-5 OP OP Operator panel Rest Err Sdv Pla I O Ply Opp ŘS PLC TP Sta Zps Vzd τ1.

inputs and outputs of PLC Inputs of PLC • Sta…. flame presence sensor (flame is burning: Pla=1) • Rest …. Variable list ..OP – restarting command (command for restarting from operator panel: Rest=1) .thermostat (there is a need for heating: Sta=1) • Vzd …air pressure sensor (sufficient pressure : Vzd=1) • Ply … gas pressure sensor (sufficient pressure : Ply=1) • Pla …..

OP – error indication lamp (Err=1: lamp is on!) .inputs and outputs Outputs of PLC • Sdv ……air compressor (Sdv=1: air compressor start up!) • Opp …. gas valve (Opp =1: gas valve open!) • Zps …. firing signal (Zps=1: firing signal generation!) • Err …... Variable list .

5 DO – DI . outputs – Q) . (IEC 1131: inputs . 16 • specific addresses are HW dependend.Digital Input – DI ..9 Minimal HW configuration of a PLC • 5 binary inputs +20% reserve…6 DI • 4 binary outputs +20% reserve.. 8.8.I.Digital Output • real configuration: 8/8 IO [ajou] • binary inputs and outputs of PLC often organised in groups of 4..

8.10 State diagram Opp.Zps . Sdv En? Sta Start up: CNS ODS K01 CNS to ZAP Sta Vzd Rest Vzd Ordinary operation: K07 Ply K02 K04 až K07 1 Pla Pla 2 Ply Shut down: K06 6 ERR Sdv „makrostate“ ODS Vzd 5 3 C1 4 Vzd Tau2 Vzd K05 Ply Tau2 Errors: Tau1 C2 Sta Tau3 Tau1 „macrostate“ ERR Ply K04 ZAP Zps Tau3 Opp.

.waiting for start K01.State diagram-2 Sta CNS State names: K01 CNS.first checking ..

inverse variable (=0) ..error ERR Vzd .....State diagram-3 Sta CNS State names : K01 Vzd K02. direct variable (=1) Vzd .second checking Vzd K02 ERR..

outputs. only when changing ..State diagram-4 Sta CNS State names : K01 Vzd C1…first waiting loop Vzd Ply K02 Ply ERR Sdv C1 blue .

Tau2 C2 Implementation in PLC with „timers“ . State diagram-5 Sta CNS State names: K01 Vzd C2…second waiting loop Vzd green auxiliary binary Ply K02 variables (with the relation to the Ply ERR technological parametres) Sdv C1 Tau2 t< τ2: Tau2=0 …. Tau2 Tau2 t τ2: Tau2=1 ….

burner firing Ply K02 Ply ERR Sdv C1 Vzd Tau2 Tau2 Tau1 C2 Tau1 ZAP Opp.Zps ...State diagram-6 Sta CNS State names : K01 Vzd Vzd ZAP.

Zps Tau3 . State diagram-7 Sta CNS State names : K01 Vzd Vzd K04…fourth checking Ply K02 Ply ERR Sdv C1 Vzd Tau2 Tau2 Tau1 C2 Tau1 K04 Tau3 ZAP Zps Opp.

State diagram-8 Sta CNS State names: K01 Vzd Vzd K05…fifth checking Ply K02 Ply ERR Sdv C1 Vzd Tau2 K05 Ply Tau2 Tau1 C2 Ply K04 Tau3 ZAP Tau1 Tau3 Opp.Zps Zps .

Zps Tau3 . State diagram-9 Sta CNS State names: K01 Vzd K06…sixth checking Vzd Ply K02 Ply K06 ERR Sdv Vzd C1 Vzd Vzd Tau2 K05 Ply Tau2 Tau1 C2 Ply K04 Tau3 ZAP Tau1 Zps Opp.

Zps . State diagram-10 Sta CNS State names : K01 Vzd Vzd K07…seventh checking K07 Ply K02 Pla Pla Ply K06 ERR Sdv Vzd C1 Vzd Vzd Tau2 K05 Ply Tau2 Tau1 C2 Ply K04 Tau3 ZAP Tau1 Zps Tau3 Opp.

Zps . Sdv Sta State names: CNS ODS K01 Sta Vzd ODS…shut down Vzd (macrostate-sequention K07 Ply K02 of states similar Pla to the stating up) Pla Ply K06 ERR Sdv Vzd C1 Vzd Vzd Tau2 K05 Ply Tau2 Tau1 C2 Ply K04 Tau3 ZAP Tau1 Sta Zps Tau3 Opp. State diagram-11 Opp.

Sdv En? Sta CNS Another input: ODS K01 Sta Vzd Vzd En?. State diagram-12 Opp.Zps ..main power K07 K02 switch ???? Ply Pla Pla Ply K06 ERR Sdv Vzd C1 Vzd Vzd Tau2 K05 Ply Tau2 Tau1 C2 Sta Ply K04 Tau3 ZAP Tau1 Zps Tau3 Opp.

: Err4:„there is Tau1 C2 Tau3 Tau1 not sufficient gas Sta Ply K04 ZAP pressure during Zps Tau3 Opp. Error Opp. Sdv En? Sta „ macrostate “: CNS 1.6 various types of ODS K01 Sta Vzd errors – it is possible to Vzd distinquish via previous K07 Ply K02 state and the cause of the 1 errror occurence) Pla Pla 2 Ply K06 6 ERR 5 Sdv Vzd 3 C1 4 Vzd Tau2 Vzd Ply Tau2 K05 E.Zps ordinary operation“ .….g.2. State diagram-13 ERR….

Zps . State diagram-14 Opp. Sdv En? Sta Rest: CNS ODS K01 • only authorized Sta Vzd operator Rest Vzd • confirming K07 Ply K02 of error removing 1 • special safety switch Pla Pla 2 Ply on the operator panel K06 6 ERR 5 Sdv Vzd 3 C1 4 Vzd Tau2 Vzd K05 Ply Tau2 Tau1 C2 Sta Tau3 Tau1 Ply K04 ZAP Zps Tau3 Opp.