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
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?
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:
0
Answers
-
Try StopMove and ClearpathLee Justice1
-
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
☑️2024 - RobotStudio® User Group0 -
AuxiliumD said:lemster68 said:Try StopMove and 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
☑️2024 - RobotStudio® User Group0
Categories
- All Categories
- 5.6K RobotStudio
- 399 UpFeed
- 20 Tutorials
- 14 RobotApps
- 301 PowerPacs
- 406 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 336 IRC5
- 67 OmniCore
- 8 RCS (Realistic Controller Simulation)
- 830 RAPID Programming
- 13 AppStudio
- 4 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 107 Collaborative Robots
- 5 Job listings