On this page
Introduction
Information stored in SysML models can be reused in simulations performed by Simulink and existing Simulink models can be brought back into MBSE environment. Most often system engineers model the system down to a point of where executable models start in Simulink. The purpose is to keep these models consistent as the system design evolves.
Export to Simulink Tool allows to generate the Simulink model from SysML model. The SLX or MDL file format is created that contains the block diagram and block properties of the simulation. The following figure illustrates the SysML Internal Block Diagram exported to Simulink Block diagram.
The SysML Internal Block Diagram exported to Simulink Block diagram.
Exporting model to the Simulink file
You can export to the Simulink file:
- Block - exports the model (Read the procedure below).
- Instance Specification - exports particular configuration with initial values and subtype instances as specified in the instance model.
To export model to the Simulink file
- In the Model Browser, select the Block you want to export and do one of the following:
- In the top-left corner of the modeling tool, click File > Export To > Simulink.
- Right-click the selected Block and then click Tools > Export to Simulink.
- Specify export options in the Simulink Export Options dialog. Option descriptions >>
- Click OK.
The Simulink (.slx) file is generated and saved to your file directory.
The Simulink export generates several files depending on the model. Make sure these files are present in the MATLAB work folder for model to open correctly.
Simulink Export Options
Each time you export your model to the Simulink file, the Simulink Export Options dialog opens with already selected options. The detailed descriptions are provided in the following table.
Option | Description |
---|---|
Format | Select the file format to export:
|
S-Function or Simscape | Select how to export SysML parametrics:
|
Simscape port libraries | Select whether to create or reuse existing port types. |
Composite Signals | Select how to export Proxy Port/Interface Block with multiple Flow Properties (composite signals):
|
Apply <<SimulinkBlock>> on export | Select to automatically apply the <<SimulinkBlock>> stereotype upon the export of the selected Block. Once stereotype is applied, further Part usages of this Block get referenced to the exported Simulink model. Do not select the checkbox if you want to export this target again. For more information refer to Reusing and referencing Simulink models. |
Click to specify the location of generated Simulink file or rename the file. |