Actions are included in the resources of components of type SourceProgram (program), SourceFunctionBlock (function block), or SourceFunction (function). For the creation of a discipline component whose resource contains actions, the actions are automatically created as standalone child components. These child components have no resources, but are a reference to the action that is contained in the resource of the parent discipline component.
In the mechatronic structure of a project, the actions can be located under any mechatronic component.
When the code is created, actions are added into the code of a discipline component only when these are present in the discipline structure under a discipline component. If a discipline component in the library contains an action, but not in the discipline structure of the project, the action is removed from the code of the created project component.
On the other hand, the action that is located in the discipline structure under the discipline component is added to the code of each created discipline component.
During the import of a resource for a discipline component, all necessary parameters are automatically created and allocated to the discipline component. This applies, in general, also for the parameters of an action, but with the difference that the necessary parameters of an action are not the action itself, but instead are allocated to the discipline component containing them. Additional parameters can also be allocated to an action by hand.
Because separate parameters are not created when reading in the resources for action components, when the code is created, only the parameters that are included in the component containing the action in the discipline structure are used for evaluating an action.
It must be ensured that this component has the parameters required for creating the code.