Component: Control Knob (Controls)

From Flowcode Help
Jump to navigationJump to search


Author Matrix Ltd
Version 1.3 (Release)
Category Controls


Image Control Knob component

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

Examples

No additional examples


Downloadable macro reference

This component does not contain any downloadable macros

Simulation macro reference

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.

Parameters

This macro has no parameters


Return value

FLOAT


SetValue

Set the pointer to the given value on the scale. Returns the angle required to point at the given value.

Parameters

FLOAT Value
The value on the scale to move the pointer to.


Return value

FLOAT



Property reference

Minimum

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)

Maximum

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)

Startup State

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.

Default Value

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.

Show Title

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

Decides if the component title is shown

Title Colour

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

Title Label Color

Title Text

This property is of type Line of text and can be referenced with the variable name TitleText.

Title Label Text

Title Scale

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

Show Label

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.

Label Colour

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

Sets the label colour

Label Units

This property is of type Line of text and can be referenced with the variable name LabelUnits.

Adds a unit to the end of the label

Label Decimal Points

This property is of type Unsigned integer and can be referenced with the variable name LabelDecPoints.

Number of decinal points to draw on the label

Label Scale

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

Sets the size of the label on the panel, default 1.0

Decimals

This property is of type Signed integer and can be referenced with the variable name dec_places.

How many decimal places to show on the number labels.

Text Size %

This property is of type Signed integer and can be referenced with the variable name num_size.

Height of the number label text.

Font

This property is of type Font picker and can be referenced with the variable name num_font.

Font for the number labels.

Divisions

This property is of type Signed integer and can be referenced with the variable name marks_count.

Number of labelled positions around the knob.

Subdivisions

This property is of type Signed integer and can be referenced with the variable name marks_subdiv.

Number of divisions between the numbered ones.

BG Color

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

Background colour behind the knob labelling - may be transparent.

Positive Color

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

Colour for number labels which are less than zero.

Negative Color

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

Colour for number labels which are greater than zero.

Pointer Colour

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

No additional information


Show Buttons

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

Controls if the adjustment buttons are shown on the scale arc or not.

Button Color

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

Color for the component label text.

Adjustment Value

This property is of type Floating point and can be referenced with the variable name scale_arc::ButtonAdjustment.

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.