| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Stateflow |
| Contents | Index |
| Learn more about Stateflow |
| On this page… |
|---|
To check for unresolved symbol errors, you can use of these methods:
Start simulation (for example, by selecting Simulation > Start in the model window)
Update the model diagram (for example, by selecting Edit > Update Diagram in the model window)
Each method triggers parsing of the Stateflow machine (see Parsing Stateflow Charts). During parsing, if your chart does not resolve some of its symbols, the following process determines whether to report errors for the unresolved symbols or to continue generating code.

Note When you parse a chart without simulation or diagram updates, the Stateflow parser does not have access to all the information needed to check for unresolved symbols, such as exported graphical functions from other charts and enumerated data types. However, if you start simulation or update the model diagram, you invoke the model compilation process, which has full access to the information needed. |
For information about Simulink symbol resolution, see Resolving Symbols and Hierarchical Symbol Resolution in the Simulink documentation.
You can use the Symbol Autocreation Wizard to add missing data and events to your Stateflow charts. When you start simulation or update the model diagram, the Wizard detects references to undefined data and events and presents a list of the recommended data or events that you must define.

To accept, reject, or change a recommended item, do one of these steps:
To accept an item, click on the space in front of the item under the check mark column.
To accept all items, click CheckAll.
To reject an item, leave it unchecked.
To change an item, click on the icon under the T (type) column, or click on the string under the Scope or Proposed Parent column for that item.
Each time you click on an icon or a string, the Wizard replaces the entry with a different one. Keep clicking until the desired icon or string appears.
| Column in the Wizard | Choices When You Toggle Between Entries |
|---|---|
| T | Data, Event |
| Scope | Local, Input, Output |
| Proposed Parent | Chart, Machine |
After you finish editing the symbol definitions, click Create to add the symbols to the Stateflow hierarchy.
![]() | Parsing Stateflow Charts | Error Messages When Parsing Charts and Generating Code | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |