User`s guide

3 Signals and Parameters
Monitoring Stateflow States with the MATLAB Interface
This topic assumes that you have already set Stateflow states as test po ints
(see “Monitoring Stateflow States” on page 3-10 if you have not).
1 To get a list of signals in the MATLAB Command Window, type
tg=xpc
2 To display the signals in the target application, type either
set(tg, 'ShowSignals', 'On'); tg
or
tg.ShowSignals='On'
The latter causes the MATLAB window to display a list of the target object
properties for the available signals.
For Stateflow states that you have set as test points, the state appears
in the
BLOCK NAME column like an y signal. For example, if you set a test
point for the
first state of g ear_ state in the shift_logic chart of the
old_sf_car model, the state of interest is first. This state appears as
follows in the list of signals in the MATLAB interface:
shift_logic:gear_state.first
shift_logic
isthepathtotheStateflowchartandgear_state.first is
thepathtothespecificstate.
Animating Stateflow Charts
The xPC Target so ftware supports the anima tion of Stateflow charts i n your
model to provide visual verification that your chart behaves as expected.
This topic assumes that you are familiar with the use of Stateflow animation.
For more information on Stateflow animation, see “Animating Stateflow
Charts” in the Stateflow documentation.
The following describes steps that are particular to animating Stateflow
charts for xPC Target systems.
3-14