Main Content

Port and parameter mismatch

Diagnostic action to take when port or parameter does not match between Model block and referenced model

Model Configuration Pane: Diagnostics / Model Referencing

Description

The Port and parameter mismatch configuration parameter determines the diagnostic action to take when loading or updating this model when a port or parameter does not match between a Model block and its referenced model.

Port mismatches occur when the input and output ports of a Model block do not match the root-level input and output ports of the model it references.

Parameter mismatches occur when the parameter arguments recognized by the Model block do not match the parameter arguments declared by the referenced model.

Set Configuration Parameter for Referenced Model

In a model reference hierarchy, how you open the Configuration Parameters dialog box determines whether you edit the configuration parameter for the top model in the current model hierarchy or the current referenced model.

  • Top model in the current model hierarchy — In the Simulink® Toolstrip, on the Modeling tab, click Model Settings.

  • Current referenced model — In the Simulink Toolstrip, on the Modeling tab, click the Model Settings button arrow. Then, in the Referenced Model section, select Model Settings.

Alternatively, open the referenced model as a top model. Then, in the Simulink Toolstrip, on the Modeling tab, click Model Settings.

Settings

none (default) | warning | error
none

The software refreshes the Model block.

warning

The software displays a warning and refreshes the Model block.

error

The software displays an error message and does not refresh the Model block.

When you receive an error related to a Model block port or parameter mismatch, you can manually refresh the Model block. Select the Model block. Then, on the Model Block tab, select Refresh. Alternatively, use the Simulink.ModelReference.refresh function.

Tips

Model block icons can display text that indicates a port or parameter mismatch. To enable this feature, from the parent model, on the Debug tab, select Information Overlays > Ref Model I/O Mismatch.

Model block with I/O mismatch

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo impact
Safety precautionerror

Programmatic Use

Parameter: ModelReferenceIOMismatchMessage
Value: 'none' | 'warning' | 'error'
Default: 'none'

Version History

Introduced before R2006a