T2P (Function)


Transforms homogeneous transformation type data to position type data.


T2P(<homogeneous trans matrix>[ ,<T2P option>])


This function transforms data in homogeneous transform matrix in <homogeneous trans matrix> to position type. The obtained value reflects the currently specified tool or work coordinate system.
<T2P 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 T2P causes an internal error, but assigns the error code into the specified variable.




DEFPOS lp1, lp2
DIM lt1 As Trans
lp1 = T2P(lt1)
'Assigns lt1 data transformed to position type data to lp1.
lp2 = T2P(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 position type data
'to lp2.
lp1 = T2P(lt1,li1)
'If execution of T2P fails, assign the error code into
'variable li1 and then go to the next step.


Top