PDA

View Full Version : Estop requests



afc
06-20-2008, 02:27 PM
Hey guys,

I want to cut off my inputs when I throw the estop, spacebar or enter key. My outputs arent wired through the same relay as the spindle would be so it doesnt do that automatically. I know there should be a way to do this. I have tried writing-

ON INP(4,1) GOTO SETOUTPUTOFF

SETOUTPUTOFF:
SO 5,0
SO 6,0
SO 7,0

I've also tried-

ON INP(4,1) GOSUB SETOUTPUTOFF

SETOUTPUTOFF:
SO 5,0
SO 6,0
SO 7,0

RETURN

...and this doesnt work. How should I go about revising my code? Turning the outputs off is a safety issue so its pretty important I guess.