Main Content

Unused data, events, messages, and functions

Diagnostic action to take when unused data, events, messages, and functions in a chart are detected

Model Configuration Pane: Diagnostics

Description

The Unused data, events, messages, and functions parameter specifies the diagnostic action to take when Stateflow® detects unused data, events, messages, or functions in a chart. Removing unused data, events, messages, and functions can minimize the size of your model.

This diagnostic does not detect input events or MATLAB® function input and output data. Additionally, this diagnostic does not detect unused data for Stateflow charts that include Simulink® functions, Simulink based states, or atomic subcharts.

Settings

warning (default) | none | error
none

No warning or error appears.

warning

A warning appears with a link to delete the unused data, event, or message in your chart..

error

An error appears and stops the simulation.

Recommended Settings

ApplicationSetting
Debuggingwarning
TraceabilityNo impact
EfficiencyNo impact (for simulation)
none (for production code generation)
Safety precautionwarning

Programmatic Use

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

Version History

Introduced in R2010a