Eee3420 lecture06 rev2011

49
1 Week © Vocational Training Council, Hong Kong. Lecture 6 SFC based Process Control Design EEC3420 Industrial Control Department of Electrical Engineering

Transcript of Eee3420 lecture06 rev2011

Page 1: Eee3420 lecture06 rev2011

1Week © Vocational Training Council, Hong Kong.

│ Lecture 6 │

SFC based Process Control Design

EEC3420 Industrial ControlDepartment of Electrical Engineering

Page 2: Eee3420 lecture06 rev2011

2© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Learning Objectives

Know the background of Sequential Function Chart (SFC)

Understand the operation of SFC

Process design using SFC

Page 3: Eee3420 lecture06 rev2011

3© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Introduction to Sequential Function Chart

• a special high-level language to describe control sequences in graphical schedules

• at the late 70s the first function chart program Grafcet was developed in France

• the base for the definition of the international standard IEC 848 (“Preparation of function charts for control systems”)

• used to structure the internal organization in a control program

• written in a language that is defined to perform sequential control functions

Page 4: Eee3420 lecture06 rev2011

4© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Introduction to Sequential Function Chart

SFC describes the control sequences with predefined rules for:

• Controls that have to be executed and in which order they shall be done.

• Execution details for each instruction

Page 5: Eee3420 lecture06 rev2011

5© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Introduction to Sequential Function Chart

The SFC can be divided into two parts, the “sequence“ part and the “object” or “control” part.

In the “sequence” part the order between the control steps is described and in the “object” or control” part is the internal actions that shall be executed.

Page 6: Eee3420 lecture06 rev2011

6© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Introduction to Sequential Function Chart

According to IEC 611131-3 (1998-11-18) page 86 the SFC elements give a division of the control program in a number of steps and transitions connected to each other by directed links. To every step there is one or several actions and to each transition there is a condition connected.

Page 7: Eee3420 lecture06 rev2011

7© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Introduction to Sequential Function Chart

Step:The program behavior in a step follows a number of rules defined by the associated actions that is connected to the step. The step can be either active or inactive. At any given moment, its active steps, the internal and the output variable values define the state of the control program.

Page 8: Eee3420 lecture06 rev2011

8© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Introduction to Sequential Function Chart

Step:Graphically a block that contains a step-name represents the steps. A vertical line attached to the top of the step represents the directed link to the step. A vertical line connected graphically represents the link from the step to the bottom of the step

Page 9: Eee3420 lecture06 rev2011

9© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Introduction to Sequential Function Chart

Step:The step that is “active” is the step that is currently executed. To indicate if a step is active or inactive, there is a step flag. The step flag is represented by a Boolean, the value of the step flag is one if the step is active and zero if the step is inactive.

Page 10: Eee3420 lecture06 rev2011

10© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Introduction to Sequential Function Chart

Step:The time that is spent in a step is saved as the variable “step elapsed time” it keeps it value when a step is inactivated. The value on “step elapsed time” is reset when a step is activated.

Page 11: Eee3420 lecture06 rev2011

11© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Introduction to Sequential Function Chart

Step:The control program must have an initial state, in this state the internal and output variables have their initial values and the control program stand in its initial step. The initial step is the step that is initially active and there shall be exactly one initial step. The initial step is represented graphically by a step with double lines for boarder.

Page 12: Eee3420 lecture06 rev2011

12© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Introduction to Sequential Function Chart

Step:The number of steps per SFC and the accuracy for the “step elapsed time” is dependent on the implementation.

Page 13: Eee3420 lecture06 rev2011

13© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Introduction to Sequential Function Chart

Transitions:There are transitions between every step Thanks to the transition the program can pass from one or more preceding steps to one or more successor steps. When the program passes a transition the successor step(s) becomes active and the preceding step becomes inactive. The transition is made along the vertical directed link.

Page 14: Eee3420 lecture06 rev2011

14© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Introduction to Sequential Function Chart

Transitions:To each transition there are associated steps, which is called transition conditions. The transition condition shall result in an evolution of a simple Boolean expression. Sometimes the user wants the transition condition to always be true, and then the symbol 1 or the keyword true shall represent it.

Page 15: Eee3420 lecture06 rev2011

15© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Introduction to Sequential Function Chart

Actions:Every action is associated with a step. The step can have none or several actions associated. If there is no associated action to the step, it will be considered as a WAIT function.

