Difference between revisions of "Component: Traffic Light 1 Way (Scenarios)"

From Flowcode Help
Jump to navigationJump to search
(XML import)
 
 
(3 intermediate revisions by the same user not shown)
Line 20: Line 20:
  
 
==Examples==
 
==Examples==
''<span style="color:red;">No additional examples</span>''
+
There is a detailed walk through of the scenario detailed at the link below to go with this component.
  
 +
[[Traffic_Light_1-Way|Traffic Light Scenario]]
  
 
==Downloadable macro reference==
 
==Downloadable macro reference==
Line 116: Line 117:
 
This property is of type ''Color picker'' and can be referenced with the variable name ''Red''.
 
This property is of type ''Color picker'' and can be referenced with the variable name ''Red''.
  
''<span style="color:red;">No additional information</span>''
+
Colour Picker to set the Colour of the Red indicator.
  
  
Line 124: Line 125:
 
This property is of type ''Color picker'' and can be referenced with the variable name ''Amber''.
 
This property is of type ''Color picker'' and can be referenced with the variable name ''Amber''.
  
''<span style="color:red;">No additional information</span>''
+
Colour Picker to set the Colour of the Amber indicator.
  
  
Line 132: Line 133:
 
This property is of type ''Color picker'' and can be referenced with the variable name ''Green''.
 
This property is of type ''Color picker'' and can be referenced with the variable name ''Green''.
  
''<span style="color:red;">No additional information</span>''
+
Colour Picker to set the Colour of the Green indicator.
  
  
Line 140: Line 141:
 
This property is of type ''Color picker'' and can be referenced with the variable name ''Off''.
 
This property is of type ''Color picker'' and can be referenced with the variable name ''Off''.
  
''<span style="color:red;">No additional information</span>''
+
Colour Picker to set the Colour of all indicators when they are switched off.
  
  
Line 149: Line 150:
  
 
Amount of time to wait in milliseconds when the lights are red or green.
 
Amount of time to wait in milliseconds when the lights are red or green.
 +
  
 
<span style="font-weight: normal;"><u>Transition Time</u></span>
 
<span style="font-weight: normal;"><u>Transition Time</u></span>

Latest revision as of 10:33, 24 May 2018


Author Matrix TSL
Version 1.0 (Release)
Category Scenarios


Image Traffic Light 1_Way component

A set of one way traffic lights complete with manual light control, a simple state machine and an automatic mode to allow the lights to take care of themselves.

Examples

There is a detailed walk through of the scenario detailed at the link below to go with this component.

Traffic Light Scenario

Downloadable macro reference

This component does not contain any downloadable macros

Simulation macro reference

GetStopGo

Reads one of the light sets to determine if it is safe to go through the lights.

Returns 1 for a Green light, otherwise returns 0.

Parameters

This macro has no parameters


Return value

BOOL : Returns true if the operation is a success, else false


AutomaticMode

Enables or Disables automatic mode where the lights will automatically cycle between modes.

Parameters

BOOL Mode
0 = Auto Mode Disabled, 1 = Auto Mode Enabled


Return value

This call does not return a value


GetLightState

Reads the state of one of the light sets.

Returns the state as a number.

0=Red, 1=Red+Amber, 2=Green, 3=Amber, 4=Unknown State

Parameters

This macro has no parameters


Return value

BYTE


SetLights

Direct control over all 3 of the lights.

Parameters

BOOL Red
0 = Off, 1 = On
BOOL Amber
0 = Off, 1 = On
BOOL Green
0 = Off, 1 = On


Return value

This call does not return a value


SetLightState

Follows the standard traffic light sequence.

Parameters

BYTE SequenceNumber
0 = Red, 1 = Red+Amber, 2 = Green, 3 = Amber


Return value

This call does not return a value



Property reference

Red Colour

This property is of type Color picker and can be referenced with the variable name Red.

Colour Picker to set the Colour of the Red indicator.


Amber Colour

This property is of type Color picker and can be referenced with the variable name Amber.

Colour Picker to set the Colour of the Amber indicator.


Green Colour

This property is of type Color picker and can be referenced with the variable name Green.

Colour Picker to set the Colour of the Green indicator.


Off Colour

This property is of type Color picker and can be referenced with the variable name Off.

Colour Picker to set the Colour of all indicators when they are switched off.


Flow Time

This property is of type Unsigned integer and can be referenced with the variable name Flow.

Amount of time to wait in milliseconds when the lights are red or green.


Transition Time

This property is of type Unsigned integer and can be referenced with the variable name Trans.

Amount of time to wait in milliseconds when the lights are transitioning between flows.