CDRFLEx.set_user_cart_coord(fTargetVec, fTargetOrg, eTargetRef)
Features
This function sets a new user cartesian coordinate system using [fTargetVec[0]] and [fTargetVec[1]] based on [eTargetRef] coordinate system. The origin position the position of [fTargetOrg] based on the [eTargetRef] 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 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.
This function is only available in M2.5 hot fix version or higher.
Parameter
Parameter Name | Data Type | Default Value | Description |
fTargetVec | float[2][3] | - | vector #1 vector #2 |
fTargetOrg | float[3] | - | origin position |
eTargetRef | enum.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
float vec[2][3] = {{-1, 1, 1}, {1, 1, 0}};
float org[3] = {370.9, -419.7, 651.5};
int user = Drfl.set_user_cart_coord(vec, org);