Thank you very much for the detailed explanation. I have two suggestions for threading on a lathe: 1. At the end of the program, you can register G52 Y0, otherwise after the first pass, the system rewinds the Y coordinate, this happens for a long time. Try to cut the thread 2 times in a row on the same settings, you’ll understand what I’m saying. Perhaps there is another code to reset the coordinates. 2. You can cut the internal thread by inverting the x-axis. I created 2 buttons $3=1(inverting the axis) and $3=0 (returning to normal) in the toolbar. After threading, press the button $3=0 and the axis returns to its normal state. I really like your program, thank you for your work!