RobotStudio event

Skipping move positions before heading "Home"

Greetings Everyone,
New to Rapid programing. I recently encountered this issue on my program. After the cycles have been completed (lines 486-488) I was expecting the tool will extract the way it comes in, per line positions 494-495. Instead, the robot executes and easiest path to "Home" position (Line 497) which is too close to my part? What Instructions should I add on the bottom lines, to make sure it retracts safely away from the part as defined by lines 494-495.  Thanks in advance. 

482:  !MOTION-------------START
483: CyclesRemaining := CyclesSelected;
484: MoveL p100, v300, z5, GUN_9\Wobj:=Table
485: CycleStart:
486: MoveL p110, v300, z5, GUN_9M\Wobj:=Table;
487: MoveL p120, v300, z5, GUN_9M\Wobj:=Table;
488: MoveL p110, v300, z5, GUN_9M\Wobj:=Table;
489:  !MOTION--------------END
490:  !Repeat cycle logic-------------Start
491: Decr CyclesRemaining;
492: IF CyclesRemaining > 0 THEN
493:   GOTO CycleStrat;
494:   MoveL p110, v200, z5, GUN_9M\Wobj:=Table;
495:   MoveL p150, v200, z5, GUN_9M\Wobj:=Table;
496: ENDIF
497 Home; 


Tagged:

Comments

  • There is a p150 at the end that I don't see in the path to the work.
    Lee Justice
  • Thank you for responding. the P150 at the end was earlier entered before line 482 as a perched position prior to starting the motions, coming from Home position. I just repeat the step process but somehow skips.
  • Okay.  The robot ends the work cycle at p110 and then has p110 as the beginning of the path to get to the "home" routine.  Perhaps it ought to be p100?  Then p150.
    Lee Justice
  • Hi ...
    "492: IF CyclesRemaining > 0 THEN"
    It seems to me that your code will go through the points you mentioned correctly, however, "After the cycles have been completed" the program will go straight to the beginning.

    Try changing the instruction:
    "492: IF CyclesRemaining > 0 THEN" to "492: IF CyclesRemaining >= 0 THEN".
    This way you will also indent the last cycle.

    Good Work.
  • I see it now.  Those two move instructions should be after the ENDIF.
    Lee Justice
  • Thanks guys! let me try it on the program and see how it goes.
  • Lee,
    Moving the two-line positions 494-495 after the ENDIF solved the issue. Thanks!

    Madolas,
    I will try your suggestion too, Since I am having issue with my cycle counter. Maybe I need to indent the last cycle to make the counter work. Thanks!
  • You are welcome.  I was pretty sure that was it.  What are you spraying?
    Lee Justice
  • Flame Spray Coat Applications. Your favorite :D