Navigation

  • Page 1

    Module 4 Programmable Logic Control Systems Version 2 EE IIT, Kharagpur 1

  • Page 2

    Lesson 21 Programming of PLCs: Sequential Function Charts Version 2 EE IIT, Kharagpur 2

  • Page 3

    Instructional Objectives After learning the lesson students should be able to A. Describe the major features of the IEC 1131-3 standard for PLC programming B. Describe the major syntax conventions of the SFC programming language C. Identify valid and invalid SFC segments D. Develop SFC program...

  • Page 4

    Major Features of IEC 1131-3 The following are some of the major features of the standard. 1. Multiple Language Support: One of the main features of the standard is that it allows multiple languages to be used simultaneously, thus enabling the program developer to use the language best suited to...

  • Page 5

    variety of operations, and both users and vendors can create their own. A typical simple function block is shown below in Fig. 21.1. Raise switch Top LS OK Lower switch Bottom LS OK Pump running & & & = Loading valve Fig. 21.1 Combinational logic programmed with function ...

  • Page 6

    start_cmd: LD ii 01 ADD 10 mul_op: MUL( i_gain SUB offset 01 ) ST op 01 JMPNC mul_op Fig. 21.3 Simple program segment written in Instruction List Point to Ponder: 1 A. Name one programming task for which, IL would be your chosen language. B. Name one programming task for which, ST ...

  • Page 7

    (a) (b) Fig. 21.4 An initial step (a) and a regular step (b) in an SFC The initial step is executed the first time the SFC block is executed or as a result of a reset operation performed by a special function named SFC_RESET. There can be one and only one initial step in an SFC. The init...

  • Page 8

    S1 S2 T1 S3 T2 Fig. 21.6 Transitions connect steps in an SFC The SFC in Fig. 21.6 shows how the transitions connect steps in an SFC. Initially, step S1 is active. Thus transition T1 is also active. When the transit...

  • Page 9

    Scan S1 T1 S2 T2 S3 T3 1 A A I I I I 2 I I A A I I 3 I I A A I I 4 I I I I A A (b) Fig. 21.7 A simple sequence in an SFC (a) and its execution over scans (b) The table in Fig. 21.7 (b) indicates the status (A : active; I:inactive) of te steps and transitions over scan cycles. Divergence of a S...

  • Page 10

    S4S5S6 T3T4Fig. 21.9 Convergence of a selective sequence Divergence of a Simultaneous Sequence In contrast with a selective sequence, in a simultaneous divergent branch more than one step can become active. Thus, in this case, we have two or more branches to be active simultaneously....

  • Page 11

    S4 S5 S6 T2Fig. 21.11 Convergence of a simultaneous sequence The transition logic for T2 is only executed when all of the steps at the end of the simultaneous sequence are active. Source and Destination Connectors Source and destination connectors are used to create forward and bac...

  • Page 12

    S3 S4 T2 S2 S1 T1 T3 T4 T5 jump ** jump * cycle * cycle ** Fig. 21.12 Source and Destination Connectors Many PLCs also allow SFCs to entered be as graphic diagrams. Small segments of ladder logic can then be entered for each transition and action. Each segment of ladder...

  • Page 13

    S1 S2 S3 T1 T2 Cycle Cycle Fig. 21.13 S1 T1 T2 Cycle Cycle S3 S2 S4 S6 S7 S5 T3 T4 T5 S8 T6 Fig. 21.14 Version 2 EE IIT, Kharagpur 13

  • Page 14

    S3 T4 S4 S5 S6 S7 S10 T3 T2 Fig. 21.15 Control Program Architecture with SFCs A typical architecture of a control program with SFCs is shown in Fig. 21.16. Here the main program block is organised as an SFC. Each step and transition in the SFC of the main program block is c...

  • Page 15

    Sequential Processing This portion of the PLC scan consists of evolving the SFC to its next state and processing the action logic of any steps that become active. Only the logic associated with active steps and transitions is scanned by the PLC, leading to a significant reduction of scan time. ...

  • Page 16

    PistonDie UpSole- noid Upper limit switch Lower limit switch Down Solenoid Fig. 21.17 An Industrial Logic Control Example Summary of Requirements Analysis for the Stamping Process A summary of the requirement analysis carried out in Lesson 20 is given below for ready reference. ...

  • Page 17

    D. A “Stop” PB, if pressed, stops the press only when it is going down E. If the “Stop” PB is pressed, the “Reset” PB must be pressed before the “Auto” PB can be pressed F. After retracting, the press waits till the part is removed and the next part is detected State Transition D...

  • Page 18

    1 2 3 4 6 Reset PB Part detectAuto PB Part not detected 1 Auto Indicator on Down Sol on Part Hold on Down Sol off Up Sol on Up Sol off Part hold off 5 Auto Indicator off Down Sol off 2 6 7 3 4 5 Stop PB Bottom LSTop LSFigure 21.20 SFC for Controlling a Stamping Press Fo...

  • Page 19

    Fig. 21.21 Sample Ladder Logic for a Graphical SFC Program. Auto Indicator RLL for step 2 EOT Part detect Step 2 RLL for transition 2 Part hold RLL for step 3 Down Sol EOT Bottom LS Step 2 RLL for transition 3 Note the following distinctions of the SFC based implement...

  • Page 20

    Point to Ponder: 4 A. 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 unti...

  • Page 21

    Answers, Remarks and Hints to Points to Ponder Point to Ponder: 1 A. Name one programming task for which, IL would be your chosen language. Ans: Consider a triple redundancy voting logic for 3 digital sensor inputs, for tolerance against sensor failures. The logic aims to select the three des...

  • Page 22

    Ans: Systems are supposed to spend time in the states. Transitions are instantaneous and merely indicate conditions under which systems change from one state to another. In an SFC, at any point of time, a number of steps and transitions are active. However, the computations of the steps can updat...

  • Page 23

    1. Start button #1 press #1 adv. Bottom limit switch #1 Top limit switch #1 press #1 retract press #1 off Start button #2 press #2 adv. Bottom limit switch #2 Top limit switch #2 press #2 retract press #2 off Master4 6 5 7 0 2 1 3 F. Create an SFC for traffic light...

  • Page 24

    Start EW crosswalk button30s delay Red NS, green EW walk light on for 10s NS crosswalk button 30s delay Red EW, green NS walk light on for 10s NO EW crosswalk button20s delay16s delay10s delayRed NS, green EW 4s delay NO NS crosswalk button Red NS, yellow EW Red EW, yellow NS Red EW, green ...

  • Page 25

    Start idle extending retracting Retract limit switch made Advance limit switch made Cycle button pressed 3. H. Design a garage door controller using an SFC. The behavior of the garage door controller is as follow. a. There is one button inside the garage, and one button remote ...

  • Page 26

    4. 1 Garage or Remote button pressed Close door 2 bottom limit switch made top limit switch made Open door Light beam interrupted 4 T3 T5 T4 T2 T1 Garage or Remote button pressed 3 5 Version 2 EE IIT, Kharagpur 26

x