Simulating the light switch

  1. Right-click on light_switch.sct and select Run As → Statechart Simulation in the context menu.
  2. The simulation starts and shows the light switch model in its off state. The rectangle named Off is highlighted in red, meaning it is the active state.

    Light switch simulation in "off" state

  3. At the right-bottom side of the window, the simulation view is located. In this view, you can change variable values and raise events during a simulation run. Click on the small triangle left from internal to unfold the operate link. This link represents the operate event to switch the light on or off.
  4. Click on the operate link. The active state changes accordingly from Off to On.

    Light switch simulation in "on" state

  5. Click on operate again to switch off the light.