LED Color Change

LED color change can be done by the following ways.

  1. Using simple Boolean control and set the colors [4] property.
  2. Using direct Color Box control.

 Using Colors [4] property of Boolean Control

Colors [4]

 

 

Colors [4] property of Boolean control will have array of 1, 2 or 4 elements. Each element will be a cluster of foreground and background colors. If array size is 1, same color will be used for all states. If the array size is 2, first element value will be used for the False and True to False states and the second value will be used for the True and False to True states.

Colors [4] values

True to False and False to True states can be set only when LED mechanical action is Switch/Latch when released.

 Using Color box

Color box control can be used directly in front panel. Color box constant or U32 has to be wired to it.

Following is an example which changes color based on the state selection. Boolean color is changed by using Colors [4] property and Color Box value is set directly.

LED color changeLED color change_O

 

Note: In Security system application [CLD sample exam], color change is one of the requirements which can be done by these methods.

 

Leave a Reply