T2J
(Function)
Transforms homogeneous transformation type data to joint type data.
T2J(<homogeneous trans matrix>[ ,<T2J option>])
This function transforms data in homogeneous transform matrix in <homogeneous trans matrix> to joint type.
If the FIG value in the homogeneous transform matrix data is -1 (undetermined), the data is transformed with the current figure.
The obtained value reflects the currently specified tool or work coordinate system.
<T2J option> is an omissible Result storage variable that should be an integer variable (Ver. 3.0 or later). Specifying this option does not stop programs even if execution of the T2J causes an internal error, but assigns the error code into the specified variable.
DEFJNT lj1, lj2, lj3
|
|
DEFTRN lt1, lt2
|
|
DIM li1 As Integer
|
|
lj1 = T2J(lt1)
|
'Assigns lt1 data transformed to joint type data
'using the current figure to lj1.
|
lj2 = T2J(lt2)
|
'Assigns lt2 data transformed to joint type data
'using the figure of 0 to lj2.
|
lj3 = T2J(350, 0, 450, 0, 1, 0, 0, 0, -1)
|
|
|
'Assigns the homogeneous transformation type data
'(350, 0, 450, 0, 1, 0, 0, 0, -1) transformed to
'joint type data using the figure value li1 to lj3.
|
lj1 = T2J(lt1,li1)
|
'If execution of T2J fails, assign the error code into
'variable li1 and then go to the next step.
|