Page 16: Eee3420 lecture06 rev2011

16© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Introduction to Sequential Function Chart

Actions:The WAIT function is a function that is waiting for the successor transition to be true. An action can be described in several ways, for example with a ladder-diagram, logical circuits or with Boolean expressions.

Page 17: Eee3420 lecture06 rev2011

17© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Introduction to Sequential Function Chart

Action blocks:This is a graphical element for the combination of a Boolean variable with one of the action qualifiers to produce an enabling condition. The action block contributes with a kind of Boolean indicator variable; it can be set by a specific action to indicate its completion, time-out, error conditions, etc.

Page 18: Eee3420 lecture06 rev2011

18© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Introduction to Sequential Function Chart

Action blocks:The graphical concatenated action blocks can have multiple indicator variables, but just one common Boolean input variable, it shall act simultaneous for all the concatenated blocks.

Page 19: Eee3420 lecture06 rev2011

19© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Introduction to Sequential Function Chart

Action qualifier:Each step/action association shall have an associated action qualifier. The action qualifier can have the following values according to IEC 61131-3 (1998-11-18) page 97.

Page 20: Eee3420 lecture06 rev2011

20© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Introduction to Sequential Function Chart

Action qualifier:

Page 21: Eee3420 lecture06 rev2011

21© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Representation of a sequential process by SFC

Basic component symbols used in the SFC

(IEC 6113-3)

Page 22: Eee3420 lecture06 rev2011

22© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Basic structures of SFC

The SFC syntax can handle much more than just an iterative execution of the same control instructions.

The initial step, step(s) and transitions can be connected in several ways, which makes it possible to describe many complicated functions.

Page 23: Eee3420 lecture06 rev2011

23© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Basic structures of SFC

Simple sequence, this is just a step followed by a transition or a transition followed by a step

Page 24: Eee3420 lecture06 rev2011

24© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Basic structures of SFC

Alternative parallel sequences consist of two or more transition succeeding a step, so that the execution can take alternative ways depending on external conditions.

Page 25: Eee3420 lecture06 rev2011

25© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Basic structures of SFC

Simultaneous parallel sequences, are made up of two or more steps placed parallel after a transition. The parallel steps can be simultaneously active.

Page 26: Eee3420 lecture06 rev2011

26© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Implementation of SFQ by basic ladder building block

Simple Sequence

Page 27: Eee3420 lecture06 rev2011

27© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Implementation of SFQ by basic ladder building block

Simple Sequence :

The Boolean equations for X2 and X3 are:

X2 = ( X1•a + X2 )•/X3

X3 = ( X2 •b + X3 ) •/X4

Here X2 is an active step. When X2 is active, the actions Y1 and Y2 are asserted. When X2 is inactive, the execution of Y1 and Y2 will stop.

Page 28: Eee3420 lecture06 rev2011

28© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Implementation of SFQ by basic ladder building block

Alternative parallel sequence

Page 29: Eee3420 lecture06 rev2011

29© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Implementation of SFQ by basic ladder building block

Alternative parallel sequence :The Boolean equations for X2, X3, X4 and X5 are:X2 = ( X1•a + X2 ) • /X3 • /X4X3 = ( X2•b + X3 )•/X5 ‘alternate parallel branchX4 = ( X2•c + X4 )•/X5X5 = ( X3•d + X4•e + X5 )•/X6

There are two conditions entering step X5.

Page 30: Eee3420 lecture06 rev2011

30© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Implementation of SFQ by basic ladder building block

Simultaneous parallel sequence

Page 31: Eee3420 lecture06 rev2011

31© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Implementation of SFQ by basic ladder building block

Simultaneous parallel sequence :The Boolean equations for X2, X3, X4, X5, X6, X7 and X8 are:X2 = ( X1 • a + X2 ) • /X3X3 = ( X2 • b + X3 ) • /X4 X5 = ( X2 • b + X5 ) • /X6 X6 = ( X5 • d + X6 ) • /X7 X4 = ( X3 • c + X4 ) • /X8X7 = ( X6 • e + X7 ) • /X8 X8 = ( X4 • X7 • f + X8 ) • /X9

Page 32: Eee3420 lecture06 rev2011

32© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Implementation of SFQ by basic ladder building block

Branching sequence

Page 33: Eee3420 lecture06 rev2011

33© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Implementation of SFQ by basic ladder building block

Branching sequence :The Boolean equations for X2, X3, X4 and X5 are:X2 = ( X1 • a + X2 ) • /X3 • /X5 X3 = ( X2 • b + X3 ) • /X4 X4 = ( X3 • c + X4 ) • /X5X5 = ( X2 • e + X4 • d + X5 ) • /X6 There are two branches for step X2, it enters the step X3 if condition b is asserted and it enters the step X5 if condition e is asserted.

Page 34: Eee3420 lecture06 rev2011

34© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Implementation of SFQ by basic ladder building block

Repeating sequence

Page 35: Eee3420 lecture06 rev2011

35© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Implementation of SFQ by basic ladder building block

Repeating sequence :The Boolean equations for X2, X3, X4 and X5 are:X2 = ( X1 • a + X4 • e + X2 ) • /X3X3 = ( X2 • b + X3 ) • /X4 X4 = ( X3 • c + X4 ) • /X5 • /X2 X5 = ( X4 • d + X5 ) • /X6

Page 36: Eee3420 lecture06 rev2011

36© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Implementation of SFQ by basic ladder building block

Initial step

Page 37: Eee3420 lecture06 rev2011

37© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Implementation of SFQ by basic ladder building block

Initial step :

To enter into Step 0, either a “First Scan” input signal or nand logic of all the rest of the steps can be used. So the Boolean equation for Step 0 is: Step0 = ( FirstScan + Step0 ) • /Step1 or if the nand logic of all the rest of the steps is used, then Step0 = ( /Step1 • /Step2 • /Step3 + Step0 ) • /Step1

Page 38: Eee3420 lecture06 rev2011

38© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Implementation of SFQ by basic ladder building block

Inserting

blank step

Page 39: Eee3420 lecture06 rev2011

39© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Implementation of SFQ by basic ladder building block

Inserting blank step :

The looping in the SFC on the left cannot be implemented as it is impossible for Setp2 to serve as the setup point and the exit point for Step1 at the same time. So a blank step Step3 is inserted to implement the required looping.

Page 40: Eee3420 lecture06 rev2011

40© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Implementation of SFQ by basic ladder building block

Inserting blank step :

The Boolean equation for Step1, Step2 and Step3 are as follows:Step1 = ( Step3 • 1 + Step1 ) • /Step2Step2 = ( Step1 • LS1 + Step2 ) • /Step3Step3 = ( Step2 • LS2 + Step3 ) • /Step1

Page 41: Eee3420 lecture06 rev2011

41© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Example of process control by using SFC

Design the logic to move a lift between 3 floors, and the control functions as follows:

– The lift has for each floor one button which, if pressed, causes the lift to visit (i.e. move to and stop at) that floor.

– Each floor has a button to request an up-lift or a down-lift. They are cancelled when a lift visits the floor.

– A lift without requests should remain in its final destination and await further requests.

Page 42: Eee3420 lecture06 rev2011

42© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Example of process control by using SFC

There are six cases:1. Consider first at

the 3rd floor called by the 1st floor.

Page 43: Eee3420 lecture06 rev2011

43© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Example of process control by using SFC

2. Next consider the case of the lift at the 1st floor called by the 3rd floor

Page 44: Eee3420 lecture06 rev2011

44© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Example of process control by using SFC

3. Then consider the case of the lift at the 3rd floor called by the 2nd floor

Page 45: Eee3420 lecture06 rev2011

45© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Example of process control by using SFC

4. Then consider the case of the lift at the 1st floor called by the 2nd floor.

Page 46: Eee3420 lecture06 rev2011

46© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Example of process control by using SFC

5. Then consider the case of the lift at the 2nd floor called by the 1st floor.

Page 47: Eee3420 lecture06 rev2011

47© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Example of process control by using SFC

6. Finally consider the case of the Lift at the 2nd floor called by the 3rd floor.

Page 48: Eee3420 lecture06 rev2011

48© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Summary

SFCs are suited to processes with single/parallel flow of execution

SFCs are suited to processes with clear sequence of operation

SFC may be implemented by using block logic

SFC may also be implemented using sequence bits

Page 49: Eee3420 lecture06 rev2011

49© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

SFC based Process Control Design

End of Lecture 6

RevisionThe IEC 61131-3 Programming Language Specification