<< Prev        Next >>

ID : 640

Vis.Trans

Function

To convert visual coordinates into robot coordinates (X, Y, and Z).

Syntax

Vis.Trans Cal number, visual coordinate X, visual coordinate Y

Guaranteed entry

Cal number
Designate a Cal data table number (0-31) by integer type data.
Visual coordinate X
Designate the X coordinate of the visual coordinates by single precision real number type data.
Visual coordinate Y
Designate the Y coordinate of the visual coordinates by single precision real number type data.

Return value

Return robot coordinates (X, Y, and Z) by vector type data.

Description

Visual coordinates are converted into robot coordinates (X, Y, and Z).
For about the transformation matrix, refer to the Cal table in Vis.CalTrans.
The data numbers from 0 through 11 on the Cal table correspond to the 12 elements of the transformation matrix.

Attention

  • Before executing this command, store the transformation matrix in the Cal table with Vis.CalTrans or Vis.SetCalData commands.
  • Because this command simply calculates X, Y and Z components on the robot coordinate, to execute motion commands, you need to set Rx, Ry and Rz components separately.

Example

'!TITLE "Conversion from Visual Coordinates to Robot Coordinates"
' Convert 30 of X coordinate and Y coordinate in visual coordinates 
  of Cal number 1 to robot coordinates
Sub Sample_VisTrans

  Dim aaa( 1 ) As Single
  Dim bbb( 1 ) As Single
  Dim ccc( 1 ) As Single
  Dim ddd As Vector
  Dim eee As Vector
  Dim fff As Vector
  Dim ggg As Integer
  Dim hhh As Vector

  ggg = 1

  aaa( 0 ) = 50
  aaa( 1 ) = 50
  bbb( 0 ) = 50
  bbb( 1 ) = 300
  ccc( 0 ) = 500
  ccc( 1 ) = 300

  ddd = V( 325, 112.5, 279 )
  eee = V( 200, 112.5, 279 )
  fff = V( 200, -112.5, 279 )

  ' Calibration of visual coordinates and robot coordinates
  Vis.CalTrans ggg, aaa( 0 ), aaa( 1 ), ddd, bbb( 0 ), bbb( 1 ),
               eee, ccc( 0 ), ccc( 1 ), fff

  ' Assign coordinates position that the visual coordinates are converted to
     robot coordinates (X,Y, and Z)
  hhh = Vis.Trans( 1, 30, 30 )

  ' Display coordinates position that the visual coordinates are converted to
     robot coordinates (X,Y, and Z) on the message output window
  PrintDbg hhh

End Sub

ID : 640

<< Prev        Next >>