Jump to content

Traffic Light 1-Way

From Flowcode Help
Revision as of 14:05, 20 April 2018 by BenR (talk | contribs)

Traffic lights are essential in modern road networks to help control and maintain the flow of traffic.

The lights must be clear to read and follow a regular pattern to allow motorists and other road users to know without any chance of confusion what the lights mean and what will come next in the sequence.


Exercise 1

Setup and analyse the light patterns of a traffic light.


Tasks

  • Create a new flowchart, and select ‘No chip’ as the target device. We choose no chip as this is a simulation only exercise.
  • Add the ‘Traffic Light 1-Way’ component to the 3D Panel, from the ’Simulation -> Scenarios’ category.
  • Add a loop to your program to loop forever until the simulation stop button is pressed.
  • Use the component macro ‘AutomaticMode’ to start the lights moving through its pre-programmed light patterns.
  • Start the simulation running and count the different states the lights can be in.


Working Example

Below you will see a working example to monitor the light sequence of a simple 1-way traffic light.

Traffic Light 1-Way - Worksheet 1