2 Pedestrian traffic light

This "UML state diagram" sample illustrates the basic functionality of the UML state diagram and contains the following UML SC elements:

Sample project: TF1910_UmlSC_Sample2_PedestrianLight.zip

Overview

UML SC is used to program the behavior of a pedestrian traffic light. A green-phase request can be sent via a push button on the visualization. The pedestrian traffic light has the two states, "Red" and "Green".

If a green phase is requested, the traffic light switches to green after the time "cTimeWaitForGreen" has elapsed. The traffic light switches back to red once the time "cTimeGreenPhase" has elapsed.

The two states "Red" and "Green" each contain an ENTRY action and a DO action.

Visualization

In addition to the convenient online mode of the UML SC diagram, the behavior of the pedestrian lights, the values of the counters and the waiting time that has already elapsed can be tracked via the visualization.