Losing square on job cancel

I am using Octoprint for control, and I am squaring as part of my startup procedure, clamping the rails to a large machinist square then powering up the motors. I plan to make some rail clamps to act as manual end stops to simplify this process a bit (I dont have the dual endstop setup, and my board wont support it for now).

My problem comes, however, if I have to cancel a job. The machine keeps coordinates, so I can make any CAM adjustments and re-run with reasonable accuracy…but the motor disengage and I lose square.

Does anyone know a way to keep the motors engage on job cancellation? Even if I get the stop blocks placed properly, I would then sacrifice my coordinate by pushing the gantry against them. Any suggestions?

Thanks!

I think the octoprint settings let you configure what gcode gets sent on cancel.

Hmm, thanks…it looks like Octoprint is endlessly configurable if one doesnt mind messing with the code. I only know enough coding to be dangerous. I will have to wait until I get home to see if the option is easily accessible in the UI. Either way, I will check it out, thanks!

Thinking out loud, I wonder about a few things:

  1. Lets say I put hard stop block on my rails, touching the x and y motor carriages with the gantry a: square and b: zeroed to my hard stop point on the table where I g28 the x and y. every time the motors cut, I pushed up against the block before re-engaging, would that be more, less, or about as accurate for picking up a table zero as the g28 against aluminum plates mounted to the table itself?

  2. I could always make up 8 removeable clamps, pause my job first, lift the z, then clamp on either side of each motor carriage, then cancel, re-energize, remove the clamps. This would have the added benefit of being able to preserve square with the machine power cut, just having to re-bump the home blocks at next startup.

Yes, open source code means that you’ll never be limited on what changes you’d like to make, because you can always change the source code. But this is a feature they have provided to the end user:

Oh wow, that looks like an easy fix, thanks! Unfortunately I am not home to have checked that myself, so I appreciate the screenshot.

1 Like

damn, should have read further along. Now I have almost that exact screenshot in the buffer…

So, I indeed found these settings last night and commented out the M84. Didnt get a chance to test, but I dont see why it wouldnt work.

I also added some lines to the post-pause and pre-resume sections to save the last position, raise to safe-z and go back before resuming.

The big thing though is I printed up some hard stop clamps for the rails near my table origin. I added the clamps once I got the gantry as square as I possibly could, so now to square it on start I just push against the stop clamps and I can leave the machinist square on the shelf. I tested it though a power off cycle and it repeated beautifully. Not sure why I hadnt done this sooner!

Unfortunately this does reveal JUST how out of square the gantry is as built…but with a 4’ Y-axis rail, I am not sure what could reasonably be expected. I’ve messed with the clamp bolts over and over and never could get it square with power off. Only with the motors holding could I ever get a really square result…I guess that is the point of the dual endstops, so I am guessing my situation is not unique.

Thanks all for the help!

When levelling my printer I’m using M84 S0 to disable the idle timeout for the stepper motors.
As I think this might be a hidden default otherwise: if my printer is doing nothing for some minutes it disables the steppers after some minutes.
M84 S0 prevents this. You might try that as well.

Thanks!

Not sure what would happen when the machine turns on and sits idle, but I know that the MPCNC post processor for Fusion 360 calls M84 S0 in the beginning of the job, and doesnt appear to call it again.

So once the first program runs, the timeout would be turned off. Usually when I turn on my machine, it is running a program very shortly after. We could also put M84 S0 in Octoprint Scripts in the “after connection to printer is established” section.