Problem with 3 Independent Z-axis motors and Endstops
-
Make sure that in your homez.g sequence, you switch into relative movement mode using G91 before you make the G1 S1 ZUV move.
-
Thanks for the suggestion @dc42, G91 is already there before the first M584 splitting the drives and before the G1 ZUV move in Homez.g, and the G90 is at the end.
-
Try adding M400 after the M584 command, before the G1 S1 command.
-
@dc42 Adding M400 after M584 did not resolve the issue. In fact, adding M400 after the second M584 caused homez.g to hang.
homez.g
; Home 3 Independent Z-Axis DrivesM117 Homing Z axis...
M400 ; Wait for movement to stopG91 ; relative positioning
M584 X0 Y1 Z2 U3 V4 E5 P5 ; separate Z axis motors. P5 to display/drive 5 axis.
M400 ; Wait for movement to stop; The second time Homez is run, only the Z axis moves with this command (U and V do not move).
; Homez then hangs here for a couple of minutes, before continuing ...
G1 Z400 U400 V400 F500 S1 ; lower all z motors until each corresponding z-stop reachedG1 V-3 F200 S2 ; raise Z3 axis slowly (S2 Ignore endstops and ignore axis not homed)
G1 V10 F200 S1 ; lower Z3 motor slowly until its endstop reached
G1 V-3 F200 S2 ; raise Z3 axis slowly (S2 Ignore endstops and ignore axis not homed)
M400 ; Wait for movement to stopG1 U-3 F200 S2 ; raise Z2 axis slowly (S2 Ignore endstops and ignore axis not homed)
G1 U10 F200 S1 ; lower Z2 motor slowly until its endstop reached
G1 U-3 F200 S2 ; raise Z2 axis slowly (S2 Ignore endstops and ignore axis not homed)
M400 ; Wait for movement to stopG1 Z-3 F200 S2 ; raise Z1 axis slowly (S2 Ignore endstops and ignore axis not homed)
G1 Z10 F200 S1 ; lower Z1 motor slowly until its endstop reached
G1 Z-3 F200 S2 ; raise Z1 axis slowly (S2 Ignore endstops and ignore axis not homed)
M400 ; Wait for movement to stop; This test move before combining axis works
G1 Z-5 U-5 V-5 F200 S2 ; raise Z1 axis slowly (S2 Ignore endstops and ignore axis not homed)
M400 ; Wait for movement to stopM584 X0 Y1 Z2:3:4 E5 P3 ; Combine Z, U and V. P3 to display/drive 3 axis.
; Adding M400 here caused the homez.g to hang
;M400 ; Wait for movement to stop; This test move after combining axis also works now
G1 Z-5 F200 ; test raise all axis slowly
M400 ; Wait for movement to stopG90 ; absolute positioning
M400 ; Wait for movement to stopM117 Homing Z axis done
-
HI @dc42. Wondering if you had any further insight into this issue. Is it a firmware bug, or something with the configurations/gcode? Thanks.
-
I'll need to replicate your configuration and test it - that's on my list to do.
-
I've finally got round to testing this. There is certainly something odd going on. More later.
-
The strange behaviour I observed was because my config.g file already created an A axis before I added your bits. I fixed that, and now the Z homing of the 3 motors independently is working correctly. Both the original Z homing file in your original post and the most recent one that you posted work.
The only changes I made to your files were to change the M574 command to use NC switches, which is what my test rig has. The firmware I am using is slightly later than 2.02RC2.
I did find that adding the extra M400 command in homez.g caused the movement system to lock up, as you reported. I will fix this before I release 2.02RC4.
The config I am using is for a Cartesian printer. Is that what you are using, or is your printer a CoreXY? It may help if you post your complete config.g file.
-
PS:
-
On machines with heavy beds and high Z steps/mm, one possible cause of a Z motor sometimes moving the bed down when it should move up is that you are using too high a Z speed, acceleration or jerk; or just too low a current for the motors you are using.
-
If the Z motors that correspond to U or V move the wrong way after they are recombined, that can because by the U and V axes still being visible. You can run M584 without parameters to check the axis mapping and visibility.
-
-
It turned out that the "hang" when the extra M400 was added wasn't really a firmware hang, it was that the next move was being carried out so slowly that it was hard to see the motors move. I've fixed it in my latest firmware build. The same bug might have been responsible for other strange behaviour when axes are changed from visible to hidden and vice versa; so please try firmware 2.02RC4 on your machine when I release it - later today I hope.
-
The Z axis rotating in wrong direction was due to stepper current being too low. Thanks for that pointer!
Running CoreXY. Tested with firmware 2.02RC4. First Z axis move after recombining is carried out extremely slowly. Regardless of F value or distance it takes about 30 seconds to complete. I can see all three z axis motors turning very slowly.
-
@b3d said in Problem with 3 Independent Z-axis motors and Endstops:
Running CoreXY. Tested with firmware 2.02RC4. First Z axis move after recombining is carried out extremely slowly. Regardless of F value or distance it takes about 30 seconds to complete. I can see all three z axis motors turning very slowly.
Is that when using the same homez.g file that you posted earlier? If not, please post your current homez.g file.