I would think that that would involve a loop to change an offset. Check out this link it may help

G-Code Tutorial: Conditions and Looping

Bruce