| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Real-Time Workshop Embedded Coder |
| Contents | Index |
| Learn more about Real-Time Workshop Embedded Coder |
| On this page… |
|---|
Launching the Model Interface Dialog Boxes Default Model Initialize and Step Functions View |
Clicking the Configure Model Functions button on the Interface pane of the Configuration Parameters dialog box launches the Model Interface dialog box. This dialog box is the starting point for configuring the model function prototypes that are generated during code generation for ERT-based Simulink models. Based on the Function specification value you select for your model function (supported values include Default model initialize and step functions and Model specific C prototypes), you can preview and modify the function prototype. Once you validate and apply your changes, you can generate code based on your function prototype modifications.
To configure function prototypes for a right-click build of a nonvirtual subsystem, invoke the RTW.configSubsystemBuild function, which launches the Model Interface for subsystem dialog box. For more information, see Configuring Function Prototypes for Nonvirtual Subsystems
The figure below shows the Model Interface dialog box in the Default model initialize and step functions view.

The Default model initialize and step functions view allows you to validate and preview the predicted default model step and initialization function prototypes. To validate the default function prototype configuration against your model, click the Validate button. If the validation succeeds, the predicted step function prototype appears in the Step function preview subpane.
Note You cannot use the Default model initialize and step functions view to modify the function prototype configuration. |
Selecting Model specific C prototypes for the Function specification parameter displays the Model specific C prototypes view of your model function prototypes. This view provides controls that you can use to customize the function names, the order of arguments, and argument attributes including name, passing mechanism, and type qualifier for each of the model's root-level I/O ports.
To begin configuring your function control prototype configuration, click the Get Default Configuration button. This activates and initializes the function names and properties in the Configure model initialize and step functions subpane, as shown below. If you click Get Default Configuration again later, only the properties of the step function arguments are reset to default values.

In the Configure model initialize and step functions subpane:
The Step function preview subpane provides a preview of how your step function prototype is interpreted in generated code. The preview is updated dynamically as you make modifications.
An argument foo whose Category is Pointer is previewed as * foo. If its Category is Value, it is previewed as foo. Notice that argument types and qualifiers are not represented in the Step function preview subpane.
You can control step and initialization function prototypes for nonvirtual subsystems in ERT-based Simulink models, if you generate subsystem code using right-click build. Function prototype control is supported for the following types of nonvirtual subsystems:
Triggered subsystems
Enabled subsytems
Enabled trigger subsystems
While subsystems
For subsystems
Stateflow subsystems if atomic
Embedded MATLAB subsystems if atomic
To launch the Model Interface for Subsystem dialog box, open the model containing the subsystem and invoke the RTW.configSubsystemBuild function.
The Model Interface dialog box for modifying the model-specific C prototypes for the rtwdemo_counter/Amplifier subsystem appears as follows:

Right-click building the subsystem generates the step and initialization functions according to the customizations you make.
![]() | Overview | Model Function Prototypes Example | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |