Skip to main content
Skip table of contents

set_ref_coord(coord)

Features

This function sets the reference coordinate system.

Parameter

Parameter NameData TypeDefault ValueDescription

coord

int

-

Reference coordinate system

  • DR_BASE: Base Coordinate
  • DR_WORLD: World Coordinate
  • DR_TOOL: Tool Coordinate
  • user Coordinate: User defined

Return

ValueDescription

0

Success

Negative value

Failed

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(370.9, 419.7, 651.5, 90,-180,0)
movel(x1, v=100, a=100) # Base Coordinate basis
uu1 = [-1, 1, 0]  # x-axis vector of the user coordinate system (base coordinate basis)
vv1 = [1, 1, 0]   # y-axis vector of the user coordinate system (base coordinate basis)
pos = posx(370.9, -419.7, 651.5, 0, 0, 0) # Origin point of the user coordinate system
DR_USER1 = set_user_cart_coord(uu1, vv1, pos)   # Sets the user coordinate system.
set_ref_coord(DR_USER1)           # Sets DR_USER1 of the user coordinate system to the global coordinate system.
movel([0,0,0,0,0,0],v=100,a=100)  # The global coordinate system is used if the reference coordinate system is not specified.
                                  # Moves to the origin point and direction of the DR_USER1 coordinate system.
movel([0,200,0,0,0,0],v=100,a=100) # Moves to the (0,200,0) point of the DR_USER1 coordinate system.

Related commands

JavaScript errors detected

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

If this problem persists, please contact our support.