3.7.0 3.6.0 3.5.0 3.4.0 3.3.0 3.2.2 3.2.1 3.2.0 Korean English Chinese Czech Dutch French German Hungarian Italian Japanese Polish Portuguese Spanish
3.7.0 3.6.0 3.5.0 3.4.0 3.3.0 3.2.2 3.2.1 3.2.0 Korean English Chinese Czech Dutch French German Hungarian Italian Japanese Polish Portuguese Spanish

set_ref_coord()

Definition

set_ref_coord(coord)

Features

This function sets the reference coordinate system.

Parameter

Parameter Name

Data Type

Default Value

Description

coord

int

-

Reference coordinate system

  • DR_BASE: Base Coordinate

  • DR_WORLD: World Coordinate

  • DR_TOOL: Tool Coordinate

  • user Coordinate: User defined

Return

Value

Description

0

Success

Negative value

Failed

Exception

Exception

Description

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

Python
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.

Keyword

set / ref / coord / set_ / set_ref / set_ref_