| Stateflow User's Guide | ![]() |
Using a Floating Scope to Monitor Data Values and State Activity
In the steps of this topic, you configure a Floating Scope block to monitor a data value and the activity of a state in the following example model:
The model consists of a Floating Scope block and a Stateflow block. The Stateflow diagram for the Stateflow block starts by adding an increment of .02 for 10 samples to the data x1. For the next 10 samples, an increment of .2 is added, and the cycle repeats.
x1 and the activity of state A are selected in the Contents pane.
x1 and for the activity of state A, as shown.
Notice that when state A is active, its activity signal value is 1, and when it is inactive, its signal value is 0. Because this value is very low or very high compared to some data, you might want to put it in a second Floating Scope block to compare it with other data.
| Logging Data Values and State Activity | Understanding Model Coverage for Stateflow Charts | ![]() |
© 1994-2005 The MathWorks, Inc.