Hi,
Mach3 inputs are polled at about 10Hz known as the macro pump rate.
Machs inputs are not suitable for inputs which change very quickly, THC would be one example. Another would be the index signal from a spindle, even
a lathe spindle at only 300 rpm for threading has an index pulse every 5ms. This signal is used among other things to synchronise the start of the thread.
Mach needs to respond positively in something under 1/2ms to have any chance of being accurate.
Machs normal inputs are way way to slow to be of use in those circumstances.
Those high speed/critical timing signals are handled by the motion controller.
If you use a parallel port it may not be evident that you have a motion controller but you do. The parallel port driver takes numerical information from Machs motion
planner and uses the PCs CPU to produce high speed high accuracy pulse streams to the motor drivers. All in all the parallel port driver is a very clever bit of work.
So when Mach is running there are two bits, Machs GUI /motion planner and the Parallel Port Motion Controller.
The motion controller offers high speed signal control for a number of common CNC processes, THC and Lathe threading are two, but probing, homing and axis squaring
are among others. You can't program most motion controllers so you can only do what the maker of the controller built in. You may have seen Galil, Vital Systems and
PoKeys offer motion controller level programming, usually at extra cost. This low level high speed program code could be very useful for a project which requires
high speed signal processing that is not a standard motion controller feature. You will need to be a competent programmer to make sense of it.
The de-bounce is a number supplied to the motion controller from Mach to set the number of 'time slices (40us at 25kHz)' that a signal is to be monitored before the
signal in 'known to be good'. It is a kind of filtering arrangement designed to stop very rapid transient voltage signals from falsely be interpreted as a valid signal.
The length of the time slices gets shorter as the kernel frequency goes up. Lets say you had a problem signal and had it 'heavily' debounced for 10 time slices at
25khz, ie 400us. If you then upped the kernel speed to 45kHz (22us) you need to increase the number of times slices to maintain 400us filtering 400/22=18 (about).
The simple summary is that Machs input are good for slowly varying signals, a few Hz whereas the motion controller can handle signals well into the kHz range. Debounce
is a simple filtering technique and is convenient to do programmatically as opposed to fiddling with little capacitors.
Craig