z-homing failed with mini IR



  • Hi,

    I recently upgraded my printer with a second z-axis stepper and a mini IR probe on duet 2 wifi. for some reason I'm not able to home z, it throws me an error.

    Error: Probe points P0 to P1 must be in clockwise order starting near minimum X and Y
    Error: Homing failed

    my first thought was I should change the order of the probe points, but it didn't help, still the same error.

    here is the part of my config.g

    ; Drives
    M569 P0 S0 ; Drive 0 goes backwards
    M569 P1 S1 ; Drive 1 goes forwards
    M569 P2 S1 ; Drive 2 goes forwards
    M569 P3 S1 ; Drive 3 goes forwards
    M569 P4 S1 ; Drive 4 goes forwards
    M584 X0 Y1 Z2:4 ; Assign drives
    M593 F25 ; cancel ringing at 40.5Hz
    M350 X16 Y16 Z16 E16 I1 ; Configure microstepping with interpolation
    M92 X80.00 Y80.00 Z400.00 E415 ; Set steps per mm
    M566 X480.00 Y480.00 Z90.00 E300.00 ; Set maximum instantaneous speed changes (mm/min)
    M203 X18000.00 Y18000.00 Z900.00 E3000.00 ; Set maximum speeds (mm/min)
    M201 X1500.00 Y1500.00 Z500.00 E250.00 ; Set accelerations (mm/s^2)
    M906 X900.00 Y900.00 Z1200.00 E800.00:1200 I30 ; Set motor currents (mA) and motor idle factor in per cent
    M84 S30 ; Set idle timeout

    ; set coordinates of leadscrews
    M671 X-27:262 Y117.5:117:5
    M208 X0:235 Y-2:228

    ; Axis Limits
    M208 X-5 Y-10 Z0 S1 ; Set axis minima
    M208 X235 Y235 Z250 S0 ; Set axis maxima

    ; Endstops
    M574 X1 Y1 S1 ; Set active high endstops
    M574 Z0 S0

    ; Z-Probe
    M558 P1 H5 F120 T6000 ; Set Z probe type to switch and the dive height + speeds
    G31 P500 X-5 Y20 Z3.547 ; Set Z probe trigger value, offset and trigger height
    M557 X10:225 Y15:210 S20 ; Define mesh grid

    the bed.g

    ; bed.g
    ; called to perform automatic bed compensation via G32
    ;
    ; generated by RepRapFirmware Configuration Tool v2 on Mon Dec 24 2018 14:30:36 GMT+0100 (Mitteleuropäische Normalzeit)
    G28
    G30 P0 X200 Y110 Z-99999 ; probe near a leadscrew, half way along Y axis
    G30 P1 X15 Y110 Z-99999 S2 ; probe near a leadscrew and calibrate 2 motors

    and the homez.g

    ; homez.g
    ; called to home the Z axis
    ;
    ; generated by RepRapFirmware Configuration Tool v2 on Mon Dec 24 2018 14:30:37 GMT+0100 (Mitteleuropäische Normalzeit)
    G91 ; relative positioning
    G1 Z5 F6000 S2 ; lift Z relative to current position
    G30 P0 X200 Y110 Z-99999 ; probe near left-hand leadscrew
    G30 P1 X15 Y110 Z-99999 S2 ; probe near right-hand leadscrew and calibrate 2 motors

    ; Uncomment the following lines to lift Z after probing
    ;G91 ; relative positioning
    ;G1 S2 Z5 F100 ; lift Z relative to current position
    ;G90 ; absolute positioning

    Any help is highly apprechiated.

    Thanks
    gueee



  • It looks like your homez.g matches your bed.g. Typically you would want your homez to probe a single point in the center of your bed.



  • @phaedrux
    How do you get your IR sensor to home in the center of the bed? Mine does X and Y (don't remember the order) then at the edge, off the bed does Z. I have to double stick/tape a flat peice if plastic off the side of the bed to make it see it. My Z is aways a few mm below the bed level calibration. I have been thinking to use the Z end stop I have again to set Z instead of the IR sensor to fix this but haven't looked into separating those two functions yet. (Z and bed level compensation).



  • @bluedust Use a G1 movement to position the probe before using G30 to probe it.

    G90 ; absolute positioning
    G1 X150 Y150 ; move to bed center
    G30 ; probe z height
    

    Is that what you mean?

    https://duet3d.dozuki.com/Wiki/ConfiguringRepRapFirmwareCartesianPrinter#Section_Homing_Z



  • @Phaedrux it does match cause I've got dual independent z-axis, so I could level the x-gantry.



  • @phaedrux said in z-homing failed with mini IR:

    G30

    I am not sure if that is what I mean...

    This is my current Code.

    ; Endstops
    M574 X1 Y1 S1 ; Set active high endstops

    ; Z-Probe
    M574 Z1 S2 ; Set endstops controlled by probe
    M5+58 P1 H5 F120 T6000 ; Set Z probe type to unmodulated and the dive height + speeds
    G31 P500 X0 Y-42 Z1.45 ; Set Z probe trigger value
    M557 X100:200 Y100:200 S100:100 ; Define mesh grid

    I wanted to do something like this, I just don't know if I can, or if there is more to it.

    ; Endstops
    M574 X1 Y1 Z1 S1 ; Set active high endstops

    ; Z-Probe
    M5+58 P1 H5 F120 T6000 ; Set Z probe type to unmodulated and the dive height + speeds
    G31 P500 X0 Y-42 Z1.45 ; Set Z probe trigger value
    M557 X100:200 Y100:200 S100:100 ; Define mesh grid

    But if I can make my IR Z Probe Home to the center of the bed, and not off the bed, that would be perfect.

    I am not sure how to use G1, or G30 as they are not currently in my config. I will have to look into them. I am currently printing, but will play when it's completed. Also note, I have a CoreXY, not a Cartesian. Not sure if that changes things.

    Thanks!



  • @gueee78 said in z-homing failed with mini IR:

    @Phaedrux it does match cause I've got dual independent z-axis, so I could level the x-gantry.

    In that case you could use a G32 in the homez to call bed.g to level the bed, and then use a single G30 in the center as shown above to set the z height.

    G32 ; call bed.g to level the bed
    G90 ; absolute positioning
    G1 X150 Y150 ; move to bed center
    G30 ; probe z height
    


  • @bluedust said in z-homing failed with mini IR:

    I wanted to do something like this, I just don't know if I can, or if there is more to it.

    ; Endstops
    M574 X1 Y1 Z1 S1 ; Set active high endstops

    ; Z-Probe
    M5+58 P1 H5 F120 T6000 ; Set Z probe type to unmodulated and the dive height + speeds
    G31 P500 X0 Y-42 Z1.45 ; Set Z probe trigger value
    M557 X100:200 Y100:200 S100:100 ; Define mesh grid

    Yes that could work. your homing files would specify how the Z axis is homed. To use a probe, you use G30, to use the endstop switch, you would use a G1 S1 Z move to trigger the endstop. And with your probe defined in the config.g things like G29 that use the probe would still work as normal.

    But if I can make my IR Z Probe Home to the center of the bed, and not off the bed, that would be perfect.

    I am not sure how to use G1, or G30 as they are not currently in my config. I will have to look into them.

    This would probably be best and would be easy to do. The snippet I posted above would go into your homing file. If you post your entire homing files I can show exactly what needs to be modified.

    Also note, I have a CoreXY, not a Cartesian. Not sure if that changes things.

    Homing Z would be the same between cartesian and corexy.



  • @phaedrux

    I poked around the config files.
    I think I figured it out and updated the homeall and homez files

    Will play after this print completes

    Thanks!



  • @phaedrux

    Good stuff!
    Z works in the center of the bed now!

    Thanks!



  • I still couldn't find a solution for that problem.

    I even updated my firmware and redid the whole configuration, but it still doesn't do the bed leveling with two z-motors.

    I do an initial homing of all axis wich works fine, when I start Auto Bed Compensation it probes the two points but then it throws the error message: Probe points P0 to P1 must be in clockwise order starting near minimum X and Y

    has anyone got a similar configuration working and could give me some advice?



  • Does the order of your probe points match the order the motors are defined in config.g?



  • yes it does and the error message occours even if I switch the probe points


  • administrators

    Are you running a very old firmware version that doesn't support bed levelling using independently driven leadscrews? Send M115 to check the firmware version.



  • no, I'm running latest stable release 2.02


  • administrators

    @gueee78 said in z-homing failed with mini IR:

    Error: Probe points P0 to P1 must be in clockwise order starting near minimum X and Y

    That message means that the firmware thinks you want to do old-style bed compensation. It should only do that if the number of leadscrew coordinates you defined in M671 doesn't match the number of Z motors defined in M584. So try running M584 without parameters, and M671 without parameters, and report the results.


 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.