The Add Entry Action command opens the Add Entry Action dialog box that allows you to define a new entry action. Depending on the settings made for Default insertion method in the Tools > Options > SFC Editor dialog box, a dialog box is displayed prompting you to select the duplication mode for the new step.
To add a new entry action, proceed as follows:
Step |
Action |
Result |
---|---|---|
1 |
Execute the command SFC > Add Entry Action. |
By default, a dialog box is displayed prompting you to select the duplication mode for the new step. |
2 |
Select a duplication mode, and click OK. |
The Add Entry Action dialog box opens. For further information, refer to Selecting the Duplication Mode for Step Actions. |
3 |
Enter the Name for the new step, for example Step0_entry, select Structured Text (ST) from the Implementation language list, and click Add. |
oA new node Step0_entry is automatically inserted in the Applications tree below the SFC POU node. oAn ST editor opens allowing you to program statements that are executed once before the Step0 becomes active. |
4 |
Close the Step0_entry editor. |
oThe Step0 block in the SFC editor is now marked with an E in the lower left corner. Double-clicking this marker opens the ST editor. oStep0_entry is available in the Properties view of the step as Specific > Actions > Entry action. |
If you copy and paste the Step0 block, the same entry actions are available in the copied step, and the new step calls the same action.
Selecting the Duplication Mode for Step Actions
By default, a dialog box prompting you to select the duplication mode is displayed whenever you insert a new step.
The dialog box provides the following options for duplicating step actions:
oCopy reference: A new step calls the same actions.: When you copy the step, the reference to the action objects that are called by the step are also copied. The source step and the new step call the same action.
oCopy implementation: New action objects are created for a new step.: New action objects are created for the new step and are embedded into this step. By default, nodes are created for the new action objects that appear below the SFC node in the Applications tree. These objects contain a copy of the original implementation code of the respective action. You can display or hide these embedded objects in the tree structure by executing the Show embedded objects / Hide embedded objects commands from the contextual menu of the SFC object.
In order to avoid that this dialog box is displayed for every new step you insert, you can configure a Default insertion method in the Tools > Options > SFC Editor dialog box. The duplication mode selected in this dialog box is automatically applied whenever you create new steps.