Error handler for Search function complaining about "StorePath"
Hi,
I programmed the errorhandler that follows, but when i run it in robotstudio it gives me this error:
41739: StorePath required
Description
Task: T_ROB1Instruction MoveAbsJ is executing in an error handler or a trap routine. Use StorePath before using a movement instruction on other level then base. Program Ref. /FoamModule/PickMag/MoveAbsJ/91
Consequences
The program execution is immediately stopped.
Causes
A movement instruction executed without having the path stored.
Actions
Execute StorePath before using movement instruction MoveAbsJ.Read Programming type examples in the RAPID manual to see how to use movement instructions in TRAP routines and error handlers.
The thing is the function itself works and does as expected, so I´m just interested in why i get this error.
Functional description:
Robot searches a box full of foam sheets used as layers in between Products. if the robot gets an search error the robot moves uppwards so that the operator can refill the box with foam sheets, after the operator resets the error, the robot searches for foam sheets again. When i tested with storepath, the robot moved directly to the last position (which was the bottom position of the box) so what am i doing wrong?
Best regards
Mikael
ERROR
IF ERRNO=ERR_WHLSEARCH OR ERRNO=ERR_SIGSUPSEARCH THEN
bMagInteSokt:=TRUE;
MoveL Offs(pBotten_Foam,0,0,nFulltMagasinHojd+50),vMax,fine,t_vakuumkopp\WObj:=wobj_foam;
MoveAbsJ AbsJMagHome\NoEOffs,v150,fine,T_vakuumkopp;
nMagZCounter:=1;
stinfo:="Sökfel i Magasin";
ErrInfo;
RETRY;
ENDIF
Comments
-
Sounds like it does exactly what you ask it to do ;-)StorePath stores the very current path the robot was on and is only useful in error handling if you want torestart exactly where you came from. In your situation its not the case, you'd be better off looking atcounters and error handlers.Create your own search routine that starts from the top and as you make your way down (counter)make sure you have a way of resetting it if you have an error (error handler) or an event so that youcould easily start from the top again.// Magnus0
-
Hi,
I reprogrammed the error handler to reset my shift counter, and reset my boolean that checks if the Magazine has been searched or not. works like a charm, sometimes the only thing you need is another pair of eyes.
Thank you!
// Mikael
0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 801 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings