Breadcrumbs

set_user_cart_coord()

set_user_cart_coord(pos, ref)

Features

This function set a new user cartesian coordinate system using input pose [pos] and reference coordinate system[ref]. Up to 100 user coordinate systems can be set including the coordinate systems set within Workcell Item. Since the coordinate system set by this function is removed when the program is terminated, setting new coordinate systems within Workcell Item is recommended for maintaining the coordinate information.

Parameters

Parameter Name

Data Type

Default Value

Description

pos

posx

-

coordinate information
(position and orientation)

list (float[6])

ref

int

-

reference coordinate

  • DR_BASE: base coordinate

  • DR_WORLD: world coordinate

Return

Value

Description

Positive integer

Successful coordinate setting
Set coordinate ID (101 - 200)

-1

Failed coordinate setting

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
pos1 = posx(10, 20, 30, 0, 0, 0)
pos2 = posx(30, 50, 70, 45, 180, 45)
user_id1 = set_user_cart_coord(pos1, ref=DR_BASE)
user_id2 = set_user_cart_coord(pos2, ref=DR_WORLD)


set_user_cart_coord(x1, x2, x3, pos, ref)

Features

This function sets a new user cartesian coordinate system using [x1], [x2], and [x3] based on ref coordinate system[ref]. Creates a user coordinate system with ux, uy, and uz as the vector for each axis and origin position is the position of [pos] based on [ref]. 1)ux is defined as the unit vector of x1x2 , uz is defined as the unit vector defined by the cross product of x1x2 and x1x3 (x1x2 cross x1x3). uy is can be determined by right hand rule (uz cross ux). Up to 100 user coordinate systems can be set including the coordinate systems set within Workcell Item. Since the coordinate system set by this function is removed when the program is terminated, setting new coordinate systems within Workcell Item is recommended for maintaining the coordinate information.

  1. In software versions lower than M2.0.2, ux is used as the unit vector of x2x1

Parameters

Parameter Name

Data Type

Default Value

Description

x1

Posx

-

posx or
position list

list (float[6])

x2

Posx

-

posx or
position list

list (float[6])

x3

Posx

-

posx or
position list

list (float[6])

pos

Posx

-

posx or
position list

list (float[6])

ref

int

DR_BASE

reference coordinate

  • DR_BASE: base coordinate

  • DR_WORLD: world coordinate

Return

Value

Description

Positive integer

Successful coordinate setting
Set coordinate ID (101 - 200)

-1

Failed coordinate setting

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
x1 = posx(0, 500, 700, 0, 0, 0) # Ignores the Euler angle.
x2 = posx(500, 0, 700, 0, 0, 0)
x3 = posx(300, 100, 500, 0, 0, 0)
x4 = posx(300, 110, 510, 0, 0, 0)
pos = posx(10, 20, 30, 0, 0, 0)
user_tc1 = set_user_cart_coord(x1, x2, x3, pos, ref=DR_BASE)
user_tc2 = set_user_cart_coord(x2, x3, x4, pos, ref=DR_WORLD)


set_user_cart_coord(u1, v1, pos, ref)

Features

This function sets a new user cartesian coordinate system using [u1] and [v1] based on [ref] coordinate system. The origin position the position of [pos] based on the [ref] coordinate while the direction of x-axis and y-axis bases are given in the vectors u1 and v1, respectively. Other directions are determined by u1 cross v1. If u1 and v1 are not orthogonal, v1’, that is perpendicular to u1 on the surface spanned by u1 and v1, is set as the vector in the y-axis direction. Up to 100 user coordinate systems can be set including the coordinate systems set within Workcell Item. Since the coordinate system set by this function is removed when the program is terminated, setting new coordinate systems within Workcell Item is recommended for maintaining the coordinate information.

Parameters

Parameter Name

Data Type

Default Value

Description

u1

float[3]

-

X-axis unit vector

v1

float[3]

-

Y-axis unit vector

pos

posx

list (float[6])

-

posx or

position list

ref

int

DR_BASE

reference coordinate

  • DR_BASE: base coordinate

  • DR_WORLD: world coordinate

Return

Value

Description

Positive integer

Successful coordinate setting
Set coordinate ID (101 - 200)

-1

Failed coordinate setting

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
u1 = [1, 1, 0]
v1 = [-1, 1, 0]
pos = posx(10, 20, 30, 0, 0, 0)
user_tc1 = set_user_cart_coord(u1, v1, pos)
user_tc2 = set_user_cart_coord(u1, v1, pos, ref=DR_WORLD)