Main Content

Remove disable function

Removal of unreachable instances of disable functions from generated code

Model Configuration Pane: Code Generation / Interface

Description

The Remove disable function removes unreachable (dead-code) instances of the disable functions from the generated code for systems that include model referencing hierarchies. The disable functions are generated for models containing blocks with states. If you enable this parameter, the code generator checks whether live code will be removed and issues errors if it finds such code.

For instance, the code generator issues an error to turn off the Remove disable function parameter if:

  • You enable this parameter for a model containing blocks with states.

  • The model is part of a conditionally executed subsystem.

The error is issued because the generated code needs to call the disable functions.

Settings

Off (default) | On
On

Remove unreachable instances of disable functions from the generated code for systems that include model referencing hierarchies.

Off

Generate code without removing unreachable instances of the disable function.

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityOff
EfficiencyOn
Safety precaution

No recommendation

Programmatic Use

Parameter: RemoveDisableFunc
Type: character vector
Value: valid MATLAB® variable name
Value: 'on' | 'off'
Default: 'off'

Version History

Introduced in R2016b