Hey
It seems that the RSI POSCORR block is paused if the running KRL code runs a WHILE or FOR loops.
As a example, we connected a SIN to the Z input of POSCORR block while running the next KRL:
The test code loops for a relative linear movement and changes direction after 10 iterations.
Code
"...
ret = RSI_CREATE("rsi2.rsi",CONTID,TRUE)
IF (ret <> RSIOK) THEN
HALT
ENDIF
ret = RSI_ON(#ABSOLUTE)
IF (ret <> RSIOK) THEN
HALT
ENDIF
WHILE TRUE
IF PARAM1==1 THEN
IF PARAM2==1 THEN
FOR C = 1 TO 10
LIN_REL{Y 10}
ENDFOR
PARAM2=0
ELSE
FOR C = 1 TO 10
LIN_REL{Y -10}
ENDFOR
PARAM2=1
ENDIF
PARAM1=0
ELSE
PARAM1=1
ENDIF
ENDWHILE
RSI_MOVECORR()
ret = RSI_OFF()
IF (ret <> RSIOK) THEN
HALT
ENDIF
..."
Display More
The resulted behavior is that each time a FOR or WHILE loop restart a new iteration, the POSCORR pauses shortly from following the SIN wave. When the loop begins again, the robot makes fast correction, since the SIN wave was still running and the robot has to make a large correction in order to catch up due to the POSCORR short pause.
KR C4 V8.3
RSI V3.3
Any comments would be greatly appreciated.
Thank you very much
Kind regards,
Avi