After some intense discussing in the ESS forum, some of my problems are caused probably from noise, you have to set a debounce value for probe and index input, then the input-dependent moves (G32, G1 in G95 mode and G31) work actually right.
The second issue is in the whole threading process, so if someone sometimes wants to write an CAM postprocessor for Mach3 threading:
Mach3 has two threading modes: A normal one with a G32 command, and a special one. You can see this on the diagnostics screen with the "Threading" LED. If you enter a single G32 command, Mach3 waits for the trigger and executes the command, and leaves the threading mode. The problem the programmers had was that they couldn't continue the cut seamlessly for the retraction move, because an following G1 command in G95 mode would wait for its own trigger and thus causing an interruption. They hacked this with a special secret threading mode, you enter it with two G32 commands in a row - there mustn't even be a movement involved. In this special mode some changes are made: Even if the "G94 Mode" LED is still on, G1 commands following a G32 are executed as G32 commands too - with the feed per revolution. Thats why the retraction mode is per revolution even without an explicit G95 in the macro. The next and most important thing is that the cut is continous, in the sense of a single G32 with waypoints and no intial wait for the trigger. But different than in the "Mach3 threading guide", you should be in constant velocity mode, because in exact stop there will be still a slight delay at the "waypoints". And for all moves, the G32 the same like the chained G1 the feedrate is along the path and not fixed to the Z-axis. So, for tapered threads the F-value has to be corrected with the cosine of the taper, i.e. the standard M1076 macro does that wrong, but for a R thread with a taper of 1.78 degrees the difference is less than 0.1%. But if you ever want to make a breech screw, you have to take that into account ..
So, if you want to code anything after your G76 command, you're still in this special mode. You have to reset your feedrate and you can leave the mode with a M0 or G80. If you had G94 before, it's G94 afterwards. But I'm going to reset the feedrate to the original value in my version of the macro.