Data Sheet

MicroBasic Language Reference
Advanced Digital Motor Controller User Manual 2 11
is equivalent to
x = x << y
>>= Operator
The right-shift assignment operator.
var >>= expression
An expression using the >>= assignment operator, such as
x >>= y
is equivalent to
x = x >> y
[ ] Operator
Square brackets ([]) are used for arrays (see Arrays on page 198).
Abs Function
Returns the absolute value of an expression.
Abs(<expression>)
Example:
a = 5
b = Abs(a – 2 * 10)
Atan Function
Returns the angle whose arc tangent is the specified number.
Number is devided by 1000 before applying atan.
The return value is multiplied by 10.
Atan(<expression>)
Example:
angle = Atan(1000) ‘450 = 45.0 degrees
Cos Function
Returns the cosine of the specified angle.
The return value is multiplied by 1000.