Difference between revisions of "Industrial"

From Free Pascal wiki
Jump to navigationJump to search
(→‎Components: Prepare for other components of the package)
(→‎TAnalogSensor: TAnalogSensor documentation)
Line 48: Line 48:
  
 
==== TAnalogSensor ====
 
==== TAnalogSensor ====
[[image:tanalogsensor.png]]
+
[[image:tanalogsensor.png]] Analog display which can be configured to have a round or linear scale. Display ranges can be indicated in different colors
 +
* '''Properties'''
 +
** <tt>AnalogKind</tt> (enumeration <tt>TAnalogKind = (akAnalog, akHorizontal, akVertical)</tt>): type of the display: round scale (<tt>akAnalog</tt>) or horizontal (<tt>akHorizontal</tt>) / vertical (<tt>akVertical</tt>) thermometer-like linear scale
 +
** <tt>ColorBack: TColor</tt> - color of the display background (default: black)
 +
** <tt>ColorFore: TColor</tt> - color of the display "foreground"; the fraction of the area painted by the <tt>ColorFore</tt> corresponds to the displayed <tt>Value</tt> (default: bright green).
 +
** <tt>ColorRed</tt>, <tt>ColorYellow</tt> (type <tt>TColor</tt>) - color of two lines indicating special data ranges, e.g. value too small or value too high. Default: red and yellow, respectively. These lines are displayed when the <tt>ShowLevel</tt> property is <tt>true</tt>
 +
** <tt>ShowLevel: boolean</tt> - if <tt>true</tt>, two lines indicating special data conditions are displayed.
 +
** <tt>ShowText: boolean</tt> - displays the numerical <tt>Value</tt> below the display.
 +
** <tt>Value: integer</tt> - displayed number (corresponds to the area drawn in color <tt>ColorFore</tt>)
 +
** <tt>ValueMax: Integer</tt> - maximum value that can be displayed
 +
** <tt>ValueMin: Integer</tt> - minimum value that can be displayed
 +
** <tt>ValueRed</tt>, <tt>ValueYellow: Integer</tt> - Values displayed as the position of the indicator lines drawn in color <tt>ColorRed</tt> and <tt>ColorYellow</tt>, respectively.
 +
** <tt>Caption: string</tt> - Text displayed in front of the value when <tt>ShowText</tt> is <tt>true</tt>.
 +
 
 +
* '''Methods'''
 +
** <tt>SetColorState(slStopLight: TStopLights)</tt> - changes the color of the <tt>Caption</tt> and the <tt>Value</tt> as specified by the parameter <tt>slStopLights: TStopLights = (slUNKNOWN, slRED, slYELLOW, slGREEN)</tt>.
  
 
==== TA3nalogGauge ====
 
==== TA3nalogGauge ====

Revision as of 15:01, 27 March 2023

Template:Industrial

About

The Industrial package contains a set of industrial-themed components, such as LED indicators, seven-segment displays, analog gauges, thermometer gauges, knob, on/off switch, etc.

Download and Installation

  • Released version distributed by the Online Package Manager: check the "IndustrialStuff" item in the Online Package manager, click the "Install" button and follow the instructions.
  • Development version on Lazarus CCR (svn):
  • In the Lazarus IDE, open the file industrial.lpk in "Package" > "Open Package File (.lpk)" and click on "Use" > "Install". Allow to rebuild the IDE.
  • When Lazarus restarts after the installation the components are on palette Industrial.

Components

LED Indicators

TAdvLED

TAdvLED.png Indicator light as LED or light bulb

  • Properties
    • Kind (enumeration TLEDKind = (lkRedLight, lkGreenLight, lkYellowLight, lkBulb, lkCustom)): red, green or yellow LED, or light bulb, or LED in adjustable colors as defined by the GlyphDisabled, GlyphOff and GlyphOn properties.
    • State (enumeration TLEDState = (lsDisabled, lsOff, lsOn)): Indicator is disabled (gray), OFF (dark color) or ON (bright color).
    • Blink: boolean: The LED toggles automatically between ON and OFF states. The duration during which the LED is in each state is given by the property BlinkDuration (in milliseconds).
    • FlashMode (enumeration TFlashMode = (fmFlashOffToOn, fmFlashOnToOff)): Defines whether the Flashmethod causes a transition from OFF to ON, or from ON to OFF.
  • Methods
    • procedure Toggle: Switches between the states of the indicator (unless State is lsDisabled).
    • procedure Flash(ADuration: Integer): The indicator flashes for the ADuration time (in milliseconds) to the other state and then returns to the current state again. Whether the transition is from OFF to ON or from ON to OFF is specified by the FlashMode property.
  • Demo project
    • in folder TAdvLED of the installation folder.

TIndLED

TIndLED.png LED indicator with configurable shape and color. Can be grouped with others so that only one LED of that group is active.

  • Properties
    • Bevels: a collection of TcyBevel items defining bevels around the LED (raised/lowered, left/top/right/bottom, highlight and shadow color, as well as bevel width)
    • GroupIndex: Integer: in a group of LEDs sharing the same non-zero GroupIndex only a single LED can be lit. When AllowAllOff is true all LEDs of this group can be turned OFF, otherwise there must always be one LED which is ON.
    • LedColorDisabled, TLedColorOff, TLedColorOn (type TColor): colors of the LED in the disabled, OFF and ON states, respectively.
    • LedValue: boolean: determines whether the LED is ON (true) or OFF (false).
    • ShapeType (enumeration TShapeType = (stRectangle, stRoundRect, stEllipse)): shape of the LED. In case of stRoundRect the corner radius is determined by ShapeRoundRectX and ShapeRoundRectY.
    • ShapeLedColorDisabled, ShapeLedColorOff, ShapeLedColorOn (type TColor): pen color of the border of the LED shape.

Displays

TLEDNumber

tlednumber.png

TLCDDisplay

tlcddisplay 150.png

Gauges

TAnalogSensor

tanalogsensor.png Analog display which can be configured to have a round or linear scale. Display ranges can be indicated in different colors

  • Properties
    • AnalogKind (enumeration TAnalogKind = (akAnalog, akHorizontal, akVertical)): type of the display: round scale (akAnalog) or horizontal (akHorizontal) / vertical (akVertical) thermometer-like linear scale
    • ColorBack: TColor - color of the display background (default: black)
    • ColorFore: TColor - color of the display "foreground"; the fraction of the area painted by the ColorFore corresponds to the displayed Value (default: bright green).
    • ColorRed, ColorYellow (type TColor) - color of two lines indicating special data ranges, e.g. value too small or value too high. Default: red and yellow, respectively. These lines are displayed when the ShowLevel property is true
    • ShowLevel: boolean - if true, two lines indicating special data conditions are displayed.
    • ShowText: boolean - displays the numerical Value below the display.
    • Value: integer - displayed number (corresponds to the area drawn in color ColorFore)
    • ValueMax: Integer - maximum value that can be displayed
    • ValueMin: Integer - minimum value that can be displayed
    • ValueRed, ValueYellow: Integer - Values displayed as the position of the indicator lines drawn in color ColorRed and ColorYellow, respectively.
    • Caption: string - Text displayed in front of the value when ShowText is true.
  • Methods
    • SetColorState(slStopLight: TStopLights) - changes the color of the Caption and the Value as specified by the parameter slStopLights: TStopLights = (slUNKNOWN, slRED, slYELLOW, slGREEN).

TA3nalogGauge

ta3naloggauge.png

TindGnouMeter

tindgnoumeter.png


Control Elements

TmKnob

tmknob.png

TMultiSlider

tmultislider.png

Switches

TOnOffSwitch

tonoffswitch.png