App-4
IM 765501-01E
Appendix 1 Computation Definition Specifications
Strings
Characters enclosed with double quotations
Used as a command execution statement or as a parameter for MKTIME().
Example
@”:SOURCE:VOLTAGE:LEVEL 12.5V”
MKTIME(“2005/12/25 18:30”)
Operators
<exp1> + <exp2>:
Addition
<exp1> - <exp2>:
Subtraction
<exp1> * <exp2>:
Multiplication
<exp1> / <exp2>:
Division
<exp1> % <exp2>:
Modulo (the remainder of an integer division operation)
<exp1> ^ <exp2>:
<exp1> to the power of <exp2>
<exp1> < <exp2>:
1 if <exp1> is less than <exp2>, or 0 otherwise
<exp1> <= <exp2>:
1 if <exp1> is less than or equal to <exp2>, or 0 otherwise
<exp1> >= <exp2>:
1 if <exp1> is greater than or equal to <exp2>, or 0 otherwise
<exp1> > <exp2>:
1 if <exp1> is greater than <exp2>, or 0 otherwise
<exp1> == <exp2>:
1 if <exp1> is equal to <exp2>, or 0 otherwise
<exp1> != <exp2>:
1 if <exp1> is not equal to <exp2>, or 0 otherwise
<exp1> AND <exp2>:
1 if <exp1> is nonzero and <exp2> is nonzero, or 0 otherwise
<exp1> OR <exp2>:
1 if <exp1> is nonzero or <exp2> is nonzero, or 0 otherwise
<exp1> XOR <exp2>:
1 if <exp1> is nonzero and <exp2> is 0 or <exp1> is 0 and
<exp2> is nonzero, or 0 otherwise
NOT <exp>:
1 if <exp> is 0, 0 otherwise
- <exp>:
Negation
Functions
RAND(<exp>):
Random number between 0 and 1 using <exp> as a seed.
RAND( ):
Random number between 0 and 1
EDGE(<exp>):
1 when <exp> changes from 0 to nonzero, 0 otherwise
ABS(<exp>):
Absolute value of <exp>
EXP(<exp>):
E to the power of <exp>
LN(<exp>):
Natural logarithm of <exp>
LOG(<exp>):
Common logarithm of <exp>
SQRT(<exp>):
Square root of <exp>
SIN(<exp>):
Sine of <exp>
COS(<exp>):
Cosine of <exp>
TAN(<exp>):
Tangent of <exp>
ASIN(<exp>):
Arc sine of <exp>
ACOS(<exp>):
Arc cosine of <exp>
ATAN(<exp>):
Arc tangent of <exp>
SINH(<exp>):
Hyperbolic sine of <exp>
COSH(<exp>):
Hyperbolic cosine of <exp>
TANH(<exp>):
Hyperbolic tangent of <exp>
TRUNC(<exp>):
Truncate <exp>
MKTIME(<string>):
Convert the date/time expressed by <string> to the same format
as the time stamp
Format: [yyyy/mm/dd] hh:mm[:ss]
Interpreted as the current year, month and day if yyyy/mm/dd is
omitted.
Interpreted as :00 is :ss is omitted.