Virtual Controller CRobT/47 Argument Error
Laro88
✭
SysVirRapdev: Argument Error 19-04-2012 19:05:06 Controllers
Undefined if robot holds the tool or the workobject.
Here is the line causing the problem ( it is in a non motion task SEMISTATIC)
robtargetCurrentPos := CRobT (Tool:=tRapProgram WObj:=wobjRapProgram);
(I have tried with TaskRef:=TROB1Id as well)
So
Is there any way to do proper error handling so that the semistatic Task does not crash miserably...?
Best regards
Undefined if robot holds the tool or the workobject.
Here is the line causing the problem ( it is in a non motion task SEMISTATIC)
robtargetCurrentPos := CRobT (Tool:=tRapProgram WObj:=wobjRapProgram);
(I have tried with TaskRef:=TROB1Id as well)
So
Is there any way to do proper error handling so that the semistatic Task does not crash miserably...?
Best regards
0
Comments
-
How have you defined your variables tRapProgram and wobjRapProgram?Are they PERS or TASK PERS. They need to be PERS, otherwise you will not share your data between your tasks. I did that mistake and got the same error code as you.The program works for you when you do the movement instructions with tRapProgram and wobjRapProgram?Here is my 2 modules, and this works fine:Robot task:MODULE MainMoves
PERS bool run_CRobt:=FALSE;
TASK PERS tooldata tool1:=[TRUE,[[0,0,0],[1,0,0,0]],[10,[103,0,108],[1,0,0,0],0,0,0]];
PERS tooldata L10tip:=[TRUE,[[138.695,150.023,98.9783],[0.709396,-0.704707,-0.00856676,0.00851007]],[10,[103.6,-0.7,108.5],[1,0,0,0],0,0,0.12]];
CONST jointtarget jpos10:=[[0,0,0,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
CONST jointtarget jpos20:=[[-10.4956,10.1942,43.8338,-15.7201,-46.1733,13.6386],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
CONST robtarget p10:=[[933.43,-156.03,885.18],[0.714349,0.00968503,0.699448,0.0196065],[-1,-1,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
CONST robtarget p20:=[[869.38,-650.65,553.29],[0.00200615,0.711693,-0.702145,0.0219609],[-1,-1,-1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
CONST robtarget p30:=[[869.38,335.71,553.30],[0.00200546,0.711693,-0.702145,0.0219654],[0,0,-2,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
CONST robtarget p40:=[[1200.65,335.71,553.30],[0.00200207,0.711693,-0.702145,0.0219671],[0,0,-2,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
CONST robtarget p50:=[[1200.65,-470.31,553.29],[0.00200949,0.711694,-0.702144,0.0219611],[-1,-1,-1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
CONST robtarget p60:=[[1067.01,-118.30,553.30],[0.0020111,0.711694,-0.702144,0.0219675],[0,0,-2,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
PROC main()
WHILE TRUE DO
MoveAbsJ jpos10NoEOffs, v1000, z50, tool0;
MoveJ p10, v1000, z50, tool1;
MoveJ p20, v1000, z50, L10tip;
run_CRobt:=TRUE;
MoveL p30, v1000, z50, L10tip;
MoveL p40, v1000, z50, L10tip;
MoveL p50, v1000, z50, L10tip;
MoveC p60, p40, v1000, z50, L10tip;
MoveL p50, v1000, z50, L10tip;
MoveJ p20, v1000, z50, L10tip;
run_CRobt:=FALSE;
ENDWHILE
ENDPROC
ENDMODULESemistatic task:MODULE BCK_TEST
PERS bool run_CRobt;
PERS robtarget BCK_p1:=[ [0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [ 9E9, 9E9, 9E9, 9E9, 9E9, 9E9] ];
PERS tooldata L10tip;
PROC main()
WaitTime 10;
WHILE TRUE DO
WaitUntil run_CRobt = TRUE;
BCK_p1 := CRobT(TaskName:="T_ROB1" Tool:=L10tip);
WaitTime 0.01;
ENDWHILE
ENDPROC
ENDMODULE0
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)
- 800 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings