Transformation of Functions

Get initialized Simulink® models implementing Capella Functions

Workflow

The generic workflow is detailed in the Getting started. Here in below are the specific options to choose in this workflow:

  1. Select in the Capella Project Explorer the Functions to export.
  2. Open the "Capella Export to Simulink®" tool.
  3. Select the transformation type "Functions, their ports and the states they are available in".
  4. Set the transformation options "Leaf Functions export strategy".
  5. Set the transformation options "Port naming strategy".
  6. Import the Function in the project using the generated .mlcore file.

How are the Capella Function elements transformed?

Example

Let's consider the following "Prepare motion consigns" parent function described in the diagram below:

The resulting Simulink® model for this parent Function is the following:

Function ports

The Function model is composed of "Inport" and "Outport" blocks respectively called "In Flow Port" and "Out Flow Port".

User Option at export time

General naming rules to apply

Naming the function port with the connected Functional Exchange makes the function port names contextualised with the current project. In case you consider reusable functions across projects or if you have REC-RPL use for some functions, it is likely the Functional Exchange names connected to the ports of the reusable functions to be different from a Function instance to another. In this situation there is a naming discrepancy and this port naming rule shoud not be opt-in. You should rename the reusable Function to be fully self-defined. Then you should select the option to name the Simulink® Function port based on the Capella Function port name.

Assumptions & Limitations

See Known Limitations for details.