Stateflow    

Debugging Data Range Violations

Stateflow detects the following data range violations during simulation:

Detecting Data Range Violations

To detect data range violations during a simulation:

  1. Build the target with debugging enabled.
  2. Open the Debugger window.
  3. In the Error checking options of the Debugger, select Data Range.
  4. Start the simulation.

Data Range Violation Example

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