CNC lathe thread cutting requires spindle RPM’s to be synchronised with machines linear movement, we call this spindle synchronisation.
To achieve this, controller needs to read feedback signal from machines spindle to obtain information at which RPM spindle rotates.
For this purpose we can use incremental (with quadrature A and B signals ) encoder or some sort of sensor that would read spindle RPM’s.
If we would use only sensor, we could use optical or magnetic sensor.
But since encoders already use index signal, choosing encoder would satisfy all our needs.
Encoder should rotate at same rotational speed as spindle. Normally it is mounted directly on spindle shaft or connected to spindle shaft via pullyes and timing belt. In such case make sure that transmission rate is at 1:1.
Encoder uses two quadrature signals, A and B and Index signal. For our purposes 100PPR(parts per revolution) encoder would do just fine.
Encoder is connected to controller via its CTRL header:
Encoder wiring for Mk3 controller:
Signal A from encoder is connected to EN4A pin and signal B from encoder to EN4B pin of CTRL header.
Index signal from encoder is connected to IDX pin of CTRL header.
Encoder wiring for Mk3/4:
Signal A from encoder is connected to ENC A pin and signal B from encoder to ENC B pin of CTRL screw type terminal.
Index signal from encoder is connected to IDX pin of CTRL screw type terminal.
PlanetCNC TNG encoder settings:
Encoder settings are located in: File/Settings/Input/Output/Spindle -> Encoder
PPR: PPR value of your encoder.
Index PPR: Number of index signals per one revolution of encoder.
Invert: Inverts Index signal.
Debounce: Debounce time period for index signal.
Video of thread cutting using lathe CNC machine and PlanetCNC TNG software and motion controller: