Hi guys,
KSS 8.3, KRC4
I am in the midst of trying to understand how the approximate positioning works with SLIN and $ADVANCE.
I am programming a raster motion in a loop which means I am traversing over in "x" direction then the robot steps down a fixed amount in the "y' direction and then moves in the "-x" direction. This happens over and over again. The issue I am having is the total X distance is 425 mm. Once the 425 mm is moved in x, the robot then steps down in y 1.5 mm. As expected, the bigger I set the $ADVANCE value, the less the full x motion is actually executed. For example, at $ADVANCE=3, the x motion will be about 420 mm before stepping down in y. If I set $ADVANCE=5, the total x motion is more around 415 mm before stepping down in y. My code looks something like this:
FOR I=1:TOTALPOINTS
IF SOMECONDITION=TRUE THEN
SLIN_REL XSPACING WITH $VEL.CP=XXX C_DIS
ELSE
SLIN_REL YSPACING
ENDIF
ENDFOR
Is there a way to stop the advance run pointer when my x location gets close to the full 425 mm? I have tried putting a WAIT SEC 0 before the Y movement in the "ELSE" portion of the FOR loop, but that is not helping. A very important thing for me is that the "X" motions are smooth, but I can live with a slight pause when the "Y" motion moves down. Are there any "smart" ways to address this or do I just need to try to find an optimal $ADVANCE number and live with the ends of my "x" motions being chopped off?
Thanks guys.