SetToolReferenceOrientation
This method is used to change the tool reference orientation which is normally set inside MANUSpost developer Kinematics, under Tool Axis.
In general, in all CNC post processors the tool reference direction is normally the vector “(0,0,1)”. However, when you use angular tools (90 degree angular tools or angular tools with other angles), you need to change the tool reference direction accordingly.
This methos takes 3 parameters as shown below:
SetToolReferenceOrientation(-1,0,0)
Here, the first parameter is the X component of the new tool reference, Second parameter is the Y component, Third parameter is the Z component.
This vector should be defined as unit vector.
You have to use this method inside scripts which are added in angular head operations inside “Event Operation Start” or “Event Tool Change”. However , do not forget to reset this method after you use it. Because this method changes the tool reference orientation in general, and if you forget to reset it, next operations, which do not use angular tools, will start using the wrong tool reference. Therefore, in the same angular head operation, you have to add a new script inside “Event Operation End”. And in this script, you have to use this method again with (0,0,1) vector to reset the previous values.
Note that, when you change the tool reference with this method, in some cases, “Rotary Axis 1” can not be calculated and it returns 9999. If this happens, you have to set the Var.Coordinate.FreeAngle variable. For instance, if you set it as 0, “Rotary Axis 1” value will be Zero.