Sudden changeover of the tool transformation
INFORMATION
The following example can be imported in the IEC Editor. In the IEC Editor, open the menu [Tools] > [Scripting] > [Scripts] > [R], and select the menu entry [Robotics_Examples.py].
The sudden changeover of tool transformations is done by overwriting the Interface_MyRobot.Config.Transformations.alrTool and MyRobot.fbMotionControl. alrTransformTool_Cyclic properties with the transformation to be specified. Overwriting alrTool makes the transformation permanently effective in every cycle. Overwriting alrTransformTool_Cyclic guarantees that the transformation for the next cycle is present before the next motion command is interpreted.
After the changeover, it is mandatory for a PTP command to be executed. It must also be ensured that the SRL interpreter has interpreted all motion commands, and that the kinematic model is in an idle state. To guarantee these requirements, the changeover takes place using an IEC-CallFunction, which is called by the CALLF SRL command.
The corresponding SRL sample program must be executed to use the changeover.
After importing the IEC code sample, the CallFunction block must be declared in the USER_PRG as follows
fbCallFunction : CallFunction_SwitchToolTransformation;
and linked.
USER_PRG.Init() xInitDone :=
(* xInitDone AND *) MyRobot.LinkICallF(fbCallFunction)
To make the used robot instance safe against address shifts due to an online change, these should be assigned in the USER_PRG.Main().
fbCallFunction(rInterface_Robot :=
Interface_MyRobot, rRobot:= MyRobot);
In the following SRL sample program, the different tool transformations are activated, then the transformed TCP is moved back to the position (0|0|0).
In the following SRL sample program, tool transformation 1 is selected to simulate convex machining with a radial tool along a continuous motion path. It shows how the tool transformation can be used in combination with the tangential control as a simple tool radius correction