| Contents | Index |
rtwbuild (model)
rtwbuild (model,'ForceTopModelBuild',true)
rtwbuild (model,'OkayToPushNags',true)
blockHandle=rtwbuild('subsystem')
blockHandle=rtwbuild('subsystem','Mode','ExportFunctionCalls')
blockHandle=rtwbuild('subsystem','Mode','ExportFunctionCalls','ExportFunctionInitializeFunctionName','fcnname')
rtwbuild (model) initiates the build process for the specified model using the current model configuration settings. The argument is a handle to the model or a string specifying the model name. rtwbuild creates an executable if you clear the Generate code only check box in the Code Generation pane of the Configuration Parameters dialog box.
rtwbuild (model,'ForceTopModelBuild',true) initiates the build process. Specify the parameter ForceTopModelBuild with the value true if you want to force regeneration of the top model code. If the parameter is omitted or set to false, the build process determines whether regeneration of the top model code is necessary based on the structural checksum of the model.
rtwbuild (model,'OkayToPushNags',true) initiates the build process. Specify the parameter OkayToPushNags with the value true if you want rtwbuild to display any build errors that occur in the Simulation Diagnostics Viewer, as well as in the MATLAB command window. If the parameter is omitted or set to false, build errors are displayed only in the MATLAB command window.
blockHandle=rtwbuild('subsystem') initiates the build process for the specified subsystem using the current model configuration settings. The argument is a string specifying the subsystem name or the full block path for that subsystem (for example, 'rtwdemo_export_functions/rtwdemo_subsystem'). If you are licensed for Embedded Coder software and set Create block to SIL in the Code Generation > SIL and PIL Verification pane of the Configuration Parameters dialog box, rtwbuild returns a nonempty block handle, blockHandle, to an automatically generated S-function wrapper for the subsystem code.
blockHandle=rtwbuild('subsystem','Mode','ExportFunctionCalls') initiates the build process to export function calls from the specified subsystem. You must be licensed for Embedded Coder software to export function-call subsystems.
blockHandle=rtwbuild('subsystem','Mode','ExportFunctionCalls','ExportFunctionInitializeFunctionName','fcnname') initiates the build process to export function calls from the specified subsystem and specifies fcnname as the name of the initialize function of your exported functions. You must be licensed for Embedded Coder software to export function-call subsystems.
If the model or subsystem is not loaded into the MATLAB environment, rtwbuild loads it before initiating the build process.
Build the rtwdemo_rtwintro demo model:
rtwbuild('rtwdemo_rtwintro')Build the rtwdemo_subsystem function-call subsystem inside the rtwdemo_export_functions demo model:
rtwdemo_export_functions
rtwbuild('rtwdemo_export_functions/rtwdemo_subsystem','Mode','ExportFunctionCalls')You can initiate code generation and the build process by using the following options:
Clear the Generate code only option on the Code Generation pane of the Configuration Parameters dialog box and click Build.
Press Ctrl+B.
Select Tools > Code Generation > Build Model.
Invoke the slbuild command from the MATLAB command line.

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