Coding Action Blocks for Steps
Action blocks are operations executed when a step is active. Steps can contain multiple action blocks of the same or different type. Add action blocks to the level 1 of a step. Depending on the action block type, program the level 2 for the block. The level 2 of an Sequential Function Chart (SFC) step is the detailed description of the actions executed during the step activity. Program level 2 code for an action block in a level 2 window, displayed to the right of the program organization unit (POU). Available action block types are:
- Boo where the action block name is automatically associated to a Boolean variable selected from the variable selector. Possible qualifiers are Action (N), Reset (R), and Set (S).
- LD to program an Ladder Diagram (LD) diagram in the level 2 window. Possible qualifiers are Action (N), Pulse on Deactivation Action (P0), and Pulse On Activation Action (P1).
- SFC where the action block name is automatically associated to the SFC child. Possible qualifiers are Action (N), Reset (R), and Set (S).
- ST to define Structured Text (ST) code in the level 2 window. Possible qualifiers are Action (N), Pulse on Deactivation Action (P0), and Pulse On Activation Action (P1).
Individual SFC steps execute in this order:
- Step activation - beginning when the previous transition is cleared. During this period, defined action blocks execute in the order of appearance.
- Step cycle - beginning when the step becomes active and ending when the step completes deactivation. During this period, defined action blocks execute in the order of appearance.
- Step deactivation - ending when the following transition becomes active. During this period, defined action blocks other than Boolean (Boo) action blocks with the N qualifier execute in the order of appearance. Boolean (Boo) action blocks execute after all other action blocks.
To add action blocks to steps
- Select the step for which to define operations.
- Right-click the step, point toAdd, then click one of these:
- Boo Action
- LD Action
- SFC Action
- ST Action
- Specify the required properties for the action block from thePropertieswindow by clicking the action block definition on the step.
- To rename the ST or LD action block, type the required text in theNamefield.TIP: The names for Boo and SFC action blocks are automatically associated to their respective assignation (Boolean variable or SFC child).
- To specify the qualifier for the action block, select the required type in theQualifierfield.
- To include a comment, type the required text in theCommentfield.
- For a Boo action block, double-click the action block name, then from theVariable Selector, select the variable for use in the block.
- For an ST or LD action block, access the level 2 for the block by double-clicking the action block name on the step, then program the required level 2 operations in the level 2 window displayed to the right of the POU.
- (optional) To rearrange the order of action blocks for a step, right-click the action block, and then clickMove UporMove Down.
- (optional) To delete an action block on a step, right-click the action block, and then clickDelete.
Provide Feedback