<< Prev        Next >>

ID : 3676

CurPos

Function

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

Syntax

CurPos

Return value

Return the current position of the robot by Position Type data.

Description

The current position of the robot is returned by Position 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

CurTrn, CurJnt, DestPos, DestTrn, DestJnt

Attention

Example

'!TITLE "Acquiring Current Position"
' Output the current position and position calculation result
Sub Sample_CurPos

  Dim aaa As Position
  Dim bbb As Position

  ' Assign a position based on the current tool coordinates to aaa
  aaa = CurPos

  ' Assign results of 50 calculations of X, Y and Z in a position of the current tool coordinates to bbb
  bbb = Dev( aaa, P( 50, 50, 50, 0, 0, 0, -1 ) )

  ' Display the current position and calculation result on the message output window
  PrintDbg aaa, bbb

End Sub

ID : 3676

<< Prev        Next >>