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
Numeric
value
Sin(<Numeric expression>)
Calculates the sine Unit: radian
Definition range: Numeric value range, Value range: -1 to +1
Tan(<Numeric expression>)
Calculates the tangent. Unit: radian
Definition range: Numeric value range, Value range: Range of numeric
value
Character
string func-
tions
Bin$(<Numeric expression>)
Converts numeric expression value into binary character string.
Character
string
Chr$(<Numeric expression>)
Provides character having numeric expression value character
code.
Hex$(<Numeric expression>)
Converts numeric expression value into hexadecimal character
string.
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.
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.
Mirror$(<Character string expres-
sion>)
Mirror reversal of the character string binary bit is carried out.
Mki$(<Numeric expression>)
Converts numeric expression value into 2-byte character string.
Mks$(<Numeric expression>)
Converts numeric expression value into 4-byte character string.
Mkd$(<Numeric expression>)
Converts numeric expression value into 8-byte character string.
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.
Str$(<Numeric expression>)
Converts the numeric expression value into a decimal character string.
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.
Numeric
value
Position vari-
ables
Dist(<Position>,<Position>)
Obtains the distance between two points.
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.
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.
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)
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).
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.
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.
Inv(<Position>)
Obtains the reverse matrix.
Position
PtoJ(<Position>)
Converts the position data into joint data.
Joint
JtoP(<Position>)
Converts the joint data into position data.
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
Numeric
value
Class
Function name (format)
Functions
Page
Result