Question about gcode and start-stop spindle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Is there a way to turn the spindle off mid run of a move? It's not really a spindle, I'm using the output to start/stop an adhesive pump, dispensing adhesive.
I have this sample block of code
N55 G0 X17.462 Y533.4 <start position
N65 G0 Z5. M3 <turn on spindle
N70 G1 Z0. F1500. < lower to work surface
N75 Y0. F20000. < Make run
N77 M5 <turn off spindle
But what I want to do is turn off the spindle 60mm from the end of the run, I'm assuming my only option is this,
N55 G0 X17.462 Y533.4 <start position
N65 G0 Z5. M3 <turn on spindle
N70 G1 Z0. F1500. < lower to work surface
N75 Y60. F20000. < Make run
N77 M5 <turn off spindle
N80 Y0 <continue to end of run
The issue is that the very short time the Y axes has to slow down and stop, turn off pump, then continue to Y0 is that it causes a very small build up of adhesive in that spot. It has to continue the rest of the way so it drags out the last bit of adhesive from the nozzle to the end of the run.
I'm going to try and max out my acceleration and see if I can get that time even shorter and minimize the puddle, but thought I would ask if there are any tricks to shut the spindle off without interrupting the run. I understand that gcode is a "do one thing at a time" type system so may not be a way around it other than some type of mechanics to interrupt the power to the spindle.
Thanks