You must have already set Stateflow® states as test points
open_system(docpath(fullfile(docroot, 'toolbox', 'xpc', 'examples', 'ex_slrt_sf_car')))).
If you have not, see Configure Stateflow States as Test Points.
To get a list of signals in the Command Window, type:
tg = slrt
To display the signals in the real-time application, type:
tg.ShowSignals = 'on'
The latter causes the Command 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. For
example, assume that you set a test point for the
gear_state in the
ex_slrt_sf_car model. The state of interest,
appears as follows in the list of signals in the MATLAB® interface:
shift_logic is the path to the Stateflow chart.
the path to the specific state.