Sutron Corporation X-Link Operations & Maintenance Manual, Rev 1.63 5/24/2016 pg. 74
The field
Use Equations
can be set to enabled or to disabled. It determines
whether equation processing is to be applied to the raw data. The field
Equation
can be set to an ASCII string no longer than 128 bytes (per measurement). That
field contains the equation to be applied.
If both
Equations
and
Slope
and
Offset
are used,
Slope
and
Offset
are applied
after the equation is processed.
For example, to convert Fahrenheit to Celsius, type into command line:
M1 EQUATION = (X-32.0)*5/9
In the example above, X refers to the sensor reading.
Equation processing can take a while to complete (up to several seconds). If
you are using a lengthy equation, X-Link may not be able to complete a
measurement every second, or even every two seconds (see
Bad Schedule
in
the Error section).
7.1.3.5.
Equation Syntax
The equation is expressed in terms of X which will be applied to incoming sensor
data. You may also reference each measurement by its label or by the M1, M2...
designator. The expression is not case sensitive.
The following functions are available:
SIN, COS, TAN, ARCTAN, e.g. COS(90) = 0
SQRT is square root, e.g. SQRT(9) = 3
To raise a number to a power, use ^. For example X^2 is x squared. 2^X is 2 to
the power of X.
EXP, if EXP(x) = y, then LN(y) = x, e.g. EXP(1) = 2.718282
LN, natural log, e.g. LN(2.718282) = 1
LOG, 10 based log, e.g. LOG(10) = 1
INT returns the integral portion of a real number
INT(11.456) = 11.000 INT(-1.345) = -1.000
FRACT returns the fractional portion of a real number.
FRACT(11.456) = 0.456 FRACT(-1.345) = -0.345