Editing Actions
The action block shown in the SFC network consists of the action name and the action qualifier. The action can be a single Boolean variable or a coded action written in the programming languages ST, FBD or LD. The different action types are represented as follows:
 | Action is a single Boolean variable (local or global variable). |
 | Action is a coded action. |
Further Info
Refer to the . For information how to add a coded action to an SFC function block POU, refer to the topic "POUs". |
What do you want to do?
Assign a single Boolean variable
A variable can be assigned to an action using the following methods.
- Method 1: select a local or global variable that is already declared.
- Method 2: assign a single Boolean variable by drag & drop from a variables table.
- Method 3: declare a new variable for the action.
Method 1: selecting a variable that is already declared
- Double-click the action in the code worksheet.
- In the appearing selection box, browse for the variable to be inserted (type the first character(s) of the variable to facilitate your search), select the variable and press <Enter>.
Method 2: assigning a single Boolean variable by drag & drop
Drag the Boolean variable from the variables table into the code worksheet and drop it on the action.
Method 3: declaring a new variable for the action
- Double-click the action in the code worksheet, enter the name of the new variable in the appearing selection box and press <Enter>.
- Right-click on the action and select 'Create New Variable > Variable type' from the context menu. The appropriate declaration is inserted with the suitable declaration keyword into the variables table.
- If required, set the variable properties (data type, initial value, various flags, etc.) in the variables table.
Assign and edit a coded action
A coded action can be assigned to an action by:
- Method 1: assign an existing coded action
- Method 2: assign a new coded action to an action that is not yet assigned a variable
Method 1: assigning an existing coded action
- Double-click the action in the SFC chart.
- In the appearing selection box, delete the default action name and then browse for the coded action (type the first character(s) of the coded action to facilitate your search), select it and press <Enter>.
Method 2: assigning a new coded action
Right-click the action that is not yet assigned a variable and select 'Go To Implementation' from the context menu. The new coded action is opened in the editors area where you have to select the programming language for the first code worksheet. In addition, the action node is added to the 'Actions' subfolder of the SFC function block POU folder in the COMPONENTS area.
Editing a coded action
To edit a coded action, i.e., to open the code worksheet(s) and the corresponding variables table in the editors area, double-click the coded action. Alternatively, right-click the action and select 'Go To Implementation' from the context menu or double-click the action node in the SFC function block POU folder in the COMPONENTS area.
Edit the action qualifier
- Right-click the action and select 'Edit Action Qualifier' from the context menu or double-click the action qualifier.
- In the appearing selection box, browse for the action qualifier, select it and press <Enter>.
If the action qualifier require the definition of a time value (the set time is shown in the action block), for example qualifier SL, double-click the time value and set the time in the appearing input field.