Apply Functional Mockup Units by Using Simulink Real-Time
After you create a model that contains an FMU block, you can build and download the model to a target computer by using Simulink® Real-Time™. These limitations apply:
Simulink Real-Time generates a mask dialog box that contains both numeric-valued and string-valued parameters. Simulink Real-Time generates code for only numeric- valued parameters.
To convert a Simulink model that contains FMU blocks to a Simulink Real-Time model, set the model configuration parameters to values compatible with real-time execution:
In the Code Generation pane, set System target file to
In the Solver pane:
Set Type to
Set Fixed-step size to a step size compatible with the real-time requirements of your model.
Generate a shared object SO file by using the QNX® Neutrino® tools for the FMU. For more information, see Create the FMU File.
You can then build and download the model to a target computer and run the real-time application. This process loads the required FMU binary files on the target computer. For more information about creating the FMU files, see Compile Source Code for Functional Mockup Units.
Note: Simulink Real-Time supports FMU blocks that comply with FMU v1.0. Blocks complying with FMU v2.0 are not supported.
To open an example model that contains FMU blocks running in Simulink Real-Time, in the MATLAB® Command Window, type:
open_system(fullfile(matlabroot, 'toolbox', 'slrealtime', ... 'examples', 'slrt_ex_vanderpol'))