Implement logic signals as Boolean data (vs. double)
Logic signal data type
Model Configuration Pane: Math and Data Types
Description
The Implement logic signals as Boolean data (vs. double) parameter specifies whether the data type for logical signals is Boolean or double. Using Boolean values instead of double values reduces memory requirements for generated code. A Boolean value typically requires one byte of storage, while a double value requires eight bytes of storage.
This parameter affects these blocks:
Logical Operator blocks that have the Output data type parameter set to
Inherit: Logical (see Configuration Parameters: Optimization)
Relational Operator blocks that have the Output data type parameter set to
Inherit: Logical (see Configuration Parameters: Optimization)
Combinatorial Logic blocks
Hit Crossing blocks
Dependencies
To enable this parameter, you must create your model with a version of Simulink® that supports both double and Boolean signals.
Settings
on
(default) | off
- On
Blocks that generate logic signals produce Boolean output values.
- Off
Blocks that generate logic signals produce double output values.
This setting ensures compatibility with models created using a version of Simulink that does not support Boolean signals.
Recommended Settings
Application | Setting |
---|---|
Debugging | No impact |
Traceability | No impact |
Efficiency | on |
Safety precaution | on |
Programmatic Use
Parameter:
BooleanDataType |
Type: string | character vector |
Values:
'on' | 'off' |
Default:
'on' |
Version History
Introduced in R2008a