Convert the three taught points (ORG/XX/XY) of a user frame to a CoordFrame (X/Y/Z/Rx/Ry/Rz).
A user frame is often defined by teaching three positions (ORG/XX/XY),
using a dedicated tool (e.g. with calibration tip for better precision).
But after its initial definition, it might be interesting to
convert a user frame to a
CoordFrame vector using this
function.
Some reasons are:
- Easier to adjust afterwards using an HMI
(e.g. shift user frame by
2mminX+) - Better format for further calculations
- Less data
The
CoordFrame vector defines a user frame using six offsets (X/Y/Z/Rx/Ry/Rz,
related to WORLD).Example
Below example is using very simple positions for readability reasons. But since the function is using matrix calculations for the conversion it can handle any kind of position.
// user frame defined by three taught positions
myUserFrame.Origin[0] := 0; // X
myUserFrame.Origin[1] := 0; // Y
myUserFrame.Origin[2] := 0; // Z
myUserFrame.XX[0] := 0;
myUserFrame.XX[1] := 10;
myUserFrame.XX[2] := 0;
myUserFrame.XY[0] := -10;
myUserFrame.XY[1] := 10;
myUserFrame.XY[2] := 0;
MLxUserFrameToCoordFrame(
UserFrame := myUserFrame);
// result
// myUserFrame.CoordFrame[0] := 0; // X
// myUserFrame.CoordFrame[1] := 0; // Y
// myUserFrame.CoordFrame[2] := 0; // Z
// myUserFrame.CoordFrame[3] := 0; // Rx
// myUserFrame.CoordFrame[4] := 0; // Ry
// myUserFrame.CoordFrame[5] := 90; // Rz
Version history
0.1.0
 
deGroot
Changes
Added:
- initial version
Overview
| kind | name | type | default | comment |
|---|---|---|---|---|
| in_out | UserFrame | MLxAppDataUserFrame | input: 3 points ORG/XX/XY (X/Y/Z each), output: CoordFrame (X/Y/Z/Rx/Ry/Rz) |
Details
UserFrame
MLxAppDataUserFrameUsed as input
ORG/XX/XY– three taught points defining the user frame (X/Y/Z each)
Used as output
CoordFrame– vector defining the user frame (X/Y/Z/Rx/Ry/Rz)
Implementation
Snippet of the function call:
MLxUserFrameToCoordFrame(
UserFrame := );