Skip to main content
Skip table of contents

CDRFLEx.set_user_cart_coord(fTargetPos, fTargetOrg, eTargetRef)

Features

This function sets a new user cartesian coordinate system using [fTargetPos[0]], [fTargetPos[1]]], and [fTargetPos[2]] based on ref coordinate system [eTargetRef]. 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 20 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.

Before M2.0.2 software version, ux is the unit vector of x2x1

Parameter

Parameter Name

Data Type

Default Value

Description

fTargetPos

float[3][6]

-

Target task location for six axes #1

Target task location for six axes #2

Target task location for six axes #3

fTargetOrg

float[3]

-

origin position

eTargetRef

COORDINATE_SYSTEM

COORDINATE_SYSTEM_BASE

Refer to the Definition of Constant and Enumeration Type

Return

Value

Description

int

Successful coordinate setting

Set coordinate ID (101 - 200)

Example

PY
float x1[6] = {0,500,700,0,0,0};
float x2[6] = {500,0,700,0,0,0};
float x3[6] = {300,100,500,0,0,0};
float org[3] = {10, 20, 30};
float x[3][6] = {{0,500,700,0,0,0}, {500,0,700,0,0,0}, {300,100,500,0,0,0}};
Drfl.set_user_cart_coord(x, org, COORDINATE_SYSTEM_BASE);

JavaScript errors detected

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

If this problem persists, please contact our support.