MATLAB: How to find where the signal that enters a Stateflow charts is being used inside the chart

highlightstateflow

I have a large Stateflow Chart in my model that has several inputs and I would like to verify if a specific input is being used in my chart, and if it is, where exactly?
I have been using the 'Highlight to Destination' feature to trace the input signal from outside of the chart but I am not sure where it is going inside the chart.

Best Answer

The 'Highlight Signal to Destination' feature has several limitations as of R2018a that are documented at the link below:
- <https://www.mathworks.com/help/simulink/ug/displaying-signal-sources-and-destinations.html#mw_94b25ddb-533d-4386-ba31-8c9c58473ccd>
In particular it cannot trace a signal inside a Stateflow chart. However you can visualize variables in the chart. To do so, in Simulink go to View > Symbols
A Symbols panel should appear on the right side of the model when inside a Stateflow chart. All variables, including inputs to the chart are listed there. You can use the filter to reduce the number of variables displayed and quickly find the input signal of interest.
Click on this variable to highlight where it is being used in the current view of the chart. In R2018b Prerelease, we introduce a new option to highlight all uses within the chart. With a right-click on the variable then select 'Highlight all uses' as seen in the screenshot below: