Products & Services Solutions Academia Support User Community Company

Learn more about Real-Time Workshop Embedded Coder   

Overview

The Real-Time Workshop Embedded Coder software provides a Configure Model Functions button, located on the Interface pane of the Configuration Parameters dialog box, that allows you to control the model function prototypes that are generated for ERT-based Simulink models.

By default, the function prototype of an ERT-based model's generated model_step function resembles the following:

void model_step(void);

The function prototype of an ERT-based model's generated model_init function resembles the following:

void model_init(void);

(For more detailed information about the default calling interface for the model_step function, see the model_step reference page.)

The Configure Model Functions button on the Interface pane provides you flexible control over the model function prototypes that are generated for your model. Clicking Configure Model Functions launches a Model Interface dialog box (see Configuring Model Function Prototypes). Based on the Function specification value you specify 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 prototypes. Once you validate and apply your changes, you can generate code based on your function prototype modifications.

For more information about using the Configure Model Functions button and the Model Interface dialog box, see Model Function Prototypes Example and the demo model rtwdemo_fcnprotoctrl, which is preconfigured to demonstrate function prototype control.

Alternatively, you can use function prototype control functions to programmatically control model function prototypes. For more information, see Configuring Model Function Prototypes Programmatically.

You can also control model function prototypes for nonvirtual subsystems, if you generate subsystem code using right-click build. To launch the Model Interface for subsystem dialog box, use the RTW.configSubsystemBuild function.

Right-click building the subsystem generates the step and initialization functions according to the customizations you make. For more information, see Configuring Function Prototypes for Nonvirtual Subsystems.

For limitations that apply, see Model Function Prototype Control Limitations.

  


Related Products & Applications

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