Why even use a sub this is very simple to give a Z move at the end of each X axes move like, it should never be able to reach Zero tool setting is top of your part work zero every other move is a negative move until you have removed enough material
%
O3484
N1G17G40G80
T4
M6
G54
S2850M3
G90G0X0.Y0.
G43Z.1H4
G1Z-.01F40.
X10.
G1Z-.020
X0.
G1Z-.030
X10.
G0Z3.
M9
M5
M30
%