I would like to create a small delay of my advance pointer but still want to avoid the robot to stop because of that (when this delay is short enough to permit it).
I will receive my positions from an external software. At some point in the robot program, I will have to wait about 200ms before I get the next calculated buffer/points....
So in "college" style, my code would look like this :
START PROGRAM EXECUTION
$ADVANCE = 5 ;
SPTP point1 C_DIS ; ETA ~ + 300ms (need aprox 300ms before this point is being approched)
SPTP point2 C_DIS ; ETA ~ + 300ms
SPTP point3 C_DIS ; ETA ~ + 300ms
WHILE NextPointsReady == FALSE
DoNothing() ;;;;; For this example, let's pretend NextPointsReady will turn to TRUE (by SPS) after 200ms from the moment my advance pointer entered this loop.
SPTP point4 C_DIS ; ETA ~ + 300ms .
SPTP point5 C_DIS ; ETA ~ + 300ms .
SPTP point6 C_DIS ; ETA ~ + 300ms .
So you understand the idea is to use a WHILE statement to be able to WAIT_FOR a condition without stopping my advance between point 3&4.
I cannot use CONTINUE + WAIT_FOR (instead of WHILE) because the point 4 , 5, 6 cannot be calculated before the condition NextPointsReady is valid.
1) Does the above example has any chance to run smoothed all the way and without visible delay during/before/after?
2) Would it still work exactly the same if I have $ADVANCE= 3 (I assume yes)?
3) Would it still work exactly the same if I have $ADVANCE= 2 (I assume in best case will depend on the CDIS value compared to the distance to travel, worst case is not smoothing between 3&4)?
4) Let's assume that my WHILE loop never stops and $Advance=5 : will the robot go smoothly up to the point3 and then stop? (I believe yes)
I do not yet have a robot to test this, but this is kind of a key point for my thought.
I have experience with PLC and software programming but not much yet with Robots so I hope I was clear enough.