RobotStudio event

Chaning the Z value of TCP during the program

Mjsh635
Mjsh635
edited January 2019 in RAPID Programming
Currently using an IRC5 controller. I'm looking to have my robot preset an EOAT with a part to a camera system where i image the Z offset from the EOAT to the end of the part. From there i need to pass that data to the TCP. Can anyone give some insight? I currently have everything solved up to the variable adjustment of the TCP during AUTO

Answers

  • I found that if i use "Tool0.tframe.trans.z:=" i can place this in the robot routine and execute it after the imagine and data processing.
  • Yes, but you shouldn't change tool0.  Make an assignment to a variable tool, even if it has the same values as tool0.
    Lee Justice
  •     TASK PERS tooldata tMill_etalon:=[TRUE,[[149.484,1.44639,39.5727],[0.00336725,0.706518,0.0442334,0.706304]],[5,[0,0,35],[1,0,0,0],0,0,0]];
        TASK PERS tooldata tMill_corr:=[TRUE,[[149.484,1.44639,39.5727],[0.00336725,0.706518,0.0442334,0.706304]],[5,[0,0,35],[1,0,0,0],0,0,0]];

        TASK PERS pose tTool_temp:=[[154.411,2.05005,46.4739],[0.00336725,0.706518,0.0442334,0.706304]];
        TASK PERS pose tTool_corr:=[[0,0,2.5],[1,0,0,0]];
        TASK PERS pose tTool_result:=[[156.907,2.19437,46.4683],[0.00336725,0.706518,0.0442334,0.706304]];

    PROC Tool_Z_Offset()

            tTool_temp.trans:=tMill_etalon.tframe.trans;
            tTool_temp.rot:=tMill_etalon.tframe.rot;
            tTool_corr.trans.z:=dz;
            tTool_result:=PoseMult(tTool_temp,tTool_corr);

            tMill_corr.tframe.trans:=tTool_result.trans;
            tMill_corr.tframe.rot:=tTool_result.rot;
    ENDPROC