Difference between revisions of "Component: LED Base (Outputs: General)"

From Flowcode Help
Jump to navigationJump to search
(XML import)
 
(XML import)
Line 52: Line 52:
  
 
==Examples==
 
==Examples==
 +
''<span style="color:red;">No additional examples</span>''
  
The following files provide examples of how to use this component:
 
 
{{Fcfile|Example_LED Array.fcfx|LED Array Test}}
 
 
:Demonstration of the LED array component.
 
 
:
 
 
:
 
 
:
 
 
:Arrays at the left and centre are linked to instances of LED components dragged in from the component
 
 
:
 
 
:menus - these are automatically hidden so long as they remain linked, but will re-appear when the link
 
 
:
 
 
:is broken so that they can be edited.  This function works with any LED bult using the &apos;LED base&apos;
 
 
:
 
 
:component.
 
 
:
 
 
:
 
 
:
 
 
:The left and right hand &apos;meter&apos; arrays use the &apos;Inidividual colours&apos; options to allow multi-coloured arrays and
 
 
:
 
 
:use the new &apos;BarGraph&apos; macro which makes LED meters very simple to program.  The left hand array
 
 
:
 
 
:reads &apos;backwards&apos; by setting a negative spacing for the array elements.
 
 
:
 
 
:
 
 
:
 
 
:The centre array uses the new &apos;PointGraph&apos; macro - a quick way to illuminate only a single LED from the
 
 
:
 
 
:array.
 
 
:
 
 
:
 
 
:
 
 
:The right hand arrays are not linked to a &apos;prototype&apos; LED component - they use the default geometry
 
 
:
 
 
:options built into the array component.
 
  
 
==Downloadable macro reference==
 
==Downloadable macro reference==

Revision as of 17:59, 18 March 2016


Author Matrix Ltd
Version 1.3 (Development)
Category Outputs: General


Image LED Base component

Base for creating LEDs and other on/off visual indicators. Choose a 'Target Object' that will change colour when the pin changes; if multiple objects must change color, group them, and target the group. When 'Auto off color" is selected, changing the 'on color' will automatically choose an off color by reducing the on-color intensity.

This component can be used as a base to create child components

The following components all inherit the traits of LED Base:

-
Image Dashboard lamp Indicator with bezel and label, particularly suitable for viewing on the dashboard.

Indicator on/off colors, bezel color and label all editable via properties.

Image LED (LES, Panel) Panel lamp for a LES bulb.

Colour can be changed in component properties.

Image LED (5mm, PCB) An industry standard 5mm diameter LED.

Any color may be chosen, and the leads trimmed to length.

Image LED (5mm, Panel) Standard 5mm LED mounted in a panel clip. Colour can be changed in component properties.
Image LED (SMD, PCB) Surface mount LED in standard PLCC2 package.

Colour can be set friom component properties.

Image LED (Generic) Basic LED component using simple geometric shapes.

Examples

No additional examples


Downloadable macro reference

TurnOn

Turn the LED off.

Parameters

This macro has no parameters


Return value

This call does not return a value


TurnOff

Turn the LED on.

Parameters

This macro has no parameters


Return value

This call does not return a value


Simulation macro reference

This component does not contain any simulation macros


Property reference

Pin

This property is of type Single digital pin and can be referenced with the variable name pin.

Chip pin to connect the LED to.

Polarity

This property is of type Fixed list of ints and can be referenced with the variable name polarity.

Active High: Pin true -> On color, Pin false -> Off color

Active Low: Pin true -> Off color, Pin false -> On color

Target Object

This property is of type Panel object and can be referenced with the variable name target_object.

Set a target object to be the illuminating part of the LED.

To change the colour of multiple objects, group them first, then target the group.

On Color

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

The color of the LED when it is turned on.

Off Color

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

The color of the LED when it is turned off.

Auto Off Color

This property is of type True or false and can be referenced with the variable name auto_off.

When this is selected, the off color is automatically set to a darker version of the on color.