Ian,
Thanks for helping me.
I write down shortly how I tested things and you will see that this is sure Mach fault/bug:
I've tried to first emulate the THC with keyboard and THC worked in THC min .. max. range, so that was OK.
Executed a program and before movement Mach wait for the Tourch on signal, that is also OK.
Then I pressed torch on key (emulated) then motion started which is again good.
If then I pressed THC down, Z moved down, if I pressed THC up, Z moved up, but it did not move out of range, so everything OK when emulating.
Then I go to check it with the LPT port instead of emulation, put the THC up and down and also the tourch on signals to different LPT port inputs.
The machine and plasma is now not connected at all, everything is on desk connected to a breakout board and buttons connected for the signals.
Now I executed the same program as before.
Program start.... before motion Mach waits for tourch on signal which is OK.
I press the torch on LPT pin and motion starts.
Now I press the THC down input and Mach pushes the Z axis down endless without limit, and this is where the problem is
Interesting is that for THC up it not allows the Z to go above the max. limit.
It works the same way on the machine setup too, however now it not pushes the Z down because g-code now includes a THC off and torch on and delay and THC on sequence. In this way the Arc Voltage gets in range before THC control switched on, so now everything works well, except that I feel this unsafe and wondering why Mach allows the Z to go under THC minimum.
Maybe you can tell me the version of Mach you are using? I will try to downlod and install it and will test it, maybe I have a version which have a bug,
however I've tried 2 versions, but maybe.....
Again thanks for your time with help Ian!
Cheers,
Balazs