Mitsubishi MELFA CR1D Instruction Manual page 341

Table of Contents

Advertisement

PosMid
[Function]
Obtain the middle position data when a linear interpolation is performed between two given points.
[Format]
<Position Variables>=PosMid(<Position Variables 1>, <Position Variables 2>,<Equation 1>,
<Equation 2>)
[Reference Program]
1 P1=PosMid(P2,P3,0,0)
[Explanation]
(1) Obtain the position data of the middle point when a linear interpolation is performed between two posi-
tion data.
(2) The first argument gives the starting point of the linear interpolation, while the second argument gives
the endpoint of the linear interpolation.
(3) The third and fourth arguments correspond to the two TYPE arguments of the Mvs command.
(4) The arguments for the starting and end points must be positions that allow linear interpolation with the
specified interpolation type. For instance, an error will be generated if the structure flags of the starting
and end points are different.
(5) It is not possible to describe a function that contains an argument in <Position Variables 1>, <Position
Variables 2>,<Equation 1> and <Equation 2>. If such a function is described, an error will be generated
during execution.
PtoJ
[Function]
Converts the given position data into a joint data.
[Format]
<Joint Variable>=PtoJ(<Position Variables>)
[Reference Program]
1 J1=PtoJ(P1)
[Explanation]
(1) Converts the position data into the joint data.
(2) Joint variables(J variable) cannot be used as the argument. When a joint variable is used, an error will be
generated.
(3) Since the return value is a joint data, an error will be generated if a position variable is used in the left-
hand side.
[Reference]
JtoP
' The position data (including posture) of the middle point between P2
and P3 will be assigned to P1.
' J1 will contain the value of P1 (XYZ position variable) that has been converted
into joint data type.
4MELFA-BASIC IV
Detailed Explanation of Functions 4-328

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melfa cr2dMelfa cr3d

Table of Contents