Products & Services Solutions Academia Support User Community Company

Learn more about Simulink   

Controlling Runtime Checks

Types of Runtime Checks

In simulation, the code generated for your Embedded MATLAB Function block includes the following runtime checks:

When to Disable Runtime Checks

Generally, generating code with runtime checks enabled results in more lines of generated code and slower simulation than generating code with the checks disabled. Disabling runtime checks usually results in streamlined generated code and faster simulation, with these caveats:

Consider disabling...Only if...
Memory integrity checksYou are sure that your code is safe and that all array bounds and dimension checking is unnecessary.
Responsiveness checksYou are sure that you will not need to stop execution of your application using Ctrl+C.

How to Disable Runtime Checks

Embedded MATLAB Function blocks enable runtime checks by default, but you can disable them explicitly for all Embedded MATLAB Function blocks in your Simulink model. Follow these steps:

  1. Open your Embedded MATLAB Function block.

  2. In the Embedded MATLAB Editor, select Tools > Open Simulation Target.

    The Configuration Parameters dialog box opens with Simulation Target selected.

  3. Under the Embedded MATLAB and Stateflow panel, clear the Ensure memory integrity or Ensure responsiveness check boxes, as applicable, and click Apply.

  


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