Hello everyone, I need a little help with a program I am writing.

Basically I am going to start at x0y0z0, mill a profile, clear the tool to above the fixture, return to x0y0, and back down to z0. Then I need to step down .005 and run the profile over again.

Right now the code is telling it to go back to z0 after it clears the fixture and then incrementally move down .005. I need z to return to the same position as the last pass and then step .005. Is there a way to do this? See code below.

Thanks


G0Z1G0X0Y0
S3200
F10.4
M3
G90
G1Z0
G1X.46
G1Y.75
G1X0
G0Z1
G0Y0
G0Z0


M98 P1 L60
G0Z5
M30


O1
G91
G1Z-.005
G90
G1X.46
G1Y.75
G1X0
G0Z1
G0Y0
G0Z0 (Problem here.... need to return to previous passes z value)
M99