Skip to main content
Skip table of contents

CDRFLEx.align_axis(fTargetPos1, fTargetPos2, fTargetPos3, fSourceVec, eTaskAxis, eTargetRef)

Features

This function matches the normal vector of the plane consists of points(fTargetPos1, fTargetPos2, fTargetPos3) based on the ref coordinate(eTargetRef)) and the designated axis of the tool frame. The robot TCP moves to the pos position.

Parameter

Parameter Name

Data Type

Default Value

Description

fTargetPos1

float[6]

-

Target task location for six axes

fTargetPos2

float[6]


Target task location for six axes

fTargetPos3

float[6]


Target task location for six axes

fSourceVec

float[3]


vector

eTaskAxis

TASK_AXIS

-

Refer to the Definition of Constant and Enumeration Type

eTargetRef

COORDINATE_SYSTEM

-

Refer to the Definition of Constant and Enumeration Type

Return

Value

Description

0

Failed

1

Success

Example

float x1[6] = {0, 500, 700, 30, 0, 0};               

float x2[6] = {500, 0, 700, 0, 0, 0};                

float x3[6] = {300, 100, 500, 0, 0, 0};               

float pos[3] = {400, 400, 500};

Drfl.align_axis(x1, x2, x3, pos, TASK_AXIS_X, COORDINATE_SYSTEM_BASE);

PY
float x1[6] = {0, 500, 700, 30, 0, 0};                
float x2[6] = {500, 0, 700, 0, 0, 0};                 
float x3[6] = {300, 100, 500, 0, 0, 0};                
float pos[3] = {400, 400, 500};
Drfl.align_axis(x1, x2, x3, pos, TASK_AXIS_X, COORDINATE_SYSTEM_BASE);


JavaScript errors detected

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

If this problem persists, please contact our support.