Difference between revisions of "Component: Numeric Display (Indicators)"

From Flowcode Help
Jump to navigationJump to search
(XML import)
 
 
(13 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
+
{| style="width:50%"
 
 
{| width="50%"
 
 
|-
 
|-
| width="20%" style="color: gray;" | Author
+
| width="20%" style="color:gray;" | Author
 
| Matrix TSL
 
| Matrix TSL
 
|-
 
|-
| width="20%" style="color: gray;" | Version
+
| width="20%" style="color:gray;" | Version
| 1.0 (Release)
+
| 1.0
 
|-
 
|-
| width="20%" style="color: gray;" | Category
+
| width="20%" style="color:gray;" | Category
 
| Indicators
 
| Indicators
 
|}
 
|}
  
  
 +
==Numeric Display component==
 +
Allows a numeric value to be displayed on the user panel using virtual 7 seg displays. Used for displaying the value of a variable during simulation runtime. Provides up to 5 customisable ranges to automatically alter the colour of the label based on the value.
  
==[[File:Component Icon 64f3c8ad_21a4_4e15_b9aa_c32a2edca893.png|Image]] Numeric Display component==
+
==Component Source Code==
Allows a numeric value to be displayed on the user panel using virtual 7 seg displays.
 
Used for displaying the value of a variable during simulation runtime.
 
Provides up to 5 customisable ranges to automatically alter the colour of the label based on the value.
 
  
==Examples==
+
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_7SegNumeric.fcfx FC_Comp_Source_7SegNumeric.fcfx]
''<span style="color:red;">No additional examples</span>''
 
  
 +
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_7SegNumeric.fcfx FC_Comp_Source_7SegNumeric.fcfx]
  
==Downloadable macro reference==
+
==Detailed description==
  
''This component does not contain any downloadable macros''
 
  
==Simulation macro reference==
 
  
===<span style="font-weight: normal;"><u><tt>DisplayAsReal</tt></u></span>===
 
Displays a floating point value on the label with a confiiguarable number of decimal points
 
  
'''Parameters'''
 
  
:[[Variable Types|FLOAT]] ''Value''
 
::Real floating point value to display
 
  
:[[Variable Types|BYTE]] ''Precision''
 
::Number of decimal point values to show e.g. 2 = 0.00
 
  
  
'''Return value'''
 
  
:''This call does not return a value''
 
  
  
===<span style="font-weight: normal;"><u><tt>SetBackgroundColour</tt></u></span>===
 
Allows the user to manually specify the default colour of the background.
 
  
'''Parameters'''
 
  
:[[Variable Types|LONG]] ''Colour''
 
::RGB colour in the hexadecimal form 0xBBGGRR
 
  
  
'''Return value'''
 
  
:''This call does not return a value''
 
  
 +
''No detailed description exists yet for this component''
  
===<span style="font-weight: normal;"><u><tt>DisplayAsInt</tt></u></span>===
+
==Examples==
Displays an integer value on the label.
 
  
Capable of displaying positive and negative values.
 
  
'''Parameters'''
 
  
:[[Variable Types|LONG]] ''Value''
 
::Integer value to display
 
  
  
'''Return value'''
 
  
:''This call does not return a value''
 
  
  
===<span style="font-weight: normal;"><u><tt>SetForegroundColour</tt></u></span>===
 
Allows the user to manually specify the default colour of the foreground text.
 
  
'''Parameters'''
 
  
:[[Variable Types|LONG]] ''Colour''
 
::RGB colour in the hexadecimal form 0xBBGGRR
 
  
  
'''Return value'''
 
  
:''This call does not return a value''
 
  
  
===<span style="font-weight: normal;"><u><tt>SetUnits</tt></u></span>===
 
Allows the user to manually specify the units string that is appended to the end of the label.
 
  
'''Parameters'''
 
  
:[[Variable Types|<- STRING]] ''Units''
+
An example of a numeric display changing colour set out within the display properties
::RGB colour in the hexadecimal form 0xBBGGRR, -1 for Transparent
 
::''This parameter may be returned back to the caller''
 
  
  
'''Return value'''
+
{{Fcfile|Basic Numeric Display.fcfx|Basic Numeric Display Example}}
  
:''This call does not return a value''
 
  
  
  
  
