You are on page 1of 6

Sequential Function Chart (PLC) By Chaitanya Pattapagala (2009ME20659) Satyendra Singh Kardam (2009ME20680)

The IEC 61131-3 standard IEC 61131 deals with PLC programming language standards: In the standard five different languages are defined. The five languages are a kind of average of all languages used in the PLC industry. Each of these five languages can be used to describe parts of the program. They can all be connected with each other. The five languages are structured text, instruction list, ladder diagram, function block diagram and sequential function charts. The first two are textual languages and the other three are graphical. Structured text: Structured text (ST) looks a lot like Pascal. Instruction list: Instruction list (IL) is a kind of assembler language Function block diagram: Function block diagram (FBD) is a graphical language. In function block diagrams function are depicted as some kind of chip, with input ports and output ports. Sequential function chart: Sequential function chart is a graphical language for depicting sequential behaviour of a control system. It is used for defining control sequences that are time- and event-driven. Ladder Diagrams.

Sequential Function Chart: Sequential function chart (SFC) is a graphical language, which makes it possible to depict sequential behaviour. One of the most important aspects of SFC is that it shows the main states of a system, all the possible changes of state and the reasons why those changes would occur. It can be used at the top level to show the main phases of a process, but it can also be used at any other lower level. A SFC consists of the following elements. A number of steps; these steps are being depicted by rectangular boxes. Each step represents a particular state of the system being controlled. At least one of these steps is the initial step, which is depicted by a rectangular box containing vertical bars. The initial step is the first step to be activated whenever a SFC is started. The steps are connected by transitions. A line between two steps depicts a transition. Each transition is associated with a condition. When a condition following an active step becomes true, this results in the next step being activated and the active step becoming deactivated. Each step is associated with some action, performed while the step is active. Actions can be described by any of the five languages defined by the IEC 1131-3 standard.

The basic elements of an SFC diagram are shown below. 1) Flow lines - connects steps and transitions (these basically indicate sequence) 2) Transition - causes a shift between steps, acts as a point of coordination. 3) Allows control to move to the next step when conditions met (basically an if or wait instruction) 4) Initial step: the first step

5) Step: Basically a state of operation. A state often has an associated action.

6) Macro step: a collection of steps (basically a subroutine)

7) In a selection branch, only which transition is active.

one branch is executed depending on (XOR)

8) In a simultaneous branch, all branches are executed until the transition becomes active. (AND)

Actions: Steps describe the state of the system being represented. In a real system, each step is required to perform certain control actions that are applicable for that particular state. In SFC methodology, every step can be associated with one or more actions. An action contains a description of some behaviour that should occur as a result of the step being activated. The description of an action can be given using any of the IEC languages. Actions can be depicted in SFC language by an action box, which is connected with the particularly step. An action box consists of three parts: the action qualifier, the action and the indicator variable, which is optional. The action contains a description of the actions being performed when the associated step is active. This can be the name of some actions described somewhere else in the program, or it can be a description of the action in one of the five languages. The qualifier determines when the action is executed. For example, the action could be executed again and again, while the associated step is active, or the action could only be executed when the step becomes deactivated. We will see later which qualifiers are defined in the standard.

The indicator variable is optional. This is only used for annotation purposes. The indicator variable names a key variable that is changed by the action and indicates that the action has completed its execution. Action qualifiers: The standard defines a range of qualifiers which define precisely when a particular action executes in relation to its associated step. There are about 10 action qualifiers.

N Qualifier: This happens when condition T1 becomes true. Then Action1 will be executed one more time. tepA.X is a variable, which is true only when StepA is activated. It will be false when StepA is deactivated. As you can see, Action1 is executed while StepA.X is true. When T1 becomes true, StepA becomes deactivated and StepA.X becomes false. Action1 will be executed one more time.

The DS qualifier is used in the action box associated with Step1. A time indicator has to be given, which indicates what delay time is used, in this case 4 seconds. Action1 is not directly executed when Step1 becomes activated. This happens 4 seconds after Step1 has been activated. Then Action1 is stored and activated. This means that it will be executing until it is reset.

Example: The example shows a SFC for control of a two door security system. One door requires a two digit entry code; the second door requires a three digit entry code. There is an action associated with the Start block that locks the doors. After the start block the diagram immediately splits the execution into two processes and both steps 1 and 6 are active. The transitions are similar to transitions in state diagrams, but they are drawn with thick lines that cross the normal transition path. When the right logical conditions are satisfied the transition will stop one step and start the next. While step 1 is active there are two possible transitions that could occur. If the first combination digit is correct then step 1 will become inactive and step 2 will become active. If the digit is incorrect then the transition will then go on to wait for the later transition for the 5 second delay, and after that step 5 will be active. Step 1 does not have an action associated, so nothing should be done while waiting for either of the transitions. The logic for both of the doors will repeat once the cycle of combinationunlock-delay-lock has completed.

Below is the sequential function chart and translated ladder diagram for a simple device that toggles a lamp on the falling edge of an input. The N-type actions used to turn the lamp on represent non-stored actions that are only active while the state is active. To turn the lamp on, the input must be turned on and then off. To turn the lamp back off, the input must be turned on and turned off again. The lamp does not turn off until the input is turned off.

LADDER DIAGRAM:

Conclusions: The benefits of the approach presented here are (i) it starts from a controller representation that is a de-facto standard for specifying PLC programs in industry, and (ii) the procedure is completely algorithmic once the SFC controller, the formal requirements, and the plant model are available. The steps of designing the SFC controller, obtaining the plant model, and correcting the design in case of a negative verification result, can obviously not be accomplished completely algorithmically. Our current aim is, however, to develop a scheme to derive the SFC program systematically from the set of specifications when applying the approach described here, an important issue is to employ a plant model of sufficient accuracy. At least for chemical processing systems, we have experienced that FSA models are often not sufficient to verify the exclusion of safety-relevant plant states. The use of TA models is appropriate if the transition times between certain events can be estimated accurately and conservatively. The choice of the plant model but also the level of detail of the controller model determines the complexity of the verification task. It should be mentioned, however, that the main complexity here arises from the fact that the PLC cycle is mapped into the TA model. Exercises:
1. Develop an SFC for a two person assembly station. The station has two presses that

may be used at the same time. Each press has a cycle button that will start the advance of the press. A bottom limit switch will stop the advance, and the cylinder must then be retracted until a top limit switch is hit. 2. Create an SFC for traffic light control. The lights should have cross walk buttons for both directions of traffic lights. A normal light sequence for both directions will be green 16 seconds and yellow 4 seconds. If the cross walk button has been pushed, a walk light will be on for 10 seconds, and the green light will be extended to 24 seconds. 3. Draw an SFC for a stamping press that can advance and retract when a cycle button is pushed, and then stop until the button is pushed again. 4. Assignment Problem: Develop an SFC for a vending machine and expand it into ladder logic. References: 1. R.W. Lewis, Programming industrial control systems using IEC 1131-3, The Institution of Electrical Engineers, London, 1995. 2. Wolfgang A. Halang & Krzystof M. Sacha, Real Time Systems Implementation of Industrial Computeriezed Process Automation, World Scientific. 3. Controllers Programming Languages, IEC 61131-3. (2003) Ed. 2.0. Moon, I., Powers, G.J., Burch, J.R., Clarke, E.M.: Automatic verification of sequential control systems using temporal logic. AIChE Journal 38 (1992) 6775. 4. Programming PLCs using Sequential Function Chart by Martin Bruggink, Department of Computing Science, University of Nijmegen.

You might also like