| Stateflow User's Guide | ![]() |
Associating an Output Event with an Output Port
The Port property for an output event associates it with an output port on the chart block that parents the event. It specifies the position of the output port relative to other output event ports on the Chart block. Output event ports appear below output data ports on the right side of a chart block.
Stateflow numbers all output ports sequentially from top to bottom, starting with output data followed by output events. As you add output events, their default Port property is assigned sequentially to the end of the existing port list.
You can change the default port assignment of an event by resetting its Port property. When you change the Port property for an output event, the Port property for the remaining output events is automatically renumbered. For example, assume that there are three output events, OE1, OE2, and OE3, associated with the output ports 4, 5, and 6, respectively. If you change the Port property for OE2 to 6, the Port property for the remaining events, OE1 and OE3, is renumbered to 4 and 5, respectively.
| Defining Output Events | Sharing Events with Stateflow External Code | ![]() |
© 1994-2005 The MathWorks, Inc.