Load the ExternalInterfaces library.
The library appears in the Package Browser.
From the Package Browser expand .
Do one of the following:
- In the tree under Export, click toSimulink and then in the menu bar select
- In the tree under Export, right-click toSimulink and then select
The ExternalInterfaces.Export.toSimulink dialog box is displayed.
In the Model name area of the dialog box:
- Click Edit .
The Select Model dialog box appears.
- Select the model you want to export.
- Click OK.
The model name is added to the dialog box.
In the Model version area of the dialog box, enter "x.x" where x.x is the the version of the model.
In the Export directory area of the dialog box, enter "E:/Export".
In this example, the data for Modelica.Mechanics.Rotational.Examples.CoupledClutches model version 3.2 will be exported to the E:/Export folder.
Click the arrow at the end of an input field to access the following commands:
Do one of the following:
- Click OK: The export function is started and when it has finished the dialog box closes.
- Click Info: A dialog box is displayed which gives a summary of the export parameters.
- Click Execute: The export function is started and when it has finished the dialog box remains open.
- Click Copy Call: The export function and its parameters are copied to the clipboard. You can then paste them into the scripting command window or into a script (.mos) file.
- Click Close: The export function is dismissed and the dialog box closes.
If you click OK or Execute:
- The Modelica Scripting Window dialog box is displayed and shows the status of the function.
- The results are computed and exported.
The exported files are saved in the Export directory you specified. Typical results files are listed below:
- buildlog.txt
- dsin.txt
- dsmodel.c
- dymModelInfo.m
- dymosim.exe
- dymosim.exp
- dymosim.lib
- dymosimg.exe
Note:
The simulation run-time code added to dsmodel.c when exporting to Real-time Workshop does not contain the most advanced routines from the binary link libraries. It is therefore, for instance, not possible to export models with dynamic state selection for use on HILS platforms.