Profile™ is a trademark of Ambrit Ltd
© 2019 Ambrit Ltd
N.B. This must be performed on the server.
Fields can have formulas associated with them to allow simple arithmetic functions to be applied before they are displayed or written to.
See the Adding a Field to a Configuration section for more details.
Formulas have the following syntax:
where expression is a mathematical formula, e.g.:
Any field from any of the RTU can be selected and can be included in the calculation, e.g.:
Multiple fields can also be included in the calculation, e.g.:
value:=field("Net Flow Rate")-field(Gross Flow Rate")
Variables can be declared and used as part of the calculation, e.g.:
var a := 2; var b := 3; value := a + b;
If statements can also be written to display a value based on a Boolean expression being satisfied.The following formula returns how far a value is outside of its two limit fields:
var temperature := field("Temperature"); var high_temperature := field("Temp Hi-Lim"); if (temperature > high_temperature) value := temperature - high_temperature; else var low_temperature := field("Temp Lo-Lim"); if (temperature < low_temperature) value := temperature - low_temperature; else value := 0; end if end if
The calculation can include any of the following operators. A full list is available in the operator popup menu.
|#||Not Equal to|
|<=||Greater Than or Equal to|
|>=||Less Than or Equal to|
If the formula is entered correctly a message will be displayed saying “This formula is OK!”.
Note: Write Formulas are exactly the same as read formulas except that the variable used to write the return variable is “writevalue” rather than “value”. The line requires a “;” at the end of the formula. e.g.
This will return to the main configuration page.
This make the configuration changes active.