halui.spindle.start on resume not working

More
23 Jan 2018 18:04 #104906 by IrishMoss
So I'm slowly making progress with my custom hal config.
I've currently got this in custom.hal:

net pause halui.program.pause <= parport.0.pin-12-in
net is-paused halui.program.is-paused => halui.spindle.stop
net resume halui.program.resume <= parport.0.pin-12-in-not
net resume halui.program.resume => halui.spindle.start

When the relay on pin 12 trips, it correctly pauses the program and stops the spindle.
When the relay closes, the program resumes.
Unfortunately, the halui.spindle.start doesn't get executed on resume.

I realize I'll need some more logic in there at some point, as I'll want a short pause to allow the router to get up to speed before the steppers start going again. But for now I just want to see if I can get the spindle to restart on resume.

i'm sure i'm missing something obvious... again. :(

Please Log in or Create an account to join the conversation.

More
23 Jan 2018 20:24 #104920 by IrishMoss
I think I know why it's not working.
Since "net resume halui.program.resume <= parport.0.pin-12-in-not" executes a resume, there's nothing for "net resume halui.program.resume => halui.spindle.start" to do, since th job has already been resumed.

I feel like I need something like: "net on-resume halui.program.on-resume => halui.spindle.start"
I know the 'on-resume' function doesn't exist, but i have to imagine there's a workaround somewhere that would provide the same functionality.

Please Log in or Create an account to join the conversation.

More
23 Jan 2018 22:21 #104925 by IrishMoss
Well, my assumption was wrong. I've cut my custom.hal file down to just this:
net is-paused halui.program.is-paused => halui.spindle.stop
net resume halui.program.resume => halui.spindle.start

Clicking pause in the Axis gui stops the spindle (and the steppers of course).
But clicking resume only starts the stepper motors. The spindle remains off.
I've also tried "net is-running halui.program.is-running => halui.spindle.start" to turn the spindle back on (even though i don't think that's the right way to go about it), but it errors with "can't do that (EMC_SPINDLE_ON) in auto mode with interpreter waiting"

Might be time for a break... and come back tomorrow with a fresh head. :huh:

Please Log in or Create an account to join the conversation.

More
18 Feb 2018 11:09 #106124 by andypugh
I think that spindle-stop will set the spindle speed to zero as well as turning it off. Spindle start will then start it at zero speed.

So you will need to find another way to stop the spindle, or find a way to restore the spindle speed too.

Please Log in or Create an account to join the conversation.

Time to create page: 0.062 seconds
Powered by Kunena Forum