Beckhoff Automation GmbH & Co. KG TX1200 — 2.2.4 Sequential Function Chart (SFC)

A Brief Introduction to TwinCAT PLC Control Transition/Transition condition Between the steps there are so-called transitions. A transition condition must have the value TRUE or FALSE. Thus it can consist of either a boolean variable, a boolean address or a boolean constant. It can also contain a series of instructions having a boolean result, either in ST syntax (e.g. (i language desired (see 'Extras” “Zoom Action/Transition”). But a transition may not contain programs, function blocks or assignments! Note: Besides transitions, inching mode can also be used to skip to the next step; see SFCtip and SFCtipmode.

Active Step After calling the SFC POU, the action (surrounded by a double border) belonging to the initial step is executed first. A step, whose action is being executed, is called active. If the step is active, then the appropriate action is executed once per cycle. In Online mode active steps are shown in blue. To each step belongs a flag which saves the condition of the step. The step flag (active or inactive condition of the step) is shown by the logical value of a Boolean structure element .x. This Boolean variable has the value TRUE if the appropriate step is active and FALSE if it is inactive.

This variable is implicitly declared and can be used in any action and transition of the SFC POU.In a control cycle all actions are executed which belong to active steps. Thereafter the respective following steps of the active steps become active if the transition conditions of the following steps are TRUE. The currently active steps will be executed in the next cycle. If the active step contains an output action, this will only be executed during the next cycle, provided that the transition following is TRUE. IEC step Along with the simplified steps the standard IEC steps in SFC are available. In order to be able to use IEC steps, you must link the library TcSystem.Lib into your project.

Any number of actions can be assigned to an IEC step. IEC actions are not fixed as input, step or output actions to a certain step as in the simplified steps, but are stored separately from the steps and can be reused many times within a POU. For this they must be associated to the single steps with the command ' Extras''Associate action' . Along with actions, Boolean variables can be assigned to steps. The activation and deactivation of actions and boolean variables can be controlled using so-called qualifiers. Time delays are possible. Since an action can still be active, if the next step has been processed, for example through the qualifier S (Set), one can achieve concurrent processes.

An associated boolean variable is set or reset with each call of the SFC block. That means, that with each call the value changes from TRUE or FALSE or back again. The actions associated with an IEC step are shown at the right of the step in a two-part box. The left field contains the qualifier, possibly with time constant, and the right field contains the action name. An example for an IEC step with two actions: In order to make it easier to follow the processes, all active actions in on-line mode are shown in blue like the active steps. After each cycle a check is made to see which actions are active. TX1200 25 Version: 1.3