Looking at the MachTech documentation - that is a 5V device. It produces a 0-5v TTL signal.
docs: >>
4. Why would I need the VFD Filter? Sometimes machines that have a VFD or other
frequency drive motor controller create a noisy electrical environment. This is similar to static on
a radio when a power tool is operated but is conducted through the power wiring. The filter
removes the noise so that the MachTach can operate correctly. The noise can cause erratic
MachTach operation. You should not need an external filter as of V2.6 of the MachTach.
<<
The power input to the MachTech seems from the documentation to be driven from the same supply line as the VFD. Firstly I would isolate that supply using a simple 9v wall-wart. This will avoid most of the induced VFD noise.
The MachTech output should be a clean square wave. If the problem persists after fixing the power supply, borrow an oscilloscope and manually crank the lathe, then compare the signal with the lathe under power. If there is still noise on the TTL line, I would start by verifying that the cabling is shielded and grounded. Then as
Ironman suggests, take a close look at the hardware for damage/interference.
Machine noise is the devil to diagnose.
This is the image from the documentation - no circuit board is needed. The filter would connect in line with the 9V supply. But as I mentioned if you use an independent 9V source, this filter is not needed.