Contenido principal

Configure Subsystem Function Packaging and Interface

  1. In the Simulink® Editor, select the subsystem that you want to configure.

  2. In the Property Inspector, expand Code Generation.

  3. Set Function packaging to Nonresuable function or Reusable function.

  4. Configure the function name. Set Function name options to Use subsystem name or User specified. If you select User specified, specify a value for the Function name property.

  5. Configure the file name for the function code. Set File name options to Use subsystem name, Use function name, or User specified. If you select User specified, specify a value for the File name (no extension) property.

  6. If you set Function packaging to Nonresuable function, configure the function interface. Set Function interface to void-void, Allow arguments (Optimized), or Allow arguments (Match graphical interface).

  7. If you want the code generator to declare subsystem data independently from parent model data, select property Function with separate data.

  8. Save the model.

For more information, see Generate Subsystem Code as Separate Function and Files.