I got this really weird behaviour that makes me question everything I’ve done before.
I get the robot to move to an initial position. I then put up a UIMessageBox where I ask the user to jog the robot to the correct position and then press OK. However after pressing OK, the last movement is done again, even though we have already done it. I don’t want that behaviour.
Instead of going to “pSomeOtherPoint” after the user presses OK, the robot does the move to the toolCalibration again, which makes the “jogging” undone. I am sure I’ve done it like this before, and wonder if this is just a bug in Robotstudio.
I always use this method, operator must press ok before jogging so \NoRegain is executed.
MoveJ reltool(pToolCalibration,0,0,-100),v2000,z0,tSuction\WObj:=wobj0;
reg1:=UIMessageBox(\Header:=“Jogga roboten”\MsgArray:=[“Press OK and then jog the robot to the calibration position”]\Buttons:=btnOK\Icon:=iconInfo);
Stop\NoRegain;
pTempPosition:=CRobT(\Tool:=tSuction\WObj:=wobj0);
MoveJ reltool(pSomeOtherPoint,0,0,-100),v2000,z0,tSuction\WObj:=wobj0;