Main Content

金宝appCompilerWorkflow Overview

金宝app®Compiler™lets you share simulations as standalone applications.Simulink Compilerextends the capabilities ofMATLAB®Compiler允许仿真软件金宝appsimcommand and associated Simulink functions in the deployed script or application. For more information aboutMATLAB Compiler, seeMATLAB Compilerdocumentation.

The application users who use these deployed applications are not expected to interact with the Simulink model directly. The Simulink user provides the application user with a tool that allows them to explore task-specific scenarios without looking at the underlying model that represents the dynamic system. The application users can change model parameters and simulation inputs, and record and analyze simulation outputs.

To develop an application, the Simulink user:

  1. Prepares the Simulink model to be compatible withSimulink Compiler,如检查模型模拟correctly in rapid accelerator mode. For limitations of rapid accelerator mode andSimulink Compiler, seeRapid Accelerator Limitations.

    Note

    For information on toolboxes supported bySimulink Compiler, seeToolboxes Supported by Simulink Compiler.

  2. Creates an application that simulate the model using thesimcommand, in a script or an App designer app.

  3. 配置脚本或the app for deployment by usingsimulink.compiler.configureForDeploymentfunction. Thesimulink.compiler.configureForDeploymentfunction adapts the model to run in Rapid Accelerator mode.

  4. Creates a standalone application using themcccommand or thedeploytool应用程序。

  5. Shares the standalone application.

To use the application, the application user:

  1. InstallsMATLAB Runtimeenvironment for the deployed application.

  2. Uses the deployed application.

The following Simulink functions and classes are deployable:

Functions:

Classes:

Simulation Pacing in Rapid Accelerator Mode

Using simulation pacing in rapid accelerator mode allows you to use simulation pacing with the deployed standalone executables. You can slow down the simulation of your deployed executable to better visualize simulations and understand system behavior.

To use simulation pacing in rapid accelerator mode, or in the deployed executable, you can use the parameterEnablePacing. To use pacing for a model with the namemodelName, use this:

% Enable pacing set_param('modelName','EnablePacing','on') %Set pacing rate set_param('modelName','PacingRate',0.5)

Simulation pacing is turned off by default. TheEnablePacingand thePacingRateparameters are saved with the model. Use of neither parameters dirties the model.PacingRatemust be a non-zero positive integer.

If the model contains aSimulation Pacerblock (Aerospace Blockset™), Simulink gives a warning during simulation in the Diagnostic Viewer or the MATLAB prompt. Simulation pacing takes place according to theEnablePacingandPacingRateparameters configuration. The simulation pace set onSimulation Pacerblock is ignored.

Limitations

Simulation pacing is supported in command-line simulations and deployed mode only. In rapid accelerator mode, simulation pacing is not supported in the menu options in the Simulink Editor.

See Also

|||||

Related Topics