==Property reference==
 
<span style="font-weight: normal;"><u>Show Title</u></span>
 
  
This property is of type ''True or false'' and can be referenced with the variable name ''ShowTitle''.
 
  
Decides if the title is shown on the panel.
 
  
<span style="font-weight: normal;"><u>Title Text</u></span>
 
  
This property is of type ''Line of text'' and can be referenced with the variable name ''Title''.
 
  
Specifies the title displayed on the panel.
 
  
<span style="font-weight: normal;"><u>Title Scale</u></span>
+
==Macro reference==
  
This property is of type ''Floating point'' and can be referenced with the variable name ''TitleScale''.
+
===DisplayAsInt===
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DisplayAsInt'''
 +
|-
 +
| colspan="2" | Displays an integer value on the label. Capable of displaying positive and negative values.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-s32-icon.png]] - LONG
 +
| width="90%" | Value
 +
|-
 +
| colspan="2" | Integer value to display&nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
Specifies the size of the title on the panel, default 1.2
 
  
<span style="font-weight: normal;"><u>Foreground Colour</u></span>
+
===DisplayAsReal===
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DisplayAsReal'''
 +
|-
 +
| colspan="2" | Displays a floating point value on the label with a confiiguarable number of decimal points&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
 +
| width="90%" | Value
 +
|-
 +
| colspan="2" | Real floating point value to display&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 +
| width="90%" | Precision
 +
|-
 +
| colspan="2" | Number of decimal point values to show e.g. 2 = 0.00&nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
This property is of type ''Color picker with transparency'' and can be referenced with the variable name ''FgColTitle''.
 
  
Specifies the foreground colour of the title text
+
===SetBackgroundColour===
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetBackgroundColour'''
 +
|-
 +
| colspan="2" | Allows the user to manually specify the default colour of the background.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-s32-icon.png]] - LONG
 +
| width="90%" | Colour
 +
|-
 +
| colspan="2" | RGB colour in the hexadecimal form 0xBBGGRR&nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
<span style="font-weight: normal;"><u>Background Colour</u></span>
 
  
This property is of type ''Color picker with transparency'' and can be referenced with the variable name ''BgColTitle''.
+
===SetForegroundColour===
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetForegroundColour'''
 +
|-
 +
| colspan="2" | Allows the user to manually specify the default colour of the foreground text.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-s32-icon.png]] - LONG
 +
| width="90%" | Colour
 +
|-
 +
| colspan="2" | RGB colour in the hexadecimal form 0xBBGGRR&nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
Specifies the background colour of the title text
 
  
<span style="font-weight: normal;"><u>Number of Digits</u></span>
+
==Property reference==
  
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''NumDigits''.
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
+
|-
Number of digits in the indicator.
+
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
The number of digits sets the range available
+
|-
 
+
|-
For example 4 Digits can display 0000 to 9999, out of range items will be shown as - - - -
+
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 
+
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Title
<span style="font-weight: normal;"><u>Colour Ranges</u></span>
+
|-
 
+
|-
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''Range''.
+
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 
+
| width="90%" | Show Title
Allows ranges to be specified to automatically format the foreground and background colours based on the numeric value
+
|-
 
+
| colspan="2" | Decides if the title is shown on the panel.&nbsp;
<span style="font-weight: normal;"><u>Foreground Colour</u></span>
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
This property is of type ''Color picker with transparency'' and can be referenced with the variable name ''FgCol''.
+
| width="90%" | Title Text
 
+
|-
The label foreground Text colour
+
| colspan="2" | Specifies the title displayed on the panel.&nbsp;
 
+
|-
<span style="font-weight: normal;"><u>Background Colour</u></span>
+
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
 
+
| width="90%" | Title Scale
This property is of type ''Color picker with transparency'' and can be referenced with the variable name ''BgCol''.
+
|-
 
+
| colspan="2" | Specifies the size of the title on the panel, default 1.2 &nbsp;
The label background Surrounding colour
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-2-icon.png]]
<span style="font-weight: normal;"><u>Min Value</u></span>
+
| width="90%" | Title Colour
 
+
|-
This property is of type ''Floating point'' and can be referenced with the variable name ''MinVal1''.
+
| colspan="2" | Specifies the colour of the title text&nbsp;
 
