A Brief Introduction to TwinCAT PLC Control Pay attention here also to the restrictions on the use of time-qualifiers in actions that are repeatedly re-used within the same cycle. If an action has been inactivated, it will be executed once more. That means, that each action is executed at least twice (also an action with qualifier P). In case of a call first the deactivated actions, then the active actions are executed, in alphabetical order each time. Whether a newly inserted step is an IEC step depends upon whether the menu command " Extras" "Use IEC-Steps " has been chosen. In the Object Organizer the actions hang directly underneath their respective SFC POUs.
New actions can be created with "Project" "Add Action". In order to use IEC steps you must include in your project the special SFC library lecsfc.lib . In order to associate the actions with IEC steps the following qualifiers are available: If the same action is used with qualifiers in two straight sequently steps, which influence the time flow, the time qualifier canґt become operative at the second use. To avoid this, an intermediate step has to be inserted. Thus the action status can be initialised anewd in the additional passing through cycle. Implicit variables in SFC There are implicitly declared variables in the SFC which can be used.
A flag belongs to each step which stores the state of the step. The step flag (active or inactive state of the step) is called .x for IEC steps or for the simplified steps. This Boolean variable has the value TRUE when the associated step is active and FALSE when it is inactive. It can be used in every action and transition of the SFC block. One can make an enquiry with the variable .x. as to whether an IEC action is active or not. Alternative branch Two or more branches in SFC can be defined as alternative branches. Each alternative branch must begin and end with a transition. Alternative branches can contain parallel branches and other alternative branches.
An alternative branch begins at a horizontal line (alternative beginning) and ends at a horizontal line (alternative end) or with a jump. If the step which precedes the alternative beginning line is active, then the first transition of each alternative branch is evaluated from left to right. The first transition from the left whose transition condition has the value TRUE is opened and the following steps are activated. TX1200 26 Version: 1.3 N Non-stored The action active as long as the step. R overriding Reset The action is deactivated. S Set (Stored) The action is activated and remains active until a Reset. L time Limited The action is activated for a certain time.
D time Delayed The action becomes active after a certain time as long as the step is still active. P Pulse The action is executed just one time if the step is active. SD Stored and time Delayed The action is activated after a certain time and remains active until a Reset. DS Delayed and Stored The action is activated after a certain time as long as the step is still active and remains active up to a Reset. SL Stored and time Limited The is action is activated for a certain time.