ID : 341
LetP
Function
To assign a vector value to position elements (X, Y and Z elements) of Position Type variable or Homogeneous Translation Type variable.
Syntax
LetP position variable = vector
Guaranteed entry
- Position variable
- Designate Position Type variable or Homogeneous Translation Type variable.
- Vector
- Designate Vector Type data.
Description
Vector Type data specified in vector are assigned to the 1st through 3rd elements (X, Y, Z) of the designated position variable (Homogeneous Translation Type variable or Position Type variable).
Tvar = t(X, Y, Z, Ox, Oy, Oz, Ax, Ay, Az, Fig)
Pvar = p(X, Y, Z, Rx, Ry, Rz, Fig)
Vvar = v(Xv, Yv, Zv)
LetP Tvar = Vvar
'Tvar : t(Xv, Yv, Zv, Ox, Oy, Oz, Ax, Ay, Az, Fig)
LetP Pvar = Vvar
'Pvar : p(Xv, Yv, Zv, Rx, Ry, Rz, Fig)
Attention
It is not judged whether the assigned variable is a value that can be taken as robot's position.
Example
'!TITLE "Assignment to Position Type or Homogeneous Translation Type Position Vector"
' Assign the position vector in the current position to bbb
Sub Sample_LetP
Dim aaa As Trans
Dim bbb As Trans
aaa = CurTrn
' Assign the position vector in aaa to bbb
LetP bbb = PVec( aaa )
' Display the position vector in the current position on the message output window
PrintDbg bbb
End Sub
ID : 341