+
|-
The minimum value to meet the range condition ( >= )
+
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
 
+
| width="90%" | Title Offset
<span style="font-weight: normal;"><u>Max Value</u></span>
+
|-
 
+
| colspan="2" | Distance above component center to draw the title&nbsp;
This property is of type ''Floating point'' and can be referenced with the variable name ''MaxVal1''.
+
|-
 
+
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
The maximum value to meet the range condition ( < )
+
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Display Properties
 
+
|-
<span style="font-weight: normal;"><u>Foreground Colour</u></span>
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
This property is of type ''Color picker with transparency'' and can be referenced with the variable name ''FgCol1''.
+
| width="90%" | Number of Digits
 
+
|-
The label foreground Text colour when in the specified range
+
| colspan="2" | Number of digits in the indicator. The number of digits sets the range available For example 4 Digits can display 0000 to 9999, out of range items will be shown as - - - -&nbsp;
 
+
|-
<span style="font-weight: normal;"><u>Background Colour</u></span>
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
+
| width="90%" | Colour Ranges
This property is of type ''Color picker with transparency'' and can be referenced with the variable name ''BgCol1''.
+
|-
 
+
| colspan="2" | Allows ranges to be specified to automatically format the foreground and background colours based on the numeric value&nbsp;
The label background highlight colour when in the specified range
+
|-
 
+
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
<span style="font-weight: normal;"><u>Min Value</u></span>
+
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Defaults
 
+
|-
This property is of type ''Floating point'' and can be referenced with the variable name ''MinVal2''.
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-2-icon.png]]
The minimum value to meet the range condition ( >= )
+
| width="90%" | Foreground Colour
 
+
|-
<span style="font-weight: normal;"><u>Max Value</u></span>
+
| colspan="2" | The label foreground Text colour&nbsp;
 
+
|-
This property is of type ''Floating point'' and can be referenced with the variable name ''MaxVal2''.
+
| width="10%" align="center" | [[File:Fc9-type-2-icon.png]]
 
+
| width="90%" | Background Colour
The maximum value to meet the range condition ( < )
+
|-
 
+
| colspan="2" | The label background Surrounding colour&nbsp;
<span style="font-weight: normal;"><u>Foreground Colour</u></span>
+
|}
 
 
This property is of type ''Color picker with transparency'' and can be referenced with the variable name ''FgCol2''.
 
 
 
The label foreground Text colour when in the specified range
 
 
 
<span style="font-weight: normal;"><u>Background Colour</u></span>
 
 
 
This property is of type ''Color picker with transparency'' and can be referenced with the variable name ''BgCol2''.
 
 
 
The label background highlight colour when in the specified range
 
 
 
<span style="font-weight: normal;"><u>Min Value</u></span>
 
 
 
This property is of type ''Floating point'' and can be referenced with the variable name ''MinVal3''.
 
 
 
The minimum value to meet the range condition ( >= )
 
 
 
<span style="font-weight: normal;"><u>Max Value</u></span>
 
 
 
This property is of type ''Floating point'' and can be referenced with the variable name ''MaxVal3''.
 
 
 
The maximum value to meet the range condition ( < )
 
 
 
<span style="font-weight: normal;"><u>Foreground Colour</u></span>
 
 
 
This property is of type ''Color picker with transparency'' and can be referenced with the variable name ''FgCol3''.
 
 
 
The label foreground Text colour when in the specified range
 
 
 
<span style="font-weight: normal;"><u>Background Colour</u></span>
 
 
 
This property is of type ''Color picker with transparency'' and can be referenced with the variable name ''BgCol3''.
 
 
 
The label background highlight colour when in the specified range
 
 
 
<span style="font-weight: normal;"><u>Min Value</u></span>
 
 
 
This property is of type ''Floating point'' and can be referenced with the variable name ''MinVal4''.
 
 
 
The minimum value to meet the range condition ( >= )
 
 
 
<span style="font-weight: normal;"><u>Max Value</u></span>
 
 
 
This property is of type ''Floating point'' and can be referenced with the variable name ''MaxVal4''.
 
 
 
The maximum value to meet the range condition ( < )
 
 
 
<span style="font-weight: normal;"><u>Foreground Colour</u></span>
 
 
 
