My first try doesn’t work… Robot stops at WHILE loop.
TriggIO Trig_Pos_Reached,50\DOp:=do_Pos_Reached,1;
!do_Pos_Reached set high 50 mm before point “p1”
TriggL p1,v300,Trig_Pos_Reached,z50,VacuumGrip;
WHILE do_Pos_Reached=0 DO
TPWrite “PP inside”;
ENDWHILE
This second try, but it’s still working badly:
TriggIO Trig_Pos_Reached,50\DOp:=do_Pos_Reached,1;
!do_Pos_Reached set high 50 mm before point “p1”
TriggL p1,v300,Trig_Pos_Reached,z50,VacuumGrip;
MoveLSync p1,v300,z10,VacuumGrip,“PP_Catcher”;
…
PROC PP_Catcher()
WHILE do_Pos_Reached=0 DO
TPWrite “PP inside”;
ENDWHILE
ENDPROC
I think, I need data type of stoppointdata, which is synchronized with the RAPID program execution, i.e. component “progsynch” needs to be TRUE.
I tried to create my own stoppointdata:
Between your original post about when a TRAP routine is executed and the PP being halted, could you please explain (without references to RAPID code) the job the robot is endeavoring to accomplish?
Further, is this a multi-move system? That question is posed because the WaitSyncTask instruction was used, which is not of much value (IMO) in a single manipulator system.
Another approach would be to create a function that returns TRUE when the robot is near the position, refer to the Dist() function I mentioned earlier. Pseudocode follows:
While NOT fDistanceCheck DO
Blah
Blah
Maybe your motion…
ENDWHILE
FUNC bool fDistanceCheck
IF Some code here to evaluate CRobT() Dist() to end point
RETURN TRUE
ELSE
RETURN FALSE
ENDIF
ENDFUNC
Yes, it’s a multi-move sysytem. First robot is waiting workobject, then picks object and moves to point p1. Syncronization occurs between points p1 and p2. I want to prevent syncronizing before first robot reaches position p1.