Elmo HARmonica Network Hardware User Manual


 
HARSFEN0602
sin Sine Floating point
cos Cosine Floating point
abs Absolute value Same type as input argument
sqrt Square root, or zero if argument is
negative
Floating point
fix Truncate to integer.
fix(3.8) is 3
fix(-3.8) is -3
Integer
rnd Truncate to nearest integer.
rnd(3.8) is 4
rnd(-3.8) is –4
Integer
tdif Time difference
x=TM
tdif(x ) returns the time in msec since
x=TM has been sampled.
Floating point
4.2.6 Expressions
An expression is a combination of operands (parameters) and operators that is evaluated in a
single value. Expressions work with immediate numbers, Amplifier commands, Amplifier
and global user-program variables.
There are different types of expressions, as described below.
4.2.6.1 Simple Expressions
A simple expression is evaluated in a single value. Any parameter and mathematical/logical
operator may be used to create a simple expression. Normally, simple expressions may be
used as a part of other types of expressions.
Simple expressions are evaluated according to the priority of the operators, as specified in
Table
4-1 – Mathematical and Logical Operators. In case of equal priority, the expression is
evaluated from left to right.
The use of parentheses is allowed to 16 nesting levels.
Example:
AC=100000
SP*2/5+AC
SP= SP*2/5+AC
IP|5
(SP+SP)*IA[1+AC*0]
IA[1]|5&2
2+3
1400000
4.2.6.2 Assignment Expressions
Assignment expressions are used to assign a value to variable or command. The syntax of an assignment
expression is:
<Parameter or command name>=<simple expression>
Example: