M3 turns the spindle on
M5 turns the spindle off.
That control should take a command like S1000 M3 (spindle speed = 1000 rpm, turn on spindle)
M5 can be on a line of it's own.
If you have the Spindle Manual/Auto switch on the back of the panel, the spindle relay might be installed.