This property is of type ''Color picker with transparency'' and can be referenced with the variable name ''FgCol4''.
 
 
 
The label foreground Text colour when in the specified range
 
 
 
<span style="font-weight: normal;"><u>Background Colour</u></span>
 
 
 
This property is of type ''Color picker with transparency'' and can be referenced with the variable name ''BgCol4''.
 
 
 
The label background highlight colour when in the specified range
 
 
 
<span style="font-weight: normal;"><u>Min Value</u></span>
 
 
 
This property is of type ''Floating point'' and can be referenced with the variable name ''MinVal5''.
 
 
 
The minimum value to meet the range condition ( >= )
 
 
 
<span style="font-weight: normal;"><u>Max Value</u></span>
 
 
 
This property is of type ''Floating point'' and can be referenced with the variable name ''MaxVal5''.
 
 
 
The maximum value to meet the range condition ( < )
 
 
 
<span style="font-weight: normal;"><u>Foreground Colour</u></span>
 
 
 
This property is of type ''Color picker with transparency'' and can be referenced with the variable name ''FgCol5''.
 
 
 
The label foreground Text colour when in the specified range
 
 
 
<span style="font-weight: normal;"><u>Background Colour</u></span>
 
 
 
This property is of type ''Color picker with transparency'' and can be referenced with the variable name ''BgCol5''.
 
 
 
The label background highlight colour when in the specified range
 

Latest revision as of 13:08, 7 February 2023

Author Matrix TSL
Version 1.0
Category Indicators


Numeric Display component

Allows a numeric value to be displayed on the user panel using virtual 7 seg displays. Used for displaying the value of a variable during simulation runtime. Provides up to 5 customisable ranges to automatically alter the colour of the label based on the value.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_7SegNumeric.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_7SegNumeric.fcfx

Detailed description

No detailed description exists yet for this component

Examples

An example of a numeric display changing colour set out within the display properties


FC6 Icon.png Basic Numeric Display Example






Macro reference

DisplayAsInt

Fc9-comp-macro.png DisplayAsInt
Displays an integer value on the label. Capable of displaying positive and negative values. 
Fc9-s32-icon.png - LONG Value
Integer value to display 
Fc9-void-icon.png - VOID Return


DisplayAsReal

Fc9-comp-macro.png DisplayAsReal
Displays a floating point value on the label with a confiiguarable number of decimal points 
Fc9-f32-icon.png - FLOAT Value
Real floating point value to display 
Fc9-u8-icon.png - BYTE Precision
Number of decimal point values to show e.g. 2 = 0.00 
Fc9-void-icon.png - VOID Return


SetBackgroundColour

Fc9-comp-macro.png SetBackgroundColour
Allows the user to manually specify the default colour of the background. 
Fc9-s32-icon.png - LONG Colour
RGB colour in the hexadecimal form 0xBBGGRR 
Fc9-void-icon.png - VOID Return


SetForegroundColour

Fc9-comp-macro.png SetForegroundColour
Allows the user to manually specify the default colour of the foreground text. 
Fc9-s32-icon.png - LONG Colour
RGB colour in the hexadecimal form 0xBBGGRR 
Fc9-void-icon.png - VOID Return


Property reference

Fc9-prop-icon.png Properties
Fc9-conn-icon.png Title
Fc9-type-7-icon.png Show Title
Decides if the title is shown on the panel. 
Fc9-type-10-icon.png Title Text
Specifies the title displayed on the panel. 
Fc9-type-15-icon.png Title Scale
Specifies the size of the title on the panel, default 1.2  
Fc9-type-2-icon.png Title Colour
Specifies the colour of the title text 
Fc9-type-15-icon.png Title Offset
Distance above component center to draw the title 
Fc9-conn-icon.png Display Properties
Fc9-type-16-icon.png Number of Digits
Number of digits in the indicator. The number of digits sets the range available For example 4 Digits can display 0000 to 9999, out of range items will be shown as - - - - 
Fc9-type-16-icon.png Colour Ranges
Allows ranges to be specified to automatically format the foreground and background colours based on the numeric value 
Fc9-conn-icon.png Defaults
Fc9-type-2-icon.png Foreground Colour
The label foreground Text colour 
Fc9-type-2-icon.png Background Colour
The label background Surrounding colour