4-145 Functions
4MELFA-BASIC IV
Trigonometric
functions
Cos(<Numeric expression>) Calculates the cosine Unit: radian
Definition range: Numeric value range, Value range: -1 to +1
314 Numeric
value
Sin(<Numeric expression>) Calculates the sine Unit: radian
Definition range: Numeric value range, Value range: -1 to +1
336
Tan(<Numeric expression>) Calculates the tangent. Unit: radian
Definition range: Numeric value range, Value range: Range of numeric
value
338
Character
string func-
tions
Bin$(<Numeric expression>) Converts numeric expression value into binary character string.
311 Character
string
Chr$(<Numeric expression>) Provides character having numeric expression value character
code.
313
Hex$(<Numeric expression>) Converts numeric expression value into hexadecimal character
string.
320
Left$(<Character string expres-
sion>,<Numeric expression>)
Obtains character string having length designated with 2nd argu-
ment from left side of 1st argument character string.
322
Mid$(<Character string expression>,
<Numeric expression>
<Numeric expression>)
Obtains character string having length designated with 3rd argu-
ment from the position designated with the 2nd argument in the 1st
argument character string.
324
Mirror$(<Character string expres-
sion>)
Mirror reversal of the character string binary bit is carried out.
325
Mki$(<Numeric expression>) Converts numeric expression value into 2-byte character string.
326
Mks$(<Numeric expression>) Converts numeric expression value into 4-byte character string.
326
Mkd$(<Numeric expression>) Converts numeric expression value into 8-byte character string.
327
Right$(<Character string expres-
sion>,<Numeric expression>)
Obtains character string having length designated with 2nd argu-
ment from right side of 1st argument character string.
331
Str$(<Numeric expression>)
Converts the numeric expression value into a decimal character string.
338
CkSum(<Character string expres-
sion>,<Numeric expression>,
<Numeric expression>)
Creates the checksum of a character string.
Returns the value of the lower byte obtained by adding the character
value of the second argument position to that of the third argument
position, in the first argument character string.
314 Numeric
value
Position vari-
ables
Dist(<Position>,<Position>) Obtains the distance between two points.
317 Position
Fram
(<Position 1>,<Position 2>,
<Position 3>)
Calculates the coordinate system designated with three points. Position
1 is the plane origin, position 2 is the point on the +X axis, and position
3 is the point on the +Y axis direction plane. The plane origin point and
posture are obtained from the XYZ coordinates of the three position,
and is returned with a return value (position). This is operated with 6-
axis three dimensions regardless of the mechanism structure.
This function cannot be used in 5-axis robots, because the A, B, and
C posture data has different meaning.
319
Rdfl1(<Position>,<
Numeric value
>)
Returns the structure flag of the designated position as character data.
Argument <numeric value> ) 0 = R/L, 1 = A/B , 2 = F/N is returned.
329 Character
Setfl1(<Position>,<
Character
>) Changes the structure flag of the designated position. The data to
be changed is designated with characters.(R/L/A/B/F/N)
332
Rdfl2(<Position>,<
Numeric value
>) Returns the multi-rotation data of the designated position as a
numeric value (-2 to 1).
The argument <numeric expression> returns the axis No. (1 to 8).
330 Numeric
value
Setfl2
(<Position>>,<
Numeric value
>,
<
Numeric value
>)
Changes the multi-rotation data of the designated position as a
numeric value (-2 to 1). The left side of the expression is the axis
No. to be changed; the right side is the value to be set.
333
Align(<Position>) Returns the value of the XYZ position (0,+/-90, +/-180) closest to the
position 1 posture axis (A, B, C).
This function cannot be used in 5-axis robots, because the A, B, and
C posture data has different meaning.
309
Inv(<Position>) Obtains the reverse matrix.
321 Position
PtoJ(<Position>) Converts the position data into joint data.
328 Joint
JtoP(<Position>) Converts the joint data into position data.
321 Position
Zone
(<Position 1>,<Position 2>,<Position 3>)
Checks whether position 1 is within the space (Cube) created by the
position 2 and position 3 points.
Outside the range=0, Within the range=1
For position coordinates that are not checked or non-existent, the
following values should be assigned to the corresponding position
coordinates:
If the unit is degrees, assign -360 to position 2 and 360 to position 3
If the unit is mm, assign -10000 to position 2 and 10000 to position 3
340 Numeric
value
Class Function name (format) Functions
Page
Result