Motion Coordinator Technical Reference Manual
Trio BASIC Commands 8-139
Mathematical Operations and Commands
Parameters:
Example 1:
IF (IN(6)=ON) AND (DPOS>100) THEN tap=ON
Example 2:
VR(0)=10 AND (2.1*9)
Trio BASIC evaluates the parentheses first giving the value 18.9, but as was speci-
fied earlier, only the integer part of the number is used for the operation, therefore
this expression is equivalent to:
VR(0)=10 AND 18
AND
is a bitwise operator and so the binary action taking place is:
01010
AND 10010
-----
00010
Therefore
VR(0)
holds the value 2
Example 3:
IF MPOS AXIS(0)>0 AND MPOS AXIS(1)>0 THEN GOTO cyc1
ASIN
Type:
Mathematical Function
Syntax:
ASIN(expression)
Alternate Format:
ASN(expression)
Description:
The
ASIN
function returns the arc-sine of a number which should be in the range +/
-1. The result in radians is in the range -PI/2.. +PI/2 (Numbers outside the +/-1
input range will return zero)
Parameters:
Example:
>>PRINT ASIN(-1)
-1.5708
Expression1:
Any valid Trio BASIC expression
Expression2:
Any valid Trio BASIC expression
01
000
101
Expression:
Any valid Trio BASIC expression.