Main Content


Generate standalone co-simulation FMU compatible with FMI 3.0 standards from S-Function Builder block

Since R2023b


    Simulink.SFunctionBuilder.generateFMU(blk) generates a standalone co-simulation FMU that is compatible with FMI 3.0 standards for the specified S-Function Builder block blk. The following limitations apply for this function:

    • Bus inputs and outputs are not supported

    • Continuous states are not supported

    • Access to SimStruct is not supported


    This function requires the FMU Builder for Simulink® support package.

    Input Arguments

    collapse all

    S-Function Builder block, specified as a block handle or as a string or a character vector that defines the block path.


    • To get the block handle for a block in your model, use the getSimulinkBlockHandle function.

    • To get the block handle for the most recently selected or added block, use the gcbh function.

    Version History

    Introduced in R2023b