On this page
FMU can be used for:
- Creating model structure with SysML elements.
- Co-simulating the imported model with help of Cameo Simulation Toolkit (CST). To learn more, refer to Simulation of SysML models.
- SSP export.
Simulation of FMU 3.0 and merged arrays using Cameo Simulation Toolkit (CST) is not supported.
Understanding the FMU Import Options dialog
The FMU Import Options dialog enables users to customize the FMU file import into the model. For example, you can specify whether parameters from the FMU file should be imported as ports or value properties. Additionally, you can change the name of the Block (the FMU model name is used by default) and automatically attach the file to the project upon import.
The FMU Import Options dialog has the following options:
Option name | Description |
---|---|
Direction | The direction of the port: In or Out. Inputs and Outputs are selected to be imported as ports by default. |
Name | The name of the property/parameter. |
Type | The type of the property, for example, value property. |
Description | The textual description of the property. |
As Port | Click to select whether properties should be represented as Flow or Proxy ports. Select None to import the selected properties as value properties. |
Interface Block | Click to select a compatible interface Block or create a new one. <NEW> is selected by default. The Interface Block column is active only if Proxy Port is selected in the As Port column. |
Redefine | Click to redefine inherited value or part properties. |
Click to select all listed properties at once. | |
Click to deselect all listed properties at once. | |
The name of the Block created in the model upon import. By default, the name of the FMU model is used, but you can set the one you like. | |
If the checkbox is selected, the imported FMU file is automatically attached to the model. If the Attach file to the project is checked in the FMU Import Options dialog, a previous version of the attached file is replaced with a new one upon import. | |
If the checkbox is selected, the FMU properties are split according to dot notation. The FMU properties are represented as Flow or Value properties, owned by an Interface Block. For structured properties, As Port and Interface Block columns are inactive. | |
If the checkbox is selected, the arrays (properties with the same name and index) are merged. When the arrays are merged, a single property is created with a multiplicity set. The checkbox is available only when arrays are detected in an imported FMU file. Co-simulation of the merged arrays is not supported. | |
When clicked, displays information about the imported FMU. The following parameters are displayed in the expanded section.
|
Importing FMU
To import the FMU file into the model
- In the top-left corner of the modeling tool, click File > Import From > FMU File.
- Select the FMU file on your file system and click Open.
In the FMU Import Options dialog, specify which properties from the FMU file should be imported into your model as values and ports and Click OK.
Dragging and dropping FMU on diagram
Alternatively, you can import the FMU model by dragging and dropping the selected FMU file directly onto the Block Definition (BDD) and/or Internal Block (IBD) diagrams.
To import the FMU file into the model using BDD/IBD
- Locate the FMU file on your file system or the Containment tree.
- Do either:
- Drag and drop the file from your file system or the Containment tree onto the BDD diagram. A Block with the applied «FMU» stereotype is created in the model after customizing the FMU import via the FMU Import Options dialog.
- Drag and drop the file from your file system or the Containment tree onto the IBD diagram. A Part property is created in the model after customizing the FMU import via the FMU Import Options dialog.
- Drag and drop the file from your file system or the Containment tree onto the BDD diagram. A Block with the applied «FMU» stereotype is created in the model after customizing the FMU import via the FMU Import Options dialog.
Dragging and dropping FMU on existing Block
You can drag and drop the FMU file directly onto the Block as implementation as well. Once the FMU file is dropped, the FMU Import Options dialog opens. This dialog allows redefining value and part properties.
Redefining properties using FMU Import Options dialog
In this case, a new Block is created as a subtype of the existing Block together with the Generalization relationship.
Dropping FMU on an existing Block
In/Out properties in the FMU Import Options dialog are by default imported into the model as ports of a Flow type.
Updating existing FMU Block
An existing FMU Block can be updated by dragging and dropping a FMU file directly on it. This is useful in those cases when there is a need to quickly import properties that were initially left out.
To update a FMU Block
- Locate the FMU file on your file system or the Containment tree.
- Drag and drop it on the shape of your FMU Block.
- In the opened FMU Import Options dialog, select the properties to update the FMU Block with.
- Click OK.
Dragging and dropping FMU on the existing FMU Block
Alternatively, you can update the FMU Block directly from the shortcut menu.
To update a FMU Block from the shortcut menu
- Right-click the Simulink Block.
- Select Tools > Update from FMU file from the shortcut menu.
- In the opened FMU Import Options dialog, select the properties to update the FMU Block with.
- Click OK.
Already imported properties are grayed out and cannot be edited in the FMU Import Options dialog.
Structured Import
If you select the Structured Import checkbox, then the FMU properties are split according to dot notation. The FMU properties are represented as Flow or Value properties, owned by an Interface Block. For structured properties, As Port and Interface Block columns are inactive.
FMU properties split according to dot notation.
Merging arrays
If the FMU file has arrays (properties with the same name and index), then selecting the Merge Arrays checkbox in the FMU Import Options dialog merges all the arrays into a single property with the multiplicity set.
All the arrays present in the FMU file merged into a single property with the multiplicity set.
Viewing FMU details
You can view the details about the imported FMU file in the FMU Import Options dialog. Once you click the Details button, the details are displayed in the expanded section of the dialog.
Details about the imported FMU file displayed in the expanded section of the FMU Import Options dialog.
Related pages