So just to be clear: if you touch the clip to the plate - you get a light?
If you connect the clip to the tool and touch that to the plate you don't get a light?
If that's the case (which I think it is) then as I said, your wiring's incorrect.
Why? - because unless your spindle has ceramic bearings (and even if it had) your tool is likely at ground potential.
connecting ground to an active high plate is not going to activate it.
The problem is that (according to your data sheet) pin15 is a "dedicated" input (page 7) with a fixed pull-down resistor. This means pin15 HAS to be set active high. That means that to work - your tool HAS to be insulated from ground. This is a really bad way to do this.
Use one of the configurable inputs (2-9) and set pullup and set it to active low. Then get rid of the 120R resistor and connect your clip to ground. Clip it on the tool and test by touching the TOOL to the plate.
THEN we'll deal with that useless code.