M556 axis compensation for a CNC
-
@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
-
-
I put some tape on either motor coupler and ran Y homing from different start positions, very slowly and absolutely confirmed this working in action. I've now squared the CNC, by adjusting one of the sensors until my dial gauge read the same from one end of the linear rail to the other, when sliding it along a square. It's probably not perfect, but it should do for now, at least as proof to myself that I can do it this way.
Notably, I also had to up my idle motor currents a little so it wouldn't go back out of square when they timed out. That's the I value on M906, where you set your motor amps.
-
@jay_s_uk what do we do if we only hve 1 axis motor?
I got here searching for M556 as well. I set a piece of long stock in the machine and thought I had properly trammed it. I'm of about 0.3 in 200mm, I thought no biggie, I will just use the FW to skew corrrect instead of unclamping and realigning.
Can we use M556 to tansform the coordiante system to account for crooked material or fixturing?
-
@sinned6915 if you're accounting for stock skew use G68 https://docs.duet3d.com/en/User_manual/Reference/Gcodes#g68-coordinate-rotation