Using Stateflow     Search    Help Desk 

Stateflow Explorer User Interface

Explorer Main Window

This is the Explorer main window showing the object hierarchy of an example chart (explore_ex).


Object Hierarchy

The Object Hierarchy (machines, charts, and states) is displayed in the left-hand pane. A `+' character indicates that the hierarchy can be expanded by double-clicking on that entry (or by clicking on the `+' character. A `-' character indicates there is nothing to expand. Clicking on an entry in the Object Hierarchy selects that entry.

Contents Pane

Data, and target objects parented by the currently selected object in the Object Hierarchy are displayed in the Contents pane. Each type of object has an icon. The entry for a data object displays selected properties of the object.

These are the possible parent and object combinations.


Machine
Chart
State
Event
yes
yes
yes
Data
yes
yes
yes
Target
yes
no
no

Targets are parented exclusively by machines. (Although all other combinations are valid, there are guidelines describing how Scope affects choice of parent and vice-versa.) The default sfun simulation target is automatically defined for every machine. If you have a Real-Time Workshop license, a Real-Time Workshop target is also automatically added:

For convenience, a hypertext link to the parent of the currently selected object in the Object Hierarchy is included following the Contents of: label. Click on the hypertext link to bring that object to the forefront.

File Menu

Select Close (Ctrl+W) from the File menu to close the Explorer window.

Edit Menu

Select Cut (Ctrl+X) from the Edit menu to delete the selected data, event, or target object in the Contents of: pane.

Add Menu

The Add menu provides these options.

Menu Choice
Description
Event (Ctrl+E)
Creates a new event at the selected level in the object hierarchy; displays an Event properties dialog box.
Data (Ctrl+D)
Creates a new data object at the selected level in the object hierarchy; displays a Data properties dialog box.
Target (Ctrl+T)
Creates a new untitled standalone target at the selected machine level in the object hierarchy (a target's parent must be a machine; this menu item is disabled if a chart or state parent type is selected); displays an untitled Target Configuration properties dialog box.

Help Menu

The Help menu provides these options.

Menu Choice
Description
Topics (HTML)
Displays Stateflow online help in an HTML browser. An online version of the Stateflow User's Guide is one of the options available from the online help.
Help Desk (HTML)
Displays the MATLAB Help Desk in an HTML browser.
About Stateflow
Displays a pop-up window with software version information.

Moving Objects/Changing Parent

To create desired behavior you may need to change the parent of an event, data, or target object.

Objects in the Contents of: pane can be moved in the hierarchy to change an object's parent. Click and drag an object from the Contents of: pane to a new location in the Object Hierarchy pane to change its parent. If the object is the current parent, an X with a circle around it is displayed (indicating this is an invalid operation). If you move an object to a level in the hierarchy that does not support that object's current Scope property, the Scope is changed to Local.

Moving Objects/Changing Index and Port Order

To ensure proper ordering of event and/or data Input from or Output to Simulink you may need to move some of these objects in the Explorer.

Click and drag a data object with Input from or Output to Simulink Scope to a new position in the Contents of: pane Data list to change its port number. Click and drag an event Input from or Output to Simulink Scope to a new position in the Contents of: pane Event list to change its index number.

Deleting Objects

Select the object in the Contents of: pane and press the Delete key or select Cut (Ctrl+X) from the Edit menu to delete an object.

Editing Objects

To edit a state or chart displayed in the Explorer's Object Hierarchy pane, select the object, display its context menu by clicking the right mouse button, and select Edit from the context menu. Stateflow displays the selected object in the Stateflow editor.



[ Previous | Help Desk | Next ]