Continue in program after asking question without doing movement twice

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.

!This moves above the calibration position
 MoveJ reltool(pToolCalibration,0,0,-100),v2000,z0,tSuction\WObj:=wobj0;
 
calibration:=UIMessageBox(\Header:="Jogga roboten"\MsgArray:=["Jog the robot to the calibration position"]\Buttons:=btnOK\Icon:=iconInfo);

pTempPosition := CRobT(\Tool:=tSuction\WObj:=wobj0);
MoveJ reltool(pSomeOtherPoint,0,0,-100),v2000,z0,tSuction\WObj:=wobj0;

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.

Do anyone know how to do this properly?


Tagged:

Answers

  • lemster68
    lemster68 ✭✭✭
    edited April 29
    Try StopMove and Clearpath
    Lee Justice
  • Tompanhuhu
    Tompanhuhu ✭✭✭
    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;
    Systemintegrator - Web / C# / Rapid / Robotstudio

    If I helped, please press Vote Up  :smile:

    ☑️2024 - RobotStudio® User Group
  • lemster68 said:
    Try StopMove and Clearpath
    This seems to have done it, I tried StopMove but never found Clearpath!

    The other solution by Tompanhuhu didn't work for me as the Stop\NoRegain does not get into effect before pressing OK
  • Tompanhuhu
    Tompanhuhu ✭✭✭
    AuxiliumD said:
    lemster68 said:
    Try StopMove and Clearpath
    This seems to have done it, I tried StopMove but never found Clearpath!

    The other solution by Tompanhuhu didn't work for me as the Stop\NoRegain does not get into effect before pressing OK

    operator must press ok before jogging so \NoRegain is executed.  :) 
    Systemintegrator - Web / C# / Rapid / Robotstudio

    If I helped, please press Vote Up  :smile:

    ☑️2024 - RobotStudio® User Group