Main Content

slrealtime.fmu.compileFMUSources

Compile FMU file that contains source code

Description

example

slrealtime.fmu.compileFMUSources(fmuFile,Name-Value Arguments) compiles an FMU file that contains source code. The process outputs an FMU file and Simulink Real-Time binary file in the same folder as the input FMU file and appends an _slrt suffix to the output file name.

Examples

collapse all

This example selects an FMU file to compile and overwrites previous compiler output.

% create variable to provide path and file name
my_file = ['C:\work\my_fmu_work\','vanDerPol.fmu']
% compile the FMU file and overwrite previous output
slrealtime.fmu.compileFMUSources(my_file,'overwriteBinary',true)

Input Arguments

collapse all

Selects FMU file to compile. Accepts a file name as input or accepts a variable that provides [path,filename] to identify FMU file. If fmuFile input is omitted, opens a file selection UI.

Example: 'my_FMU.fmu'

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Example: 'overwriteBinary',false,'removeSources',false,'overwriteFMUFile',false

Selects whether to overwrite an existing binary file in output binaries folder.

Example: 'overwriteBinary',false

Selects whether to remove FMU source files in output binaries folder.

Example: 'removeSources',false

Selects whether to overwrite FMU file in output binaries folder.

Example: 'overwriteFMUFile',false

Version History

Introduced in R2022a