|
Calculating the Work Plane UCS
In rotating head machines (table-head or head-head), setting a work plane results in the rotation of the machine controller UCS. The controller UCS Z axis becomes aligned with the tool axis, so the machine can perform drilling and 2.5X subroutines.
This case is illustrated in the image below, where the rotated controller UCS is shown as REF_UCS_ROTATED (and is aligned with the tool).
In order for GPP2 to continue and communicate well with the controller, the GPP2 output UCS must be redefined to be the same as the rotated controller UCS. The new Z axis is easy to tell - it is aligned with the tool IJK (that's why the head was rotated in the first place). However, the new X axis of the controller UCS is not so simple to find. It is rotated with the head, but where to exactly?
GPP2 provides a statement to calculate the machine controller UCS under head rotations. The result from this calculation is later used to set the output UCS orientation (see examples later).
CALC_WORKPLANE_UCS <mode> <alpha> <beta>;
The work plane <mode> may be one of the following predefined GPP2 constants:
WP_BETA |
Rotate the REF UCS around the machine beta axis only. This mode is suitable for table-head machines, where only the head rotation (beta) affects the controller UCS orientation. |
WP_ALPHA_BETA |
Rotate the REF UCS around both the machine alpha and beta axes. This mode is suitable for head-head machines, where both axis rotations affect the controller UCS orientation. |
WP_ALPHA |
Rotate the REF UCS around the machine alpha axis only. This mode is provided for completeness - it is not clear if it ever needs to be used. |
The results from the CALC_WORKPLANE_UCS statement are as follows:
I_WORKPLANE J_WORKPLANE K_WORKPLANE |
The resulting work plane UCS Z axis direction |
IX_WORKPLANE JX_WORKPLANE KX_WORKPLANE |
The resulting work plane UCS X axis direction |
After use of CALC_WORKPLANE_UCS, GPP2 is typically instructed to rotate its output UCS to the calculated orientation, using the SET_OUTPUT_UCS command.
Example
For a table-head machine
CALC_WORKPLANE_UCS WP_BETA 0 B_CURPOS; // beta only
SET_OUTPUT_UCS POS_NO_CHANGE ROT_WORKPLANE; // set output UCS
For a head-head machine
CALC_WORKPLANE_UCS WP_ALPHA_BETA A_CURPOS B_CURPOS; // alpha & beta
SET_OUTPUT_UCS POS_NO_CHANGE ROT_WORKPLANE; // set output UCS
|