# Rotation sequence

When transformations are complete, the sequence of rotations executed about the 3 rotary axes can be defined to meet the requirements (see P-CHAN-00112). If this is required, the TcCOM transformation must also take this into consideration. Therefore, the current setting is transferred to the transformation in the p->actual_orientation_mode parameter. The rotation sequences supported in the transformation can be sent to the CNC in the data item p->supported_orientation_modes When the transformation is selected, the CNC checks the setting in P-CHAN-00112 for plausibility and generates the error message P-ERR-292045 if the transformation does not support the selected rotation sequence.

## CNC --> TcCOM transformation:

p->actual_orientation_mode | Meaning
EcCncTrafoOri_None | No rotation
EcCncTrafoOri_YPR | Yaw-Pitch-Roll rotation sequence: 1st rotation about Z, 2nd negative rotation about Y, 3rd rotation about X
EcCncTrafoOri_CBC1 | Euler rotation sequence: 1st rotation about Z, 2nd rotation about Y, 3rd rotation about Z‘
EcCncTrafoOri_CBA | 1st rotation about Z, 2nd rotation about Y, 3rd rotation about X
EcCncTrafoOri_CAB | 1st rotation about Z, 2nd rotation about X, 3rd rotation about Y
EcCncTrafoOri_AB | 1st rotation about X, 2nd rotation about Y
EcCncTrafoOri_BA | 1st rotation about Y, 2nd rotation about X

## TcCOM transformation --> CNC:

p->supported_orientation_modes | Meaning
.f_YPR | = TRUE, transformation supports rotation sequence YPR
.f_CBC1 | = TRUE, transformation supports rotation sequence CBC‘
.f_CBA | = TRUE, transformation supports rotation sequence CBA
.f_CAB | = TRUE, transformation supports rotation sequence CAB
.f_AB | = TRUE, transformation supports rotation sequence AB
.f_BA | = TRUE, transformation supports rotation sequence BA

By default, the CNC uses the setting EcCncTrafoOri_YPR (Yaw->Pitch->Roll). Accordingly, the data item p->supported_orientation_mode.f_YPR is set to the value TRUE by default.

## Example

HRESULT <UserTrafo>::TrafoSupported(PTcCncTrafoParameter p, bool fwd)

{

...

/* Transformation supports YPR and Euler rotation sequence. */

p->supported_orientation_modes.f_YPR = TRUE;

p->supported_orientation_modes.f_CBC1 = TRUE;

...

return S_OK;

}

HRESULT <UserTrafo>::Backward(PTcCncTrafoParameter p)

{

…

if (EcCncTrafoOri_CBC1 == p->actual_orientation_mode)

{

/* Rotation sequence acc. to Euler active */

}

else

{

...

}

return S_OK;

}