M556 axis compensation for a CNC
-
I've built a CNC router, and it's X axis is approximately 1mm out of square across the 640mm between each of the two Y ballscrews, or 0.15-0.2mm out of square across a 100mm test cut I carried out.
In the test, we'll say that at X0, Y effectively cut at 0, and after a move of X+100, but no move on Y, the effective cut was Y+0.15-0.2mm.
I'm not really certain how I use the M556 command, documented here for the Omerod.
My assumption is that I use M556 S100 X0.17
But this could just as easily be X-0.17
Do I just try the command and find out?
-
-
-
@jrow why not change the homing?
split the 2 y motors out to y and u, adjust whichever one is off and then recombine them again -
@jay_s_uk I've tried the manual version of this; turning off and unplugging steppers, and turning each axis by hand. But if I turn in the undesired direction, it skews further, and if I turn in the desired direction, there's spring in the machine and it comes back to the skewed position. Rather than having to dismantly the X & Z axis, and do some more drilling I'd really love to be able to fix this with software.
-
@jrow this is a software fix. i assume you have 2 enstops for y?
-
@jay_s_uk no; just the one.
-
@jrow and is it 2 motors for y?
you're best off adding another endstop for y and then you can fix the skew during homing.
thats the only way you've be able to control it as theres nothing keeping the motors in sync. they can jump up to 2 full steps when energising -
@jay_s_uk and so with the second sensor, what's the procedure to get the motors to adjust to the correct position?
Also; I didn't know that about steppers starting up.
-
@jrow where typically now you home Y and rely on 1 endstop to stop them both, you would effectively remap one of them at the start of homing and use a second endstop
e.g. for homey (assuming y Motor uses 1 and 2)M584 Y1 U2 ; remaps axis. assuming you've already mapped the second endstop to U G91 ; relative movement G1 H1 Y-400 U-400 F1800 ; first homing pass G1 H2 Y10 U10 ; move away from endstops G1 H1 Y-400 U-400 F180 ; second homing pass G1 U0.5 ; move U by 0.5mm to make axis square G92 U0 ; reset U to 0 G1 H2 Y5 U5 ; move away by 5mm G90 ; absolute movement M584 Y1:2 ; recombine axis
The above assumes the skew requires positive movement on the U to bring it square
-
@jay_s_uk so I took my sensor out of my X axis, with the intention of using a regular microswitch for that, and somehow broke the head off it. Might've been a good thing. Could've been broken before I moved it, and might've caused a crash on X.
Is there a way to manually enter the skew via M556 since I'm now out of appropriate sensors?
I assume no, as you mentioned the steppers can move while energising.
-
@jrow you could try sending M556 Y whatever. never used it though. see what happens
-
@jay_s_uk so, I am finally getting around to adding a second endstop to my Y, to auto-square the axis. I found this post on the forums, which says:
@fcwilt said in 3 Z steppers - can I move it individually?:
You need to have an M574 command something like this (from my printer) ...
M574 Z1 S1 P"!duex.e2stop + !duex.e3stop + !duex.e4stop"*
... where you specify each endstop in the order the matches the Z stepper assignments in the M584 command (from my printer)
M584 X0 Y1:2 Z5:6:7 E3My current setup is:
M574 Y2 S1 P"io2.in"
M584 X3 Y0:1 Z2My assumption based ont he above is that if I change the first line to P"io2.in + io5.in" where io5.in refers to the second endstop, this should home the Y axis to both endstops automatically, without having to specify moving motors individually. Am I on the right track here?
I would of course still have to introduce an adjustment on one of the Y steppers, after homing, assuming my endstops aren't perfectly aligned.
-
@jrow thats correct. You just add the second endstop in M574.
And you're also correct that you'd have to split the axis to adjust either of the motors if the gantry isn't square -
@jrow said in M556 axis compensation for a CNC:
My current setup is:
M574 Y2 S1 P"io2.in"
M584 X3 Y0:1 Z2My assumption based ont he above is that if I change the first line to P"io2.in + io5.in" where io5.in refers to the second endstop, this should home the Y axis to both endstops automatically, without having to specify moving motors individually. Am I on the right track here?
I would of course still have to introduce an adjustment on one of the Y steppers, after homing, assuming my endstops aren't perfectly aligned.
It should work fine. I just tweaked the position of one of the endstops still it was perfect (enough).
Frederick
-
@fcwilt I'm a bit nervous here. When I try M119, with M574 Y2 S1 P"io2.in + io5.in" set, I only get an endstop triggered if io2.in is triggered. Due to the nature of the machine I really don't want to try bending it. Is there a way to check that my config is correct beyond what I've already specified?
The documentation for M574 only mentions multiple endstops for Z. I'm worried it's possible that it wasn't implemented for Y.
-
@jrow its implemented for Y as i'm using it
try mapping just the io5 for Y and testing it -
-
@jrow it doesn't. not sure if the endstop plugin reports any different https://github.com/Duet3D/DSF-Plugins/releases
-
@jrow said in M556 axis compensation for a CNC:
@fcwilt I'm a bit nervous here. When I try M119, with M574 Y2 S1 P"io2.in + io5.in" set, I only get an endstop triggered if io2.in is triggered. Due to the nature of the machine I really don't want to try bending it. Is there a way to check that my config is correct beyond what I've already specified?
The documentation for M574 only mentions multiple endstops for Z. I'm worried it's possible that it wasn't implemented for Y.
No it works for any axis.
I just checked the Object Model viewer and it only shows one endstop.
To test just issue a M564 H0 which allows jogging any axis even if not homed. Then jog the Y axis to the middle. Issue a very slow home command G91 G1 Y### F100 where ### is a value appropriate for your printer but not large enough to reach the end of the axis. For example, if your axis range is 300 then use 125 which will stop short of the end of travel. Of course you have to use the correct plus or minus value depending on the direction you need to move. Then you will have time to manually trigger each endstop sensor to see if the associated stepper stops moving.
When you are done issue a M564 H1 to cancel the one above.
Frederick
-
Yup, I have confirmed homing via this method now. But in trying to install the endstop plugin, I think I messed up my DWC. I had a CNC specific version of it installed, and attempted to update to the current DWC (3.4.1), and I don't have the menus the plugin suggests.
Is it something worth creating a ticket about, regarding M119? Is that a bug; that it doesn't report multiple endstops?
-
@jrow said in M556 axis compensation for a CNC:
Yup, I have confirmed homing via this method now. But in trying to install the endstop plugin, I think I messed up my DWC. I had a CNC specific version of it installed, and attempted to update to the current DWC (3.4.1), and I don't have the menus the plugin suggests.
Is it something worth creating a ticket about, regarding M119? Is that a bug; that it doesn't report multiple endstops?
I don't use that plugin so I cannot tell you anything about it.
Regards M119 you would need to ask @dc42.
Frederick
-