Adjusting WorkObject

My code is set to allow the work object to be changed based upon
interface with the operator. However, I need to change the rotation of the
work object. But how to do with the quaternion? Let’s say I need to
change the rotation about the x-axis by 1.5 degrees, how to do?

Thanks!!

Hi
Take a look in the RAPID manual on instructions

  • OrientZYX
  • EulerZYX
    I think that is what you need

Best Regards
Per Svensson

Hi,

The PerSvensson have reason this is only you need, OrientZYX and the EulerZYX, you must have attention to order of the function is ( ZZZZZ,YYYYYY,XXXXXXX) not (XXXXX,YYYYYY,ZZZZZZ)is very important use the coordinate correct. I recomend use 2 WorkObject data, one is a fixed and the other is a variable like this:

fresa2 and fresa They are a WorkObject

fresa2:=fresa;

anglex := EulerZYX(X,fresa2.uframe.rot);
angley := EulerZYX(Y,fresa2.uframe.rot);
anglez := EulerZYX(,fresa2.uframe.rot);
anglnovox:=anglex + inclinafreza;
anglnovoy:=angley;
anglnovoz:=anglez;

fresa2.uframe.rot := OrientZYX(anglnovoz, anglnovoy, anglnovox);
fresa2.oframe.trans.x:=fresa2.oframe.trans.x + fresadx;
fresa2.oframe.trans.y:=fresa2.oframe.trans.y + fresady;
fresa2.oframe.trans.z:=fresa2.oframe.trans.z + fresadz;

Best regards,

Joao Fidalgo