Okay I managed to make it work. My first approach was wrong. The end solution is really simple. I just had to use SFTON function.
This is the working code snippet if it helps somebody else in the future:
the main part is in the for-loop. What I do is I first extract the y axis value of my user coordinate origin point. The I add 20 cm to this value and set it back to the position variable. And then I activate my shift function with this position variable. And each loop iteration, the spline movement is shifted 20 cm in y axis.
Code
NOP
SET LI000 7
'Set user frame 7
MACRO1 MJ#(4) ARGFP047 ARGFP048 ARGFP049 ARGFLI000
'Get origin point:
CNVRT LPX004 PX047 UF#(7) TL#(5)
'Loop and shift 5 times
FOR I000 START= 0 TO 4
'Spline movement
MOVS C00000 V=33.3
MOVS C00001 V=33.3
MOVS C00002 V=33.3
'Add 20 cm to y axis:
GETE LD000 LP004 (2)
ADD LD000 200000
SETE LP004 (2) LD000
'Activate shift
SFTON LP004 UF#(7)
NEXT I000
'Turn off shift
SFTOF
END
Display More