The Cartesian reference coordinate and orientation of the TCP (Tool Center Point) are transferred at the i_stRefCoordinate and i_stRefOrientation inputs. The orientation is provided in the convention ET_OrientationConvention.ZYX.
They must be converted to reference positions of the axes within this method and returned as return values at the q_lrRefPositionA, q_lrRefPositionB, q_lrRefPositionC, q_lrRefPositionD, q_lrRefPositionE, and q_lrRefPositionF outputs.
Those calculated values are further processed by the robot.
Input |
Data type |
Description |
---|---|---|
i_stRefCoordinate |
Cartesian reference position of the TCP in the coordinate system. |
|
i_stRefOrientation |
PDL.ST_Vector3D |
Orientation reference position of the TCP in the coordinate system. The orientation is provided in the convention ET_OrientationConvention.ZYX. |
Output |
Data type |
Description |
---|---|---|
q_etDiag |
General library-independent statement on the diagnostic. A value not equal to GD.ET_Diag.Ok corresponds to a diagnostic message. |
|
q_etDiagExt |
POU-specific output on the diagnostic. q_etDiag = ET_Diag.Ok -> Status message q_etDiag <> ET_Diag.Ok -> Diagnostic message |
|
q_sMsg |
STRING[80] |
Event-triggered message that gives additional information on the diagnostic state. |
i_lrRefPositionA |
LREAL |
Reference position of axis A. |
i_lrRefPositionB |
LREAL |
Reference position of axis B. |
i_lrRefPositionC |
LREAL |
Reference position of axis C. |
i_lrRefPositionD |
LREAL |
Reference position of axis D. |
i_lrRefPositionE |
LREAL |
Reference position of axis E. |
i_lrRefPositionF |
LREAL |
Reference position of axis F. |
Declaration:
METHOD Inverse
VAR_INPUT
i_stRefCoordinate : PDL.ST_Vector3D;
i_stRefOrientation : PDL.ST_Vector3D;
END_VAR
VAR_OUTPUT
q_etDiag : GD.ET_Diag := GD.ET_Diag.Ok;
q_etDiagExt : ROB.ET_DiagExt := ROB.ET_DiagExt.Ok;
q_sMsg : STRING[80];
q_lrRefPositionA : LREAL;
q_lrRefPositionB : LREAL;
q_lrRefPositionC : LREAL;
q_lrRefPositionD : LREAL;
q_lrRefPositionE : LREAL;
q_lrRefPositionF : LREAL;
END_VAR
VAR
END_VAR
Implementation:
// Implementation of the reverse transformation of the kinematics.
// Calculate the robot reference axes positions.
//********************************************************************
// Reference values of the robot axes
//********************************************************************
// q_lrRefPositionA := ...;
// q_lrRefPositionB := ...;
// q_lrRefPositionC := ...;
// q_lrRefPositionD := ...;
// q_lrRefPositionE := ...;
// q_lrRefPositionF := ...;