Detect overflow
Diagnostic action to take when fixed-point constant overflow occurs
Model Configuration Pane: Diagnostics / Type Conversion
Description
The Detect overflow parameter specifies the diagnostic action to take when a fixed-point constant overflow occurs during simulation.
Dependencies
This parameter requires a Fixed-Point Designer™ license.
Settings
none
(default) | warning
| error
none
Simulink® software takes no action.
warning
Simulink software displays a warning.
error
Simulink software terminates the simulation and displays an error message.
Tips
This diagnostic applies only to fixed-point constants (net slope and net bias).
Overflow occurs when the Simulink software converts a fixed-point constant to a data type whose range is not large enough to accommodate the ideal value of the constant. The ideal value is either too large or too small to be represented by the data type. For example, suppose that the ideal value is
200
and the converted data type isint8
. Overflow occurs in this case because the maximum value thatint8
can represent is127
.Fixed-point constant overflow differs from fixed-point constant precision loss. Precision loss occurs when the ideal fixed-point constant value is within the range of the data type and scaling being used, but cannot be represented exactly.
Recommended Settings
Application | Setting |
---|---|
Debugging | No impact |
Traceability | No impact |
Efficiency | No impact |
Safety precaution | No impact |
Programmatic Use
Parameter:FixptConstOverflowMsg |
Value: 'none' | 'warning' | 'error' |
Default: 'none' |
Version History
Introduced in R2009b