CalcJointT/error handling help
SteveMob
✭
Hello,
I am trying to do some error handling and having a terrible time trying to figure this stuff out. I am sending target points to RAPID via Sockets and LabVIEW. I am trying to have an error handler check and see if the target is out of reach, or if it will cause a joint limit. If the given target parameters will cause either of these 2 errors, put the RAPID program on "standby" and tell LV an error has occurred, and have the RAPID program wait for LV to tell it what to do. This is my CalcJointT code to try to check for these errors, but it isn't working:
VAR errstr OutReach:="This target is out of reach for the robot arm!";
VAR jointtarget jointpos1;
jointpos1:=CalcJointT(myRobtarget,tool0\WObj:=wobj0\ErrorNumber:=ERR_ROBLIMIT);
IF ERRNO=ERR_ROBLIMIT THEN
SocketSend client_socket\Str:=OutReach;
!TRYNEXT;
ENDIF
The error that I keep getting is:"The argument for INOUT parameter ErrorNumber is not a variable or persistent reference, or it is read-only." Any ideas on how to build error handlers that can handle the 2 errors mentioned above, and not to actually stop the RAPID program, but put it in "standby"? Essentially doing target validation before the robot tries to move to that target.
Thanks for any help!
SM
I am trying to do some error handling and having a terrible time trying to figure this stuff out. I am sending target points to RAPID via Sockets and LabVIEW. I am trying to have an error handler check and see if the target is out of reach, or if it will cause a joint limit. If the given target parameters will cause either of these 2 errors, put the RAPID program on "standby" and tell LV an error has occurred, and have the RAPID program wait for LV to tell it what to do. This is my CalcJointT code to try to check for these errors, but it isn't working:
VAR errstr OutReach:="This target is out of reach for the robot arm!";
VAR jointtarget jointpos1;
jointpos1:=CalcJointT(myRobtarget,tool0\WObj:=wobj0\ErrorNumber:=ERR_ROBLIMIT);
IF ERRNO=ERR_ROBLIMIT THEN
SocketSend client_socket\Str:=OutReach;
!TRYNEXT;
ENDIF
The error that I keep getting is:"The argument for INOUT parameter ErrorNumber is not a variable or persistent reference, or it is read-only." Any ideas on how to build error handlers that can handle the 2 errors mentioned above, and not to actually stop the RAPID program, but put it in "standby"? Essentially doing target validation before the robot tries to move to that target.
Thanks for any help!
SM
0
Comments
-
Hi Steve, did you make any progress on this? Having trouble solving this issue myself.0
-
Hello,You code is wrong.You have to pass a variable to CalcJointT parameter:VAR errnum myerrnum;
jointpos1:=CalcJointT(myRobtarget,tool0\WObj:=wobj0\ErrorNumber:=myerrnum);
IF myerrnum = ERR_ROBLIMIT THEN
☑️2024 - RobotStudio® User Group0
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)
- 798 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings