ID : 3913
P2J
Function
To convert position type data into joint type data to return.
Syntax
P2J(position type data)
Guaranteed Entry
- Position type data
- Designate Position Type data.
Return Value
Return Joint Type data.
Description
Position type data are converted into joint type data to return.
Calculation result reflecting current work coordinates and current tool coordinates is returned.
Attention
If the designated position type data is out of the motion space of the robot, an Error level 1 occurs. You may use the "On Error" statement to create an error processing routine. Refer to "On Error."
If FIG value of the designated position type data is "-1 (inconstant)" or "-2 (automatic)," return value varies depending on the current position of the robot. Refer to "Robot Figure (FIG)."
Example
'!TITLE "Conversion from Position Type to Joint Type"
' Convert the current position acquired in position type into joint type
Sub Sample_P2J
Dim aaa As Position
Dim bbb As Joint
' Acquisition of current position
aaa = CurPos
' Conversion from position type to joint type
bbb = P2J( aaa )
' Display the current position converted into joint type on the message output window
PrintDbg bbb
End Sub
ID : 3913