RobotStudio event

How to temporarily stop PP without using "fine" zone?

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



Maybe it's possible to use only MoveLSync instruction, but I can't understand how to hold PP in WHILE loop until the robot reaches point "p1".

Comments

  • lemster68
    lemster68 ✭✭✭
    edited August 2019
    While CRobT() <> p1 DO
      blah blah
    EndWhile
    Lee Justice
  • lemster68 said:
    While CRobT() <> p1 DO
      blah blah
    EndWhile
    I tried it, but it doesn't work because of z50 zone at point p1. 
  • Where is the next point?  You could factor in the z50.pzone_tcp, might have to throw in the Dist() function.
    Lee Justice
  • lemster68 said:
    Where is the next point?  You could factor in the z50.pzone_tcp, might have to throw in the Dist() function.
    Next point is p2, following after some logic expressions, which I want PP no to reach.

    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

    !Some Logic expressions
    ....

    TriggL p2,v300,Trig_Pos_Reached,z50,VacuumGrip;
  • You could also try to substitute stoppointdata for the zone, might have to create your own to satisfy what you need to do.
    Lee Justice
  • lemster68 said:
    You could also try to substitute stoppointdata for the zone, might have to create your own to satisfy what you need to do.
    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:

    PERS stoppointdata my_stopPoint:=[3,TRUE,[0,0,0,0],0,0,"",0,0];

    But, robot still waits for a period of time... What am I doing wrong?
  • Egor,

    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.  
  • Use inpos to start with, it looks like you used a fllwtime type and zeroed the follow time.  Inpos20 or make your own.
    Lee Justice
  • 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
    Lee Justice
  • SomeTekk said:
    Egor,

    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.  
    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.
  • lemster68 said:
    Use inpos to start with, it looks like you used a fllwtime type and zeroed the follow time.  Inpos20 or make your own.
    I tried with "inpos" type of stop, but robot still reduces speed up to zero for 0.1 s.

    PERS stoppointdata my_stopPoint:=[1,TRUE,[20,20,0,0],0,0,"",0,0];
    ....

    TriggIO Trig_Pos_Reached,50\DOp:=do_Pos_Reached,1;
    TriggL p1,v300,Trig_Pos_Reached,z0\Inpos:=my_stopPoint,VacuumGrip;

    !Some Logic expressions
    ...

    MoveL p2,v300,z50,VacuumGrip;


  • At at cursory glance it seems you might wish to investigate Option 624-1, Continuous Application Platform.

    I have had zero experience with CAP, but the objective you seem to be interested in achieving suggests, to me, it may be of some help.  
  • egor said:
    SomeTekk said:
    Egor,

    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.  
    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.
    That is the very purpose of WaitSyncTask, to prevent program synchronization until the other robot task is at the synchronization point.
    Lee Justice