Hyundai HI4 Robotics User Manual


 
11. Robot Language Explanation
------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------
11 - 40
11.4 Function
11.4.1 Arithmetic Function
The functions that have the numeric value returned, are called the arithmetic functions.
Function Name Description Example
ABS(a) Returns the absolute value of a V19!+ABS(V20!)
MAX(a, b) Returns the bigger value between a and b. MAX(V20!, 0)
MIN(a, b) Returns the smaller value between a and b. MIN(V20!, 10)
DEGRAD(a) Returns radian value of a in degree. DEGRAD(270)
RADDEG(a) Returns degree value of a in radian. RADDEG(3.1415*V20!)
SQR(a) Returns a square root of a. SQR(V20!)
SIN(a) Returns a sine value of a in radian. SIN(V20!)
COS(a) Returns a cosine value of a in radian. COS(V20!)
TAN(a) Returns a tangent value of a in radian. TAN(V20!)
ATN(a) Returns a arctangent value of a in radian. ATN(V20!)
ATN2(a, b)
Returns a arctangent value of a triangle which have
x length of a and y length of b, in radian.
ATN(V25!, V26!)
DIST(a, b)
Returns the distance to a point which x coordinate
is a and
y
coordinate is b.
DIST(V5!, V6!)
ORD(a)
Returns the character code for the first character
of the strin
g
.
ORD("ERROR")
VAL(a) Returns the value of a number described in string. VAL("29.38E-2")
STRPOS(a, b)
Returns the first location matching to b string
within a string.
STRPOS(V7$, "=")
LEN(a) Returns the length of a string. LEN(V8$)
TIMER Gets the elapsed time from the power on in seconds. TIMER