Level-2 MATLAB S-Function Compliance with Model Operating Point
A model operating point contains complete information about the state of a simulation at the time when the operating point is saved. When you use a model operating point to specify the initial state for a simulation, the simulation results exactly match results for an equivalent simulation that runs from the beginning rather than starting from the operating point. For more information, see Use Model Operating Point for Faster Simulation Workflow.
When you write an S-function, you must specify whether and how the software saves and
restores the S-function operating point when saving and restoring the model operating
point. Specify the S-function operating point compliance by setting the
OperatingPointCompliance
property on the instance of the Simulink.MSFcnRunTimeBlock
class that represents the block.
block.OperatingPointCompliance = setting
The table summarizes the possible values for setting.
Setting | Result |
---|---|
'Unknown' | This setting is the default when you do not explicitly specify the operating point compliance. The software behaves the
same as when you specify
|
'Default' | The software handles the operating point information for the
S-function the same as for built-in blocks. The software saves and
restores this information about the S-function as part of the
|
'UseEmpty' | The software does not save any information about the S-function
as part of the This option is common for sink blocks, or blocks with no output ports, that use PWork or DWork vectors to store handles to files or figure windows. This option is not supported for S-functions that register discrete states, continuous states, or zero-crossing signals. |
'UseCustom' | The software uses the custom For an example of how to implement these custom
methods, see |
'Disallow' | The S-function does not allow saving or restoring its operating
point. The software issues an error when you try to save or restore
a |