| Stateflow | ![]() |
Debugging Data Range Violations
Each Data property dialog box has fields for an Initial, Minimum, and Maximum value. If the data object equals a value outside of this range, enabling data range checking will detect the error.
Detecting Data Range Violations
To detect data range violations during a simulation:
Example: Data Range Violation
This Stateflow diagram has a data range violation.

The data a is defined to have an Initial and Minimal value of 0 and a Maximum value of 2. Each time an event awakens this Stateflow diagram and state A is active, a is incremented. The value of a quickly becomes a data range violation.
| Debugging Conflicting Transitions | Debugging Cyclic Behavior | ![]() |