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.
This example selects an FMU file to compile and overwrites previous
compiler output.
% open the FMU example
openExample('slrealtime/SlrtCompileSourceCodeForFunctionalMockupUnitsExample');
% copy an example file to the current working folder
mkdir tempdirmyFmuDir
cd tempdir
cd myFmuDir
copyfile ../../slrt_ex_fmu_work;
% create variable to provide path and file name
my_file = ['vanDerPol.fmu']
% compile the FMU file and overwrite previous output
slrealtime.fmu.compileFMUSources(my_file,'overwriteBinary',true)
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.
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.