Click image for larger version. 

Name:	output.png 
Views:	2200 
Size:	13.7 KB 
ID:	27830

this is the diagram i have followed
so between GRD1 and OUT1 on the s axis there should be no voltage, this circuit is closed by the controller when spindle is switched on in mach3