Configure Subsystem Function Packaging and Interface
In the Simulink® Editor, select the subsystem that you want to configure.
In the Property Inspector, expand Code Generation.
Set Function packaging to
Nonresuable function
orReusable function
.Configure the function name. Set Function name options to
Use subsystem name
orUser specified
. If you selectUser specified
, specify a value for the Function name property.Configure the file name for the function code. Set File name options to
Use subsystem name
,Use function name
, orUser specified
. If you selectUser specified
, specify a value for the File name (no extension) property.If you set Function packaging to
Nonresuable function
, configure the function interface. Set Function interface tovoid-void
,Allow arguments (Optimized)
, orAllow arguments (Match graphical interface)
.If you want the code generator to declare subsystem data independently from parent model data, select property Function with separate data.
Save the model.
For more information, see Generate Subsystem Code as Separate Function and Files.