OK so this is a lathe, you can do threading on a lathe no problem.
You will however have to have a once per revolution pulse. The index pulse on your encoder is no use for this as the duration is too short for the parallel port to see reliably (if at all)
Most people use an optical switch and a slotted disc on the spindle, the one I use is Optek 917b.
Hood