Clear Filters
Clear Filters

Model Advisor "Check Usage of Stateflow data" Warning

2 views (last 30 days)
Getting Model Advisor Warning in R2012b for below Simulink Code Inspector check:
"Check that the chart uses only data with no initial values
Simulink Code Inspector does not support data with initial values in Stateflow charts
Warning
The following Stateflow data has initial values:"
Kindly suggest when we get this warning and how to clear it.

Answers (1)

Ashutosh Thakur
Ashutosh Thakur on 15 Jul 2024
Hi Netravathi,
The Model Advisor check for Simulink Code Inspector, i.e., Check for the usage of Stateflow data is a combination of various subchecks in which one of the check is that the Stateflow charts should not use data with initial values. This warning can be removed if the data elements in the Stateflow charts do not have initial values. The following steps can be referred to clear the initial values:
  1. Open the Stateflow chart in the model by double-clicking on it.
  2. Identify the data elements that have initial values. This can be done by looking at the properties of each data element through the Model Explorer app.
  3. Open the Model Explorer application and look through all the data elements in the Stateflow chart.
  4. Right-click on the data elements and click on Properties and look for the Initial Value property.
  5. Clear the value of the Initial Value property if present.
  6. Click OK to save the changes.
After making these changes, try to execute the model advisor checks again to see if the warning is cleared.
To know more about the checks, you can access the documentation by entering the following command in the MATLAB Command Window:
>> doc
After entering the above-mentioned command, a help page will open, and you can search for the information regarding checks using the search bar on the page.
I hope this helps!

Categories

Find more on Model Compatibility in Help Center and File Exchange

Products


Release

R2012b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!