mod_basicelements

From Sohatex CRIISTAL Wiki
Jump to: navigation, search

This module provides some basic control and indicator elements for use with the mod_dyngui customizable user interface.

Button

Button.pngButtonConfig.png

The "Button" control sets a variable [2] to a specified on-value [3] while the left mouse button is clicked on the button. When the mouse button is released, the variable is set to a specified off-value [4]. The current state is reflected by the background color of the button which can be set in [4] and [6]. The button shows a specified title [1].

If the value of the variable is otherwise changed, the button appears in off-state in the range of {-Inf, (on+off)/2} and in on-state at any value greater than (on+off)/2. The following image shows an example of how the states are shown.

SwitchOnOffRange.png

The controlled variable can be changed by dragging a variable from the Variable Window and dropping it onto the variable name field [2] or by changing the field directly.

Changed settings will be applied immediately and saved when closing the window.

Graph

Graph.pngGraphConfig.png

The "Graph" indicator allows to show trends for up to seven variables by drawing a diagram of the variable values over time into the diagram field [3]. It features a custom title [1,9], a fixed Y-scaling [2,13,14] or auto-scaling [4,16], a pause-function [5], a one-time-autoscale [6] and a button to clear the diagram [7].

The data table [8] below the diagram shows all contained variables with their respective units and values. If the control is resized under a certain width, the "Unit" column collapses to allow the value to be correctly displayed. The "Digits"-Setting [13] allows to change how many digits are to be displayed in the data table. By selecting a line in the data table, the corresponding plot in the diagram [3] will be highlighted, until the mouse cursor leaves the area of the data table.

Directly above the data table [8] is a moveable separator to allow the display of more than three variables in the table at the same time.

Each plot consists of the variable to be displayed [10] and its color [11]. Plots can be added by dragging a variable from the Variable Window and dropping it onto one of the variable name fields [10]. To remove a plot from the graph, the delete button [12] next to the plot can be used.

Changed settings can be saved [17,18] or cancelled by pressing the cancel button [19] or closing the window.

Numeric

Numeric.pngNumericConfig.png

The "Numeric" element can be used both as an indicator and as a control. It displays a title [1,3] and the current value [2] of the specified variable [4]. The "Digits" field specifies, how many digits should be displayed in the element.

By changing the indicator/control button [11], the behaviour of the element can be switched between a control mode, where changes to the variable value are possible, and an indicator mode, where changes to the value are not possible, but the current value is still displayed. When the element is in control-mode, values in the range of the "Range" fields [7,8] with an increment specified in the "Increment" field [6] can be set in the control. The range has higher priority than the increment. The following table shows a comparison of settings, entered values and effective values:

Min Max Increment Entered Effective
-10 10 0 0.123 0.123
-10 10 0.05 0.123 0.1
-10 10 0.05 0.13 0.15
-10 10 0.1 0.123 0.1
-10 10 20 1 10
-10 10 20 -1 -10

By changing the "Up/Down"-setting [10], up/down buttons can be shown or hidden on the left side of the numeric control. This buttons change the value of the variable by the set increment value [6].

Additionally, the numeric can be added a "Startup value" [9]. When CRIISTAL starts and the connected variable has a NaN value and when the "Startup value" setting is not NaN, the variable is set to this value. Note: This behaviour is scheduled to be ported to a separate module and might be removed in future releases of CRIISTAL.

The background color of the element changes in accordance to eg. threshold settings as in mod_threshold.

As an additional special feature, both the title and the numeric display are scaled when resizing the element thus allowing the user to change the font size of the display.

The controlled / indicated variable can be changed by dragging a variable from the Variable Window and dropping it onto the variable name field [4] or by changing the field directly.

Changed settings will be applied immediately and saved when closing the window.

Round

Round.pngRoundConfig.png

The "Round" indicator shows the value of a single variable by means of a circular instrument [2]. Additionally, the value is displayed below in a numeric manner [4]. The number of digits to display in the numeric field can be changed in the settings [9].

It features a custom title [1,5] and a fixed scaling [3,7,8], which can be changed in the control directly [3] while the user interface is in the locked-state.

The colors of both the needle and the background of the circular instrument can be changed in the control settings [10,11].

The background color of the numeric display changes in accordance to eg. threshold settings as in mod_threshold.

The displayed variable can be changed by dragging a variable from the Variable Window and dropping it onto the variable name field [6].

Changed settings can be saved [12,13] or cancelled by pressing the cancel button [14] or closing the window.

Slider

Slider.pngSliderConfig.png

The "Slider" control allows changing the value of a variable by using a sliding control [2] which needle canbe dragged between a minimum and a maximum value. It also displays a title [1,3].

The range of the slider is determined by the minimum and maximum values [5,6]. It has an increment field [7] which works analogus to the settings of the Numeric element.

The background color of the slider can be changed by the "Background" setting [8].

The controlled variable can be changed by dragging a variable from the Variable Window and dropping it onto the variable name field [4] or by changing the field directly.

Changed settings will be applied immediately and saved when closing the window.

Note: if in the sliding element [2], the needle is on the right side while the background fill is on the left side (like in the image above), the control is currently displaying a NaN value.

Switch

Switch.pngSwitchConfig.png

The "Switch" control works analogous to the Button control, except that the value is kept at the on value after left-clicking the control and turned off by clicking the control again.

Table

Table.pngTableConfig.png

The "Table" indicator shows the values of multiple variables. It presents with a title [1,5] and a list of variables [2,6], units[3] and values [4].

The "Digits" field [7] allows to shange how many digits are to be displayed in the value column of the table [4].

Lines can be added to the table by drag-and-dropping them from the Variable List and can be removed by marking the lines and pressing the Delete button on the keyboard ("Delete", "Del", german "Entf", etc.).

The background colors of lines change in accordance to eg. threshold settings as in mod_threshold.

Changed settings will be applied immediately and saved when closing the window.

Tank

Tank.pngTankConfig.png

The "Tank" indicator shows the value of a single variable [4] by means of both a tank-like indicator [2] as well as a digital display [3].

The scale of the tank [5,6], the digits to display in the digital display [7] and the color of the tank fill [8] can be changed.

Changed settings will be applied immediately and saved when closing the window.

Textbox

Textbox.pngTextboxConfig.png

The Textbox control is way to display some text [1] on the user interface. This helps for example in grouping controls or displaying help information.

The text to be displayed [2] can be set in the settings of the control. By switching the control to an "Indicator only" [3], editing the text on the locked user interface is not permitted. Additionally, the text font size [4] and the text justification [5] can be set.

Changed settings will be applied immediately and saved when closing the window.

XY-Graph

XYGraph.pngXYGraphConfig.png

The XY-Graph allows the display of up to eight plots on custom X- [3,7] and Y-axis [2,8]. Additionally, a title [1,6] is displayed and the graph can be cleared by clicking the Clear button [5].

For each Plot, the X variable [9], the Y variable [10] and the color [11] can be set. Both the X and the Y axis have a scaling [12, 13].

[14] and [15] determine, how much data is displayed in the graph. For example, if "Points to display" is 500 and "Time between Points" is 100, the display is updated at a rate of 10Hz and a total of 500 points (then meaning a time of 50 seconds) is displayed.

Changed settings will be applied immediately and saved when closing the window.

Video Tutorial