I'll try to explain the issue.
Beside the spindle has an air drill. Initially the drill is high and the microswitch is activated or INPUT # 1 is high.
When the drill is driven by Gcode, an air piston down the drill and the microswitch is deactivated, ie, INPUT # 1 goes down.
The drill must return to the top, microswitch trigger to HI , releasing the CNC advances to the next hole.
I hope I have explained well.
Nemo