Add and Define Event Objects
Events are added, removed, and edited using the Explorer. These events must be defined: Ride_done, Switch_on,Switch_off,Start_button, Emergency_stop.
Add and Define a Local Event
Ride_done is the only local event in the carousel example:
- 1
. - Choose Explore from the Tools menu of the graphics editor window to
display the Explorer.
- 2
. - Select the parent for the new event.
- Double-click on the machine name (the name you specified when you saved
the Simulink model) in the Object Hierarchy list. Double-click on the chart
name (the name you specified on the Stateflow block). The chart will be the
parent for all the events in the carousel example.
- 3
. - Choose Event from the Explorer Add menu. An event appears in the
Contents pane. Position the cursor over the item's Name field, press the
right mouse button to display the context menu, and select Rename from
the menu.
- 4
. - Enter
Ride_done in the Name field.
- 5
. - Position the cursor over the Scope field and press the left mouse button to
display a list of scopes. Select Local in the Scope field.
- 6
. - Click on the OK button to save the changes and close the dialog box.
Add and Define Input from Simulink Events
There are four Input from Simulink events to add and define: Switch_on, Switch_off, Start_button, and Emergency_stop:
- 1
. - Choose Explore from the Tools menu of the graphics editor window to
display the Explorer.
- 2
. - Select the parent for the new event.
- Double-click on the machine name (the name you specified when you saved
the Simulink model) in the Object Hierarchy list. Double-click on the chart
name (the name you specified on the Stateflow block). The chart will be the
parent for all the events in the carousel example.
- 3
. - Choose Event from the Explorer Add menu. An event appears in the
Contents pane.
- 4
. - Enter
Switch_on in the name field.
- 5
. - Select Input from Simulink in the Scope field.
- 6
. - Select Either Edge in the Trigger field.
- 7
. - Click on the OK button to save the changes and close the dialog box.
- 8
. - Repeat these steps for each Input from Simulink event, entering the
appropriate text in the Name field.
[ Previous | Help Desk | Next ]