5.6.6.3 Step and Direction spindle controller
To configure the spindle motor for Step and Direction control, check the Spindle Axis
Enabled boxes on the Port and Pins, Printer Port and Axis Selection Page tab (figure 5.1).
Leave PWM Control unchecked. Don't forget to Apply the changes. Define output pins on
the Output Signals Selection Page tab (figure 5.4) for the Spindle Step and Spindle
Direction. These pins must be connected to your motor drive electronics. Apply the changes.
Define External Activation signals in Ports and Pins and Configure>Output Devices to
switch the spindle motor controller on/off if you wish to take power off the motor when the
spindle is stopped by M5. It will not be rotating anyway of course as Mach2 will not be
sending step pulses but, depending on the driver design, may still be dissipating power.
Now move to Configure>Motor Tuning for the "Spindle Axis". The units for this will be
one revolution. So the Steps per Unit are the number of pulses for one rev (e.g. 2000 for a
10 times micro-stepping drive or 4 x the line count of a servomotor encoder or the
equivalent with electronic gearing).
The Vel box should be set to the number of revs per second at full speed. So a 3600 rpm
motor would need to be set to 60. This is not possible with a high line count encoder on
account of the maximum pulse rate from Mach2. (e.g. a 100 line encoder allows 87.5 revs
per second on a 35,000 Hz system). The spindle will generally require a powerful motor
whose drive electronics is likely to include electronic gearing which overcomes this
constraint.
The Accel box can be set by experiment to give a smooth start and stop to the spindle. Note:
that if you want to enter a very small value in the Accel box you do this by typing rather
than using the Accel slider. As spindle run-up time of 30 seconds is quite possible.