8-10
IM 765501-01E
User-Definition Computation Syntax
The measured result is entered in variable M. The computed result can be substituted
into variable M to further carry out computation.
For example, if you wish to display the result of subtracting 0.75 from 1.25 times the
measured value, write the equation as follows:
M = M*1.25 – 0.75
The available binary operators are listed below.
Symbol
Meaning
+
Addition
–
Subtraction
*
Multiplication
/
Division
%
Modulo (the remainder of an integer division operation)
^
Power
<
Less than
<=
Less than or equal to
>
Greater than
>=
Greater than or equal to
==
Equal to
!=
Not equal to
and
Logical product
or
Logical sum
xor
Exclusive OR
The following two unary operators are available.
Symbol
Meaning
not
Not
-
Negation
Equations using functions can also be written.
For example, if you wish to compute the absolute value of the measured value, you can
use the absolute value function ABS() as follows:
M = ABS(M)
The available functions are listed below.
Function
Meaning
ABC(n)
Absolute value of n
EXP(n)
e to the n power
LN(n)
Natural logarithm of n
LOG(n)
Common logarithm of n
SQRT(n)
Square root of n
SIN(n)
Sine of n
COS(n)
Cosine of n
TAN(n)
Tangent of n
ASIN(n)
Arc sine of n
ACOS(n)
Arc cosine of n
ATAN(n)
Arc tangent of n
SINH(n)
Hyperbolic sine of n
COSH(n)
Hyperbolic cosine of n
TANH(n)
Hyperbolic tangent of n
RAND()
Random number between 0 and 1
RAND(n)
Random number between 0 and 1 using n as a seed
TRUNC(n)
Truncate n to an integer toward 0
EDGE(n)
1 when n changes from zero to a non-zero value, otherwise 0
MKTIME(n)
Convert string n to the same format as the time stamp
8.5 User-Defined Computation