Eee3420 lecture06 rev2011

Preview:

Citation preview

1Week © Vocational Training Council, Hong Kong.

│ Lecture 6 │

SFC based Process Control Design

EEC3420 Industrial ControlDepartment of Electrical Engineering

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

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

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

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.

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.

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.

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

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

20© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Introduction to Sequential Function Chart

Action qualifier:

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)

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.

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

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.

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.

26© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Implementation of SFQ by basic ladder building block

Simple Sequence

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.

28© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Implementation of SFQ by basic ladder building block

Alternative parallel sequence

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.

30© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Implementation of SFQ by basic ladder building block

Simultaneous parallel sequence

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

32© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Implementation of SFQ by basic ladder building block

Branching sequence

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.

34© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Implementation of SFQ by basic ladder building block

Repeating sequence

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

36© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Implementation of SFQ by basic ladder building block

Initial step

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

38© Vocational Training Council, Hong Kong.

EEE3420 Industrial Control

Week

Implementation of SFQ by basic ladder building block

Inserting

blank step

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.

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

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.

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.

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

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

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.

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.

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.

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

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