Skip to main content
Skip table of contents

trans(pos, delta, ref, ref_out)

Features

  • pos (pose) defined based on the ref coordinate is moved/rotated by the amount equal to delta, and then a value converted based on the ref_out coordinate is returned.
  • In case that the ref coordinate is the tool coordinate, this function retuns the value based on input parameter(pos)’s coordinate without ref_out coordinate.

Parameters

Parameter Name

Data Type

Default Value

Description

pos

posx

-

posx or

position list

list (float[6])

delta

posx

-

posx or

position list

list (float[6])

ref

int

None

reference coordinate

  • DR_BASE : base coordinate
  • DR_WORLD : world coordinate
  • DR_TOOL : tool coordinate
  • user coordinate: user defined

ref_out

int

DR_BASE

reference coordinate

  • DR_BASE : base coordinate
  • DR_WORLD : world coordinate
  • user coordinate: user defined

Return

ValueDescription

posx list (float[6])

task space point

Exception

ExceptionDescription

DR_Error (DR_ERROR_TYPE)

Parameter data type error occurred

DR_Error (DR_ERROR_VALUE)

Parameter value is invalid

DR_Error (DR_ERROR_RUNTIME)

C extension module error occurred

DR_Error (DR_ERROR_STOP)

Program terminated forcefully

Example

PY
p0 = posj(0,0,90,0,90,0)

movej(p0, v=30, a=30)

 

x1 = posx(200, 200, 200, 0, 180, 0)

delta = [100, 100, 100, 0, 0, 0]

x2 = trans(x1, delta, DR_BASE, DR_BASE) 

 

x1_base = posx(500, 45, 700, 0, 180, 0)

x4 = trans(x1_base, [10, 0, 0, 0, 0, 0], DR_TOOL)

movel(x4, v=100, a=100, ref=DR_BASE)

 

uu1 = [1, 1, 0]

vv1 = [-1, 1, 0]

pos = posx(559, 34.5, 651.5, 0, 180.0, 0)

DR_userTC1 = set_user_cart_coord(uu1, vv1, pos)  #user defined coordinate system

x1_userTC1 = posx(30, 20, 100, 0, 180, 0)        #posx on user coordinate system

x9 = trans(x1_userTC1, [0, 0, 50, 0, 0, 0], DR_userTC1, DR_BASE) 

movel(x9, v=100, a=100, ref=DR_BASE)

Related commands

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.