G92 Cnnn enforces position within unrelated Y axis limits 3.2.2
-
Hello,
I'm currently building a custom toolchanger based on the head from E3D. One of the upgrades I made was having switches at the docks to see if a dock is present or not and then be able to store away any unknown tool before homing Z.
It's a bunch of code that eventually boils down to having to "home" the coupler. This doesn't quite work with a tool attached and I opted for a different route.
Instead of actually trying to home it, I assume that the coupler is in its locked position (there's a tool attached afterall) and I just "home" it by using G92 C230 where 230 is its normal locked position.
Afterwards I can then just unlock it normally to release the tool. This part works fine (still open for better ideas though)Now the issue is the following: For safety reasons, my docks are outside the normally reachable movement area and I have to allow for movements outside via the usual M564 S0 / S1.
When issuing my G92 C230 however, it enforces the Y axis value (which at this point in time is outside normal limits) to be within the limits again. So it jumps from the normal 300ish to my limit of 250. It does not move, it just changes where it thinks it is.Is this intended behavior? If so, is there an easy way around it? I could simply home Y (and for safety X as well) again after uncoupling the tool, but that kinda feels like a hack.
Any ideas?
-
What firmware version?
Where do you see the Y position change?
-
@Phaedrux Duet 2 Wifi + Duex 5 running version 3.2.2 (2021-02-11)
The displayed position (on DWC and PanelDue) changes as soon as I enter the G92 command (either via macro or manually) -
I confirm this behaviour and I will fix it in the next 3.3beta release. Meanwhile you can use M564 S0 before the G92 command to prevent axis limits being applied.
-
@dc42 Thanks for investigating, I'm afraid, the M564 doesn't change anything though, I already have that in there (had the idea that this might help as well)
This is my relevant code that stores away an unknown tool:
M564 S0 ;go to correct dock if sensors.gpIn[0].value = 0 M98 P"/macros/Toolchanging/Advanced/MoveToDock/T0" elif sensors.gpIn[1].value = 0 M98 P"/macros/Toolchanging/Advanced/MoveToDock/T1" ;elif sensors.gpIn[2].value = 0 ; M98 P"/macros/Toolchanging/Advanced/MoveToDock/T2" ;elif sensors.gpIn[3].value = 0 ; M98 P"/macros/Toolchanging/Advanced/MoveToDock/T3" ;take care of C M564 S0 G92 C230 ;we have a tool attached, it is safe to assume that C is currently in the "locked" position, so "home" C by telling it that M98 P"/macros/Toolchanging/Coupler - Unlock" ; then unlock coupler normally ;move away from dock M98 P"/macros/Toolchanging/Advanced/MoveToDock/MoveOut" M400 ;wait for all docking moves to finish before checking dock state if sensors.gpIn[0].value = 0 || sensors.gpIn[1].value = 0 ;|| sensors.gpIn[2].value = 0 || sensors.gpIn[3].value = 0 M291 S1 T5 P"Can't dock unknown tool, aborting..." R"Docking tool failed" abort ;re-home X/Y due to G92 Cnnn resetting XY to be within normal limits again M98 P"homey.g" M98 P"homex.g" M564 S1
For the meantime I'm happy enough with re-homing after undocking, so for me there is no hurry.
-
Strange, I tested M564 S0 and it fixed it for me, sending commands manually from the command line.