Just adding to Jasscnc reply. You will never get mach3 to thread correctly and reliably (been there got the tee shirt, cap and video)
The single pulse per rev is just not enough resolution to cut a thread
This was the one compelling reason that I changed to linuxcnc
Linuxcnc cut a thread on the first attempt and as done ever since The only failure I have had was when I tried to increase spindle speed beyond what the lathe could cope with in terms of accelerating the Z axis and decelerating it
I have a job that needs a M10 x 1.5 cutting on the end of an aluminium bolt. I thread at S500 in 10 passes with two spring passes fine every time.
The stability of linuxcnc over Mach3 is a very welcome bonus. Linuxcnc as never screwed up on a run of parts, I cannot say the same for mach3

now the setup of the two is a different matter all together. But a basic lathe setup can be done with the step and config wizard and is perfectly usable

Paul