ABB DCS 系统 培训课程 系列讲座 SFC Language.doc_第1页
ABB DCS 系统 培训课程 系列讲座 SFC Language.doc_第2页
ABB DCS 系统 培训课程 系列讲座 SFC Language.doc_第3页
ABB DCS 系统 培训课程 系列讲座 SFC Language.doc_第4页
ABB DCS 系统 培训课程 系列讲座 SFC Language.doc_第5页
已阅读5页,还剩11页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

Course T530Chapter 12 Sequence Function Chart (SFC) Language 12.1 General Information 12.1.1 DescriptionThis chapter describes the use of the SFC.12.1.2 ObjectivesOn completion of this chapter you will be able to: Describe the use of SFC. Describe the sequential rules. Use online functions of SFC. Use sequence constructs. Use the different Sequence Control Variables. Describe and use the different ways of activating outputs.12.1.3 Reference DocumentationUse the online help: Contents tab, Sequential Function Chart Editor12.2 Lesson 1 - SFC Language12.2.1 DescriptionThis lesson describes how to construct a basic sequence using SFC.12.2.2 ObjectivesOn completion of this lesson you will be able to: Describe the use of SFC. Describe the sequential rules. Use certain sequence constructs. Use online functions.12.2.3 GeneralThe Sequential Function Chart (SFC) programming language allows the user to describe the sequential behavior of the control program graphically. This concept enables all control actions for a process to be described in one compound sequence structure even if it involves several parallel action chains. Furthermore, sequences can be hierarchical, that is action chains can be grouped to give a clear high level presentation of the process control unit.A sequence is a unit with a complete sequence surrounded by an unconditional loop; the first step is reactivated when the sequence is finished. A sequence can be divided into separate types of structures. There are two types of structures, sequence selection and simultaneous sequence. It is possible to structure the sequence view into several hierarchical levels with the subsequence function.12.2.4 The SFC EditorThe SFC programming editor is divided into four panes, the declaration pane, code pane, structure pane, and the message pane. The declaration pane, the code pane (see also below), the message pane, the toolbar and commands in the menu bar, concerning the code are the same as in the other language program editors. SFC ToolbarThere is a special toolbar in the Sequence Function Chart editor, with shortcuts to many of the commands found in the menu bar (or in the pop-up menus). You can see a brief explanation of each button, if you hold the cursor over the button.Toolbar buttonMenu CommandDescriptionInsert Step, TransitionInserts a step and transition after the current selection.Insert Sequence SelectionInserts a sequence selection after the current selection.Insert Simultaneous SequenceInserts a simultaneous sequence after the current selection.Insert New BranchInserts a new branch.Insert JumpInserts a jump.Tools Make SubsequenceTurn the selected steps and transitions into a subsequence.Tools Dissolve SubsequenceDissolves the selected subsequence.View Step into SubsequenceSteps into the selected subsequence.View Step Out of SubsequenceSteps out of the open subsequence. Structure paneAll the graphical editing of the sequence structure are performed in the structure pane. You will be able to add, delete, move and modify steps, transitions, actions, simultaneous sequence, sequence selections, and jumps.The basic editing principles are to first select an item and then choose a menu command, for example, if a transition is selected and then the Step, Transition menu command is chosen, a step and a transition is added below the selected transition. All menu commands performs different actions depending on currently selected item.12.2.5 Sequential rulesThe sequence loop is always closed. The last transition is always connected to the first step. The execution continues from the last step to the first step when the last transition condition becomes true.12.2.6 Sequence constructs - BasicsThe basic elements in a sequence are steps and transitions. Each step can have three associated actions. Each transition has an associated boolean transition condition. A transition can be a jump that enables the execution order to be changed. The jump destination can be a step forward or backward in the sequence. An action is a code block. An action qualifier specifies how and when the action code shall be executed. Below is an example with sequence selection and simultaneous sequence. StepsA step is a basic element, which is activated by its preceding transition. The step becomes active until its succeeding transition is true, and then next step is activated.Each step has a name, that can be changed, and each step can have up to three associated actions..1 Initial step/stepEach sequence has one initial step. The initial step becomes active at a cold start of the application(s) or when the sequence is reset by the SequenceName.Reset variable. ActionAn action is a code block, written in the Structured Text (ST). An action can have an action qualifier, specifying how and when the action code is to be executed. The names of the actions are automatically generated. The actions will be named step name_action qualifier, for example, see figure below. If the step name is changed, the action names are automatically changed. There is no possibility to change the action names.Figure 12.1 An opened step with its actions.There are three different action qualifiers: The N action qualifier stands for Non-stored, and means that the action code is executed continuously, while the step is active. The P1 action qualifier stands for Pulse rising edge, and means that the action code is executed once, when the step becomes active. The P0 action qualifier stands for Pulse falling edge, and means that the action code is executed once, when the active step becomes inactive.For each step, there can be zero or one associated P1 action, zero or one associated N action and zero or one associated P1 action. TransitionsThe transition from one step to the next, is controlled by transition conditions, which are boolean expressions including process signals..1 Transition conditionIt is possible to rename a transition condition. When the next sequence step is activated, its associated statements are executed and the previous ones are disabled. A transition contains a condition. When the condition is true AND the preceding step is active the following takes place: The preceding step(s) is deactivated. The succeeding step(s) is activated.The state of the sequence changes, when a transition condition becomes true. The sequence evolution is controlled by Sequence Control Variables (for example, StepName.X and StepName.Reset).When a transition condition becomes true and the preceding step(s) is active (that is, the transition can fire), the actions are executed in the following order during that scan: The N action of the deactivated step that precedes the transition (its final scan) The P0 action of the deactivated step that precedes the transition The P1 action of the activated step that succeeds the transition The N action of the activated step that succeeds the transitionDuring scans when no transition condition becomes true, only N actions associated to active steps will execute. A step is active when StepName.X is true12.2.7 Online functionsIn online mode, the code and the variable values are displayed in the program editor. Online commands in the menu bar and toolbar buttons concerning the code are the same as in the other language program editors. There are functions only available in the online mode. Some of them are: Disable Actions Show Actions Block Transitions Block All Transitions Reset Force Forward Force Backward Show All Actions Hide All ActionsUse the online help to read about the online functions. Toolbar in on lineThe following specific online mode toolbar buttons (each with its corresponding menu command) exist:Toolbar buttonMenu CommandDescriptionTools Disable ActionsDisables the associated actions of the selected step (toggle command). No action code executes when the step is active. All actions associated to the step are blocked (shut off).Tools Block TransitionBlocks the selected transition (toggle command). The transition condition is regarded as False. When a transition is blocked, the execution cannot continue in the next step.Tools Force ForwardMoves the execution, from the step before the selected transition, to the step after the selected transition, though the transition condition is not evaluated. The execution continues in the step after the selected transition. Tools Force BackwardMoves the execution, from the step after the selected transition, to the step before the selected transition, though the transition condition is not evaluated. The execution continues in the step before the selected transition.View Step into SubsequenceSteps into the selected subsequence.View Step out of SubsequenceSteps out of the open subsequence.12.3 Exercise 12.1 Use the SFC LanguagePlease do exercise 12.112.4 Lesson 2 - SFC Constructs 12.4.1 DescriptionThis lesson describes possible sequence constructs using SFC.12.4.2 ObjectivesOn completion of this lesson you will be able to: Describe and use different sequence constructs.12.4.3 Sequence constructs (cont.) Simultaneous SequencesThe simultaneous sequence structure allows simultaneous and independent execution of two or more branches of sequence actions. The transition cannot activate its succeeding step unless the last step of both branches is active. When the transition condition that precedes the simultaneous sequence structure becomes true, all the branches are started simultaneously, that is, the execution continues in every branch. The transition, that succeeds the simultaneous sequence structure, cannot fire until all the branches have finished, that is, when the last step of each branch is active. Sequence SelectionTo choose one sequence branch among two or more, the sequence selection is used. When one of the first transition conditions become true, that branch is selected and the execution continues in that branch. The execution can only continue in one of the branches. The branch with the highest priority and a true transition condition will be chosen (graphically, the left to right branch order corresponds to the priority order, that is. The leftmost branch has the highest priority). Jumps and destinationsUnstructured links inside the sequence structures are necessary in some cases to deal with extraordinary situations and when, for example, changing the process production mode. A jump is a link from a named single transition to a named single step, located anywhere in the same sequence structure. It is allowed to have more than one jump connected to a step. A jump can be considered as a sequence selection. A jump is a transition where the execution is transferred from the preceding step to the jump destination step, when the transition condition becomes true.12.4.4 Editing New BranchThe New Branch command inserts a new branch to the right of the current selection. Make SubsequenceFor documentation and overview reasons, it is sometimes convenient to graphically structure the sequence into smaller parts, subsequences, thus hiding details until they are requested. The subsequence is usually put around a sequence part, which performs a set of logically related actions. The subsequence function is a way to structure the sequence using a graphic hierarchy. The sequence can be graphically structured into any number of hierarchical levels.12.5 Exercise 12.2 Sequence constructsPlease do exercise 12.212.6 Lesson 3 - SFC Language Control Variables12.6.1 DescriptionThis lesson describes the use of control variables in SFC.12.6.2 ObjectivesOn completion of this lesson you will be able to: Describe and use the different Sequence Control Variables. Describe and use the different ways of activating outputs.12.6.3 Sequence Control VariablesThere are facilities to control a sequence and monitor the timing of sequence steps. When these functions are used, automatically generated variables are available for use in the code. Automatically generated variablesFor one sequence, the following variables are automatically generated when the program is compiled.NameTypeMenu Access*DescriptionSequenceName.ResetBoolYesThe sequence is reset to the initial step. The system resets this variable automatically to False after one scan.SequenceName.HoldBoolYesAll transitions in the sequence are blocked. The Reset function as above is NOT affected.SequenceName.DisableActionsBoolYesAll actions associated to the steps of the sequence are disabled, that is they will not execute. StepName.XBoolNoThis variable is True while the step is active. SequenceName = The code block name of the sequence. StepName = The step name.* A Yes in the Menu Access column means that the variable can be enabled by a menu selection from the Tools menu in the online mode. Step Timing VariablesThe following variables are only generated if the Step Elapsed Time command in the Tools menu is enabled (a check mark in the check box before the command), before the program is compiledNameTypeDescriptionSequenceName.MaxStepTime*TimeThe time value of this variable, gives the maximum time for step time supervision.SequenceName.CheckBoolEnables the step time supervision in a sequence.SequenceName.StepTimedOut*BoolWhile True, one of the steps has exceeded the maximum time for step time super-vision (see SequenceName.MaxStepTime variable above).Only enabled if Sequence Name.Check is True.StepName.TTimeThis variable gives the activation time of the step. It is reset when the step is activated, and then increased until the step is inactivated. It keeps its value until the next activation.* The SequenceName.MaxStepTime and SequenceName.StepTimedOut variables are available (visible) in the insert variable dialog, even if the Step Elapsed Time command not is enabled. The have, however, no use, if not Step Elapsed Time command is enabled. SequenceName = The code block name of the sequence. StepName = The step name.12.6.4 Different methods for activating outputsThere are two different ways of activating outputs from a step. In ActionsWhen a step is active is the code action of the step also activated. For example if the statement Count := Count +1;is written in an action is the code executed while the step is active. In a separate Code Block using StepName.XBy using the StepName.x (bool) variable is it possible to activate variables in other code blocks. For example Start:= StartMotor.x; ( this statement is written in another code block than the SFC sequence).12.7 Exercise 12.3 Sequence Control Variables and Activating outputsPlease do the exercise 12.3Du kan tag bort denna osynliga text men ltnedanstende Page Break ligga kvar !Lt ven den efterfljande sidan ligga kvar !

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论