| Real-Time Workshop® Embedded Coder™ | ![]() |
Automatically update active configuration parameters of parent model using custom M-file
Configuration Wizards
When you add a Custom M-file block to your Simulink® model and double-click it, a custom M-file script executes and automatically configures model parameters that are relevant to code generation. You can also set a block option to invoke the build process after configuring the model.
After double-clicking the block, you can verify that the model parameter values have changed by opening the Configuration Parameters dialog box and examining the settings.
The MathWorks™ provides an example M-file script, matlabroot/toolbox/rtw/rtw/rtwsampleconfig.m, that you can use with the Custom M-file block and adapt to your model requirements. The block and the script provide a starting point for customization. For more information, see Creating a Custom Configuration Wizard Block in the Real-Time Workshop® Embedded Coder™ documentation.
Note You can include more than one Configuration Wizard block in your model. This provides a quick way to switch between configurations. |
Value selected from
ERT (optimized for fixed-point)
ERT (optimized for floating-point)
GRT (optimized for fixed/floating-point)
GRT (debug for fixed/floating-point)
Custom
For this block, Custom is selected by default.
Name of the predefined or custom M-file script to be used to update the active configuration parameters of the parent Simulink model. The default value is rtwsampleconfig, which refers to the example M-file script rtwsampleconfig.m.
If selected, the script initiates the code generation and build process after updating the model's configuration parameters. If not selected (the default), the build process is not initiated.
ERT (optimized for fixed-point), ERT (optimized for floating-point), GRT (debug for fixed/floating-point), GRT (optimized for fixed/floating-point)
Optimizing Your Model with Configuration Wizard Blocks and Scripts in the Real-Time Workshop Embedded Coder documentation
![]() | Blocks — Alphabetical List | Data Object Wizard | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |