<< Prev        Next >>

ID : 182

CurTrn

Function

To return the current position of the robot by homogeneous translation type data.

Syntax

CurTrn

Return value

Return the current position of the robot by Homogeneous Translation Type data.

Description

Return the current position of the robot by homogeneous translation type data.

If the robot is in motion, calculation is performed by using an encoder value at the time of execution of this instruction.

Current work coordinates and tool coordinates are reflected in a value obtained thereby.

A command position is used for calculation in case of Machine Lock.

Related Terms

CurPos, CurJnt, DestPos, DestTrn, DestJnt

Attention

Example

'!TITLE "Acquiring Current Position"
' Acquire the current position from the tool coordinates and display it on the message window
Sub Sample_CurTrn

  Dim aaa As Trans
  Dim bbb As Trans

  TakeArm Keep = 1

  ' Acquire the current position by T type
  aaa = CurTrn

  ' Assign 50 as X, and 100 as Y to bbb
  bbb = T( 50, 100, 0, 0, 0, 0, 0, 0, 0 )

  ' Assign the current position and bbb calculation result to bbb
  bbb = TMul( aaa, bbb )

  ' Display initial current position on the message output window
  PrintDbg aaa

  ' Display calculation result on the message output window
  PrintDbg bbb

End Sub

ID : 182

<< Prev        Next >>