Stateflow |
 |
Error Checking Options
The options in the Error checking options section of the Debugger insert generated code in the simulation target to provide breakpoints to catch different types of errors that might occur during simulation. Select any or all of the following error checking options:
- State inconsistency -- Check for state inconsistency errors that are most commonly caused by the omission of a default transition to a substate in superstates with XOR decomposition. See Debugging State Inconsistencies.
- Transition Conflict -- Check whether there are two equally valid transition paths from the same source at any step in the simulation. See Debugging Conflicting Transitions.
- Data Range -- Check whether the minimum and maximum values you specified for a data in its properties dialog are exceeded. Also check whether fixed-point data overflows its base word size. See Debugging Data Range Violations.
- Detect Cycles -- Check whether a step or sequence of steps indefinitely repeats itself. See Debugging Cyclic Behavior.
To include the supporting code designated for these debugging options, select the Enable debugging/animation check box in the Coder Options dialog. You access this dialog through the Target Builder properties dialog box (see Specifying Code Generation Options).
Note
You must rebuild the target for any changes to any of the settings referred to above to take effect.
|
Animation Controls
Activating animation causes visual color changes (objects are highlighted in the selection color) in the Stateflow diagram based on the simulation execution.
Activate animation by turning on the Enabled check box. Deactivate animation by turning on the Disabled check box. You can specify the animation speed from a range of 0 (fast, the default) to 1 (slow) second.
Display Controls
Use these buttons to control the output display:
- Call Stack -- Display a sequential list of the Stopped and Current Event status items that occur when you single-step through the simulation.
- Coverage -- Display the current percentage of unprocessed transitions, states, and so on, at that point in the simulation. Click the button's drop-down list icon to display a list of coverage options: coverage for the current chart only, for all loaded charts, or for all charts in the model.
- Browse Data -- Display the current values of any defined data objects.
- Fixed-point data display both their quantized integer values (stored integer) and the scaled real-world (actual) values. See Fixed-Point Data.
- Active States -- Display a list of active states in the display area. Double-clicking any state causes the graphics editor to display that state. The drop-down list button on the Active States button lets you specify the extent of the display: active states in the current chart only, in all loaded charts, or for all charts in the model.
- Breakpoints -- Display a list of the set breakpoints. The drop-down list button on the Breakpoints button lets you specify the extent of the display: breakpoints in the current chart only or in all loaded charts.
Once you select an output display button, that type of output is displayed until you choose a different display type. You can clear the display by selecting Clear Display from the Debugger's File menu.
| Stateflow Debugger User Interface | | Debugging Run-Time Errors Example |  |