Main Content

disableimplicitsignalresolution

Convert model to use only explicit signal resolution

Syntax

retVal = disableimplicitsignalresolution('model')
retVal = disableimplicitsignalresolution('model', displayOnly)

Description

retVal = disableimplicitsignalresolution('model') inputs a model, reports all signals and states that implicitly resolve to signal objects, and converts the model to resolve only signals and states that explicitly require it. The report and any changes are limited to the model itself; they do not include blocks that are library links.

Before executing this function, ensure that all relevant Simulink® data objects are defined in the base workspace or a data dictionary to which the model is linked. The function ignores any data objects that are defined elsewhere.

The function scans model, returns a structure of handles to signals and states that resolve implicitly to signal objects, and performs the following operations on model:

  • Search the model for all output ports and block states that resolve to Simulink signal objects.

  • Modify these ports and blocks to enforce signal object resolution in the future.

  • Set the model's SignalResolutionControl parameter to 'UseLocalSettings' (GUI: Explicit Only).

    If SignalResolutionControl is already set to 'UseLocalSettings' or to 'None', the function takes no action and returns a warning.

  • If any Stateflow® output data resolves to a Simulink signal object:

    • Turn off hierarchical scoping of signal objects from within the Stateflow chart.

    • Explicitly label the output signal of the Stateflow chart.

    • Enforce signal object resolution for this signal in the future.

Any changes made by disableimplicitsignalresolution permanently change the model. Be sure to back up the model before calling the function with displayOnly defaulted to or specified as false.

retVal = disableimplicitsignalresolution('model', displayOnly) is equivalent to disableimplicitsignalresolution(model) if displayOnly is false.

If displayOnly is true, the function returns a structure of handles to signals and states that resolve implicitly to signal objects, but leaves the model unchanged.

Input Arguments

displayOnly

Boolean specifying whether to change the model.

  • false — Changes the model.

  • true — The function returns a structure of handles to signals and states that resolve implicitly to signal objects, but leaves the model unchanged.

Default: false

model

Model name or handle

Output Arguments

retVal

A MATLAB® structure containing:

SignalsHandles to ports with signal names that resolve to signal objects
StatesHandles to blocks with states that resolve to signal objects

Version History

Introduced in R2007a