Main Content

Author Blocks Using S-Function Builder

Use S-Function Builder to author blocks using C/C++ code

S-Function Builder is a Simulink® tool that implements blocks using C/C++ code. It generates an S-function automatically using the specifications you provide. The S-Function Builder also serves as a wrapper for the generated S-function in the models that use S-function.

Blocks

S-Function BuilderIntegrate C or C++ code to create S-functions

Functions

expand all

Simulink.SFunctionBuilder.addAdd input, output, parameter, library item, or state to S-Function Builder block (Since R2022a)
Simulink.SFunctionBuilder.updateUpdate attributes for input port, output port, or parameter of S-Function Builder block (Since R2022a)
Simulink.SFunctionBuilder.deleteRemove input, output, parameter, library item, or state from S-Function Builder block (Since R2022a)
Simulink.SFunctionBuilder.setBuildOptionsSet build options for S-Function Builder block (Since R2022a)
Simulink.SFunctionBuilder.setSettingsSet settings for S-Function Builder block (Since R2022a)
Simulink.SFunctionBuilder.setSFunctionNameSet name of S-function for S-Function Builder block (Since R2022a)
Simulink.SFunctionBuilder.setTargetLanguageSet language for S-function generated using S-Function Builder block (Since R2022a)
Simulink.SFunctionBuilder.setUserCodeSet code for methods of S-function generated using S-Function Builder block (Since R2022a)
Simulink.SFunctionBuilder.listList inputs, outputs, parameters, library items, and states for S-Function Builder block (Since R2022a)
Simulink.SFunctionBuilder.getBuildOptionsGet build options for S-Function Builder block (Since R2022a)
Simulink.SFunctionBuilder.getSettingsGet settings for S-Function Builder block (Since R2022a)
Simulink.SFunctionBuilder.getSFunctionNameGet name of S-function generated by S-Function Builder block (Since R2022a)
Simulink.SFunctionBuilder.getTargetLanguageGet language for S-function generated using S-Function Builder block (Since R2022a)
Simulink.SFunctionBuilder.getUserCodeGet code for method of S-function generated using S-Function Builder block (Since R2022a)
Simulink.SFunctionBuilder.buildBuild S-function and generate MEX file for S-Function Builder block (Since R2022a)
Simulink.SFunctionBuilder.generateCodeOnlyBuild S-function without generating MEX file for S-Function Builder block (Since R2022a)
Simulink.SFunctionBuilder.generateFMUGenerate FMU compatible with FMI 3.0 standards from C/C++ code using S-Function Builder block (Since R2023b)

Featured Examples