Z jogs in correct direction, but homes in the wrong direction
-
I'm using a Duet Wifi to retrofit an X-Machines Lorei Duo and everything works as it should, except that for some reason when I home Z, it goes in the wrong direction (+). I'm using an NPN inductive sensor and it's working correctly.
Also, possibly(?) related, when it's trying to home Z, but going up instead of down, the Y axis is moving slowly in the positive direction as well. No idea why Y would move when homing Z.
Here are my config.g and homez.g files. Any insights would be most welcome
0_1542515475189_homez.gJesse
-
-
When you use the Z jog buttons, does the Z axis move in the correct direction? Moving Z in the + direction should move the print head up or the bed down, to increase the distance between the print head and the bed..
-
Yep, jogging works as expected for all axes.
-
Your homez.g file starts by moving the head up or bed down by 5mm, then moves to X15 Y15, then moves the head closer to the bed until the probe triggers; then moves the head up/bed down 5mm again. What does it actually do when you try to home Z, after you have already homed X and Y?
-
@dc42 When running home Z, things start off normally: The head moves up 5 mm then moves to (15,15). But after that, instead of the head moving toward the bed and triggering the sensor, the head moves up and away from the bed.
-
Did you let it run through the homing routine?
Maybe the head is moving up an additional 5mm for the dive height?
-
My config looks similar, though I have my X and Y endstops configured opposite yours. (At the maximum positions, and active low.)
I would get the following behavior sometimes: the x/y axis would go to the probe point, and then the axis would lift by 5mm. This happened because sometimes, the Z probe was reading as triggered all the time, so the end code would run to lift the axis 5mm when it had finished doing the probe motion. It may be worth observing the "Z-probe value" in the DWC.
The fact that it lifts the Z axis to start the probe move means that your motors are correctly configured.
-
Ok, strange new results. After @timcurtis67 question about running the whole routine, I decided to try again starting with Z at about 1cm. Same behavior as before, but after the head had risen maybe 200mm, it suddenly stoped, moved to (0,0) and began to come back down. It continued until it smashed the sensor (triggered, btw) into the bed. It seems like when you home Z, it runs some additional gcode not included in the homez.g file.
@SupraGuy I had similar issues previously. After I inverted the input on my sensor, it's reading correctly: 0 open, 1000 when triggered.
-
G31 P500 X22 Y80 Z2.5
Is your x y probe offset accurate?
-
@phaedrux Yes, the offsets are accurate. The trigger height should be 4 instead of 2.5, but the rest is correct.
-
@theelectricmayhem Start with a fresh reboot. enter each line of the homez.g into the console, 1 line at a time, and observe the results. There are a number of things going wrong here and it would be good to break it down and identify what line of gcode is causing the issue.
Also to triple check - you are running home Z and not home All?
-
@t3p3tony Correct. When I do run Home All, I get a similar result: XY homing works fine, then the head begins moving away from the bed.
I ran homez.g line by line and here are the results:
G91 ; relative positioning
G1 Z5 F6000 S2 ; lift Z relative to current position
G90 ; absolute positioning
G1 X15 Y15 F6000 ; go to first probe point
; ======= everything up to this point ran as expected =========
G30 ; <== This is where things get strangeWhen I submit G30, it looks like the following is run:
G91 ; Relative positioning
G1 X0 Y100 Z100 ; Move head 100mm up and 100mm back
G1 X-15 S0 ; Ignores the X endstop and, since we're starting at (10,10), smashes the head into the support structure briefly
G90 ; Absolute positioning
G1 X0 Y0 ; Move to (0,0)
G91 ; Relative positioning
G1 Z-100 S0 ; Ignores the Z endstop and smashes into the bed -
I found a typo in my config.g file that was causing the head to crash into the bed, so thankfully that issue is solved.
Now when I run Home Z, I observe the following:
; Same as above except the head is stopped by the probe
G91 ; Relative positioning
G1 Z100 ; Go up 100mm
; At this point it looks like it's trying to run another routine. It violently smashes the head into the X endstop while moving in -Z and -Y. At that point I kill it. -
Found the issue! I hadn't deleted the deployprobe.g and retractprobe.g files, so somewhere burried in the G30 command, it was trying to deploy and retract a nonexistent probe.
Thanks for the help!
-
@theelectricmayhem said in Z jogs in correct direction, but homes in the wrong direction:
Found the issue! I hadn't deleted the deployprobe.g and retractprobe.g files, so somewhere burried in the G30 command, it was trying to deploy and retract a nonexistent probe.
Thanks for the help!
I'm glad you solved it - I'm sorry I didn't think of that explanation myself.