smartVISU
21:26,18.04, v2.7

Basic-Widgets

basic.button basic.checkbox basic.colordisc basic.dual basic.flip basic.float basic.formula basic.glue basic.rgb basic.shifter basic.shutter basic.slider basic.switch basic.symbol basic.tank basic.text basic.trigger basic.value


basic.formula

calculate values and display

Parameters
{{basic.formula(id, gad, unit, formula) }}
id
unique id for this widget
gad
one or more gad(s)/item(s). More gads/items in array form: [ item1 , item2 ]
unit
unit for displaying (optional, default '')
formula
formula to use: SUM(VAR), AVG(VAR), SUB(VAR), your own, (optional, default: SUM(VAR))
Example
{{ basic.formula('formula1', ['bath_value'], 'V') }}<br />
{{ basic.formula('formula2', ['bath_p1', 'bath_p2', 'bath_p3'], 'W', 'SUM( VAR )') }}<br />
{{ basic.formula('formula3', ['bath_p1', 'bath_p2', 'bath_p3'], 'W', 'AVG( VAR ) * 3 / 100') }}<br />
{{ basic.formula('formula4', 'bath_value', 'Mwh') }}<br />
a voltage: ---
actual power: ---
some calc: ---
a unknown unit: ---

Author:Raik Alber

Widgets

Design

Misc