Difference between revisions of "Traffic Light 1-Way"

From Flowcode Help
Jump to navigationJump to search
(Created page with "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 ...")
 
Line 16: Line 16:
 
* Add the ‘Traffic Light 1-Way’ component to the 3D Panel, from the ’Simulation -> Scenarios’ category.  
 
* 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.
 
* 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.
+
* 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.
  
  

Revision as of 14:05, 20 April 2018

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.

TL1.jpg


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.

FC6 Icon.png Traffic Light 1-Way - Worksheet 1

TL2.jpg