Sequence restart is the way to go
here an example of treading cycle
Code:
(TOOL - 9 OFFSET - 9)
(TREAD TOOL 12 TPI INSERT - NONE)
( 7/8-14 )
N830 G0 X20. Z20.
NAT9
N840 T0909
N850 G97 S500 M03 M41
N860 G0 X1.075 Z.214 M09
N870 G71 X.7977 Z-.875 B29 D.0299 H.0773 M32 M73 F.0714
N880 G0 X20. Z20.
N890 T0900
N900 M01
if you still get problems , check if the pulse generator works correctly (but it usually set an alarm on the controller)