The following operators are supported:
+ |
Addition |
- |
Subtraction |
* |
Multiplication |
/ |
Division |
% |
Modulus |
^ |
Power (7^3 equates to 7 cubed) |
Note: Operators are evaluated in the order : ^ % / * - +.
Tip: The use of parentheses (i.e. "(" or ")") can be used to control how operators are applied.
The following functions are supported:
abs(x) |
Returns the absolute value |
acos(x) |
Arc-Cosine of x |
asin(x) |
Arc-Sine of x |
atan(x) |
Arc-Tangent of x |
cos(x) |
Cosine of x (x is in degrees) |
cosh(x) |
Hyperbolic Cosine of x |
delta(x) |
The difference in value between the current time and the previous sample. |
exp(x) |
Exponential function |
log10(x) |
Base 10 log of x |
log(x) |
Natural log of x |
sin(x) |
Sine of x (x is in degrees) |
sinh(x) |
Hyperbolic Sine of x |
sqrt(x) |
Square root of x |
tan(x) |
Tangent of x (x is in degrees) |
tanh(x) |
Hyperbolic Tangent of x |
Where a Sapphire Collector is being used as a Data Source, the OPC Item Alias name can be used when specifying a virtual item instead of the fully qualified item name.
For example, where an SDR contains an item called "day.seconds" which has an Alias of "DSecs", the following can be entered into the formula field to reference the item:
"ALIAS:DSecs"
Tip: This can be extremely useful for name spaces with particularly long item names.
Note: This same syntax can also be used when manually adding items to a plot file, for example ITEM=ALIAS:DSecs.