Jump to content

Component: Control Knob (Controls): Difference between revisions

From Flowcode Help
XML import
 
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder""
 
(18 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 Ltd
| Matrix Ltd
|-
|-
| width="20%" style="color: gray;" | Version
| width="20%" style="color:gray;" | Version
| 1.3 (Release)
| 1.3
|-
|-
| width="20%" style="color: gray;" | Category
| width="20%" style="color:gray;" | Category
| Controls
| Controls
|}
|}




==Control Knob component==
Rotary control designed for SCADA. Has customisable value markings around the control. Simulation only.


==[[File:Component Icon 1f50402b_cc0b_468c_a329_5108c448e263.png|Image]] Control Knob component==
==Component Source Code==
Rotary control designed for SCADA.
Has customisable value markings around the control.
Simulation only.


==Examples==
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_ControlKnob.fcfx FC_Comp_Source_ControlKnob.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_ControlKnob.fcfx FC_Comp_Source_ControlKnob.fcfx]


==Downloadable macro reference==
==Detailed description==


''This component does not contain any downloadable macros''


==Simulation macro reference==


===<span style="font-weight: normal;"><u><tt>GetValue</tt></u></span>===
Get the current scale value - this will be the most recent value set using "SetValue", or from the most recent mouse click if the component is in "Control"


mode.


'''Parameters'''


:''This macro has no parameters''




'''Return value'''


:[[Variable Types|FLOAT]]




===<span style="font-weight: normal;"><u><tt>SetValue</tt></u></span>===
Set the pointer to the given value on the scale.  Returns the angle required to point at the given value.


'''Parameters'''


:[[Variable Types|FLOAT]] ''Value''
::The value on the scale to move the pointer to.




'''Return value'''


:[[Variable Types|FLOAT]]


''No detailed description exists yet for this component''


==Examples==




==Property reference==
<span style="font-weight: normal;"><u>Minimum</u></span>


This property is of type ''Floating point'' and can be referenced with the variable name ''val_min''.


The minimum value that the knob will output (fully counter_clockwise)


<span style="font-weight: normal;"><u>Maximum</u></span>


This property is of type ''Floating point'' and can be referenced with the variable name ''val_max''.


The maximum value that the knob will output (fully clockwise)


<span style="font-weight: normal;"><u>Startup State</u></span>


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


Sets the initial value when loading the project or when the runtime starts.


<span style="font-weight: normal;"><u>Default Value</u></span>


This property is of type ''Floating point'' and can be referenced with the variable name ''DefaultValue''.


The default value used on initialise or runtime start.


<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 component title is shown


<span style="font-weight: normal;"><u>Title Colour</u></span>


This property is of type ''Color picker'' and can be referenced with the variable name ''TitleColour''.
''<span style="color:red;">No additional examples</span>''


Title Label Color


<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 ''TitleText''.


Title Label Text


<span style="font-weight: normal;"><u>Title Scale</u></span>


This property is of type ''Floating point'' and can be referenced with the variable name ''TitleScale''.


Controls the size of the title text on the panel, default 1.2


<span style="font-weight: normal;"><u>Show Label</u></span>


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


Decides if a label is shown detailing current setting of the control knob.


<span style="font-weight: normal;"><u>Label Colour</u></span>


This property is of type ''Color picker'' and can be referenced with the variable name ''LabelColour''.
==Macro reference==


Sets the label colour
===GetValue===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''GetValue'''
|-
| colspan="2" | Get the current scale value - this will be the most recent value set using "SetValue", or from the most recent mouse click if the component is in "Control" mode.&nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


<span style="font-weight: normal;"><u>Label Units</u></span>


This property is of type ''Line of text'' and can be referenced with the variable name ''LabelUnits''.
===SetValue===
{| class="mtx-class-macrotable wikitable"
|-
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]]
| width="90%" class="mtx-class-macrohead" | '''SetValue'''
|-
| colspan="2" | Set the pointer to the given value on the scale.  Returns the angle required to point at the given value.&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" | Value
|-
| colspan="2" | The value on the scale to move the pointer to.&nbsp;
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}


Adds a unit to the end of the label


<span style="font-weight: normal;"><u>Label Decimal Points</u></span>
==Property reference==


This property is of type ''Unsigned integer'' and can be referenced with the variable name ''LabelDecPoints''.
{| class="mtx-class-macrotable wikitable"
 
|-
Number of decinal points to draw on the label
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]]
 
| width="90%" class="mtx-class-macrohead" | '''Properties'''  
<span style="font-weight: normal;"><u>Label Scale</u></span>
|-
 
|-
This property is of type ''Floating point'' and can be referenced with the variable name ''LabelScale''.
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
 
| width="90%" class="mtx-class-propfolder" | Range
Sets the size of the label on the panel, default 1.0
|-
 
|-
<span style="font-weight: normal;"><u>Decimals</u></span>
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
 
| width="90%" | Minimum
This property is of type ''Signed integer'' and can be referenced with the variable name ''dec_places''.
|-
 
| colspan="2" | The minimum value that the knob will output (fully counter_clockwise)&nbsp;
How many decimal places to show on the number labels.
|-
 
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
<span style="font-weight: normal;"><u>Text Size %</u></span>
| width="90%" | Maximum
 
|-
This property is of type ''Signed integer'' and can be referenced with the variable name ''num_size''.
| colspan="2" | The maximum value that the knob will output (fully clockwise)&nbsp;
 
|-
Height of the number label text.
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
| width="90%" | Startup State
<span style="font-weight: normal;"><u>Font</u></span>
|-
 
| colspan="2" | Sets the initial value when loading the project or when the runtime starts.&nbsp;
This property is of type ''Font picker'' and can be referenced with the variable name ''num_font''.
|-
 
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
Font for the number labels.
| width="90%" | Default Value
 
|-
<span style="font-weight: normal;"><u>Divisions</u></span>
| colspan="2" | The default value used on initialise or runtime start.&nbsp;
 
|-
This property is of type ''Signed integer'' and can be referenced with the variable name ''marks_count''.
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
 
| width="90%" class="mtx-class-propfolder" | Title
Number of labelled positions around the knob.
|-
 
|-
<span style="font-weight: normal;"><u>Subdivisions</u></span>
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 
| width="90%" | Show Title
This property is of type ''Signed integer'' and can be referenced with the variable name ''marks_subdiv''.
|-
 
| colspan="2" | Decides if the component title is shown&nbsp;
Number of divisions between the numbered ones.
|-
 
| width="10%" align="center" | [[File:Fc9-type-1-icon.png]]
<span style="font-weight: normal;"><u>BG Color</u></span>
| width="90%" | Title Colour
 
|-
This property is of type ''Color picker with transparency'' and can be referenced with the variable name ''bg_color''.
| colspan="2" | Title Label Color&nbsp;
 
|-
Background colour behind the knob labelling - may be transparent.
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
 
| width="90%" | Title Text
<span style="font-weight: normal;"><u>Positive Color</u></span>
|-
 
| colspan="2" | Title Label Text&nbsp;
This property is of type ''Color picker'' and can be referenced with the variable name ''ink_color''.
|-
 
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
Colour for number labels which are less than zero.
| width="90%" | Title Scale
 
|-
<span style="font-weight: normal;"><u>Negative Color</u></span>
| colspan="2" | Controls the size of the title text on the panel, default 1.2&nbsp;
 
|-
This property is of type ''Color picker'' and can be referenced with the variable name ''neg_color''.
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
 
| width="90%" | Title Offset
Colour for number labels which are greater than zero.
|-
 
| colspan="2" | Distance above component center to draw the title&nbsp;
<span style="font-weight: normal;"><u>Pointer Colour</u></span>
|-
 
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
This property is of type ''Color picker'' and can be referenced with the variable name ''NeedleColor''.
| width="90%" class="mtx-class-propfolder" | Label
 
|-
''<span style="color:red;">No additional information</span>''
|-
 
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 
| width="90%" | Show Label
 
|-
<span style="font-weight: normal;"><u>Show Buttons</u></span>
| colspan="2" | Decides if a label is shown detailing current setting of the control knob.&nbsp;
 
|-
This property is of type ''True or false'' and can be referenced with the variable name ''scale_arc::ShowButtons''.
| width="10%" align="center" | [[File:Fc9-type-1-icon.png]]
 
| width="90%" | Label Colour
Controls if the adjustment buttons are shown on the scale arc or not.
|-
 
| colspan="2" | Sets the label colour&nbsp;
<span style="font-weight: normal;"><u>Button Color</u></span>
|-
 
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
This property is of type ''Color picker'' and can be referenced with the variable name ''scale_arc::label_color''.
| width="90%" | Label Units
 
|-
Color for the component label text.
| colspan="2" | Adds a unit to the end of the label&nbsp;
 
|-
<span style="font-weight: normal;"><u>Adjustment Value</u></span>
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 
| width="90%" | Label Decimal Points
This property is of type ''Floating point'' and can be referenced with the variable name ''scale_arc::ButtonAdjustment''.
|-
 
| colspan="2" | Number of decinal points to draw on the label&nbsp;
Sets the button adjustment value, will round the value to the nearest whole adjustment.
|-
 
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
For example with an adjustment of 1,0 the adjustment buttons will jump to the next whole number.
| width="90%" | Label Scale
|-
| colspan="2" | Sets the size of the label on the panel, default 1.0&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
| width="90%" | Label Offset
|-
| colspan="2" | Distance above component center to draw the label&nbsp;
|-
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" class="mtx-class-propfolder" | Numeric Labels
|-
|-
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
| width="90%" | Decimals
|-
| colspan="2" | How many decimal places to show on the number labels.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
| width="90%" | Text Size %
|-
| colspan="2" | Height of the number label text.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-3-icon.png]]
| width="90%" | Font
|-
| colspan="2" | Font for the number labels.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
| width="90%" | Divisions
|-
| colspan="2" | Number of labelled positions around the knob.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
| width="90%" | Subdivisions
|-
| colspan="2" | Number of divisions between the numbered ones.&nbsp;
|-
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" class="mtx-class-propfolder" | Scheme
|-
|-
| width="10%" align="center" | [[File:Fc9-type-2-icon.png]]
| width="90%" | BG Color
|-
| colspan="2" | Background colour behind the knob labelling - may be transparent.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-1-icon.png]]
| width="90%" | Positive Color
|-
| colspan="2" | Colour for number labels which are less than zero.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-1-icon.png]]
| width="90%" | Negative Color
|-
| colspan="2" | Colour for number labels which are greater than zero.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-1-icon.png]]
| width="90%" | Pointer Colour
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]]
| width="90%" class="mtx-class-propfolder" | Buttons
|-
|-
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| width="90%" | Show Buttons
|-
| colspan="2" | Controls if the adjustment buttons are shown on the scale arc or not.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-1-icon.png]]
| width="90%" | Button Color
|-
| colspan="2" | Color for the component label text.&nbsp;
|-
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
| width="90%" | Adjustment Value
|-
| colspan="2" | Sets the button adjustment value, will round the value to the nearest whole adjustment. For example with an adjustment of 1,0 the adjustment buttons will jump to the next whole number.&nbsp;
|}

Latest revision as of 14:37, 13 July 2026

Author Matrix Ltd
Version 1.3
Category Controls


Control Knob component

Rotary control designed for SCADA. Has customisable value markings around the control. Simulation only.

Component Source Code

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

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

Detailed description

No detailed description exists yet for this component

Examples

No additional examples







Macro reference

GetValue

GetValue
Get the current scale value - this will be the most recent value set using "SetValue", or from the most recent mouse click if the component is in "Control" mode. 
- FLOAT Return


SetValue

SetValue
Set the pointer to the given value on the scale. Returns the angle required to point at the given value. 
- FLOAT Value
The value on the scale to move the pointer to. 
- FLOAT Return


Property reference

Properties
Range
Minimum
The minimum value that the knob will output (fully counter_clockwise) 
Maximum
The maximum value that the knob will output (fully clockwise) 
Startup State
Sets the initial value when loading the project or when the runtime starts. 
Default Value
The default value used on initialise or runtime start. 
Title
Show Title
Decides if the component title is shown 
Title Colour
Title Label Color 
Title Text
Title Label Text 
Title Scale
Controls the size of the title text on the panel, default 1.2 
Title Offset
Distance above component center to draw the title 
Label
Show Label
Decides if a label is shown detailing current setting of the control knob. 
Label Colour
Sets the label colour 
Label Units
Adds a unit to the end of the label 
Label Decimal Points
Number of decinal points to draw on the label 
Label Scale
Sets the size of the label on the panel, default 1.0 
Label Offset
Distance above component center to draw the label 
Numeric Labels
Decimals
How many decimal places to show on the number labels. 
Text Size %
Height of the number label text. 
Font
Font for the number labels. 
Divisions
Number of labelled positions around the knob. 
Subdivisions
Number of divisions between the numbered ones. 
Scheme
BG Color
Background colour behind the knob labelling - may be transparent. 
Positive Color
Colour for number labels which are less than zero. 
Negative Color
Colour for number labels which are greater than zero. 
Pointer Colour
 
Buttons
Show Buttons
Controls if the adjustment buttons are shown on the scale arc or not. 
Button Color
Color for the component label text. 
Adjustment Value
Sets the button adjustment value, will round the value to the nearest whole adjustment. For example with an adjustment of 1,0 the adjustment buttons will jump to the next whole number.