Speed Up SIL/PIL Execution by Disabling Constant Input Checking and Global Data Synchronization - MATLAB & Simulink (original) (raw)

Main Content

By default, a SIL or PIL execution performs constant input checking and global data synchronization. Constant input checking compares the value that a test file provides for a constant input argument with the value specified at code generation time. If the values do not match, an error occurs. Global data synchronization makes the values of global variables in the SIL or PIL execution environment consistent with the values in the MATLABĀ® workspace. If a global variable is constant and its value in the SIL or PIL execution environment differs from its value in the MATLAB workspace, an error occurs.

It is possible to speed up a SIL or PIL execution by disabling constant input checking or global data synchronization. However, if you disable these features, the SIL or PIL execution results might differ from the results in MATLAB.

Disable Constant Input Checking or Global Data Synchronization at the Command Line

In a coder.EmbeddedCodeConfig object that you configured for SIL or PIL execution:

Disable Constant Input Checking or Global Data Synchronization in the MATLAB Coder App

In the settings for a project that you set up for SIL or PIL execution, on theDebugging tab: