Numeric and Text Fields
webHMI supports fields for displaying and inputting numeric and text values.
Numeric Fields
HTML elements bound to numeric machine values will be updated any time they are visible. Options are available for scaling the value, formatting its display, and adding unit text. If the machine value is bound to an input, it will be written any time the input value changes.
Class name: webhmi-num-value
Attribute | Description | Default Value |
---|---|---|
data-unit-factor | Multiplication factor for unit scaling | 1 |
data-unit-offset | Offset for unit scaling | 0 |
data-unit-text | Text label to display after the value | |
data-fixed | Number of digits after the decimal place to display in fixed-point notation | |
data-precision | Number of significant digits to display with a specified precision | |
data-exponent | Number of digits after the decimal to display in exponential notation | |
data-prevent-drag | Prevents continuous update while dragging. Only applies to inputs with on drag event (ranges) | false |
data-pad | ??? |
Unit Scaling Formulae
Display Value = Machine Value * data-unit-factor + data-unit-offset Machine Value = (Display Value - data-unit-offset) / data-unit-factor
Text Fields
HTML elements bound to textual machine values will be updated any time they are visible. If the machine value is bound to an input, it will be written any time the input value changes.
Class name: webhmi-text-value