Model, Component, and Package Management > Model management > Working with the supplied example models > Traffic Lights simulation > Interacting with the Traffic Lights simulation
  
Interacting with the Traffic Lights simulation
Before you start interacting with the Traffic Lights simulation, arrange the Traffic Lights application and Modeler so that you can see both at the same time.
The Traffic Lights simulation uses timer Events to cycle through the traffic light sequence.
1. From the Traffic Lights application, click the Wait button.
The Wait sign is on. After the Red light is on, the Crossing State Diagram is used to make the Amber light flash 4 times before returning to the traffic light sequence.
2. From the Traffic Lights application, click the Off button.
The simulation enters the Off state.
The Off/On button demonstrates how you can use a Visual Basic application to inject an event with parameters. To view the script for the Off/On button, open the source files for the Traffic Lights application, which reside in the same folder as the Traffic Lights application.
3. From the Traffic Lights application, click the On button.
The traffic light sequence resumes.
4. From the Traffic Lights application, click the Stop button.
The state machine is removed from the memory of your computer.