Error in auto bed leveling



  • when i used this G30 command in auto bed leveling the z go down and don not stop when the switch trigeer /?????
    what is the reason and how can i solve it
    M561 ; clear any bed transform, otherwise homing may be at the wrong height
    G90
    G1 Z5 F350
    G1 X-15 Y-15 F2000 ; move head
    G1 Z-200 S1 F100 ; move Z down until the switch triggers
    G30 P0 ; probe
    G1 Z5 F350 ; rise head
    G1 X-170 Y-15 Z2 F2000 ;
    G1 Z-200 S1 F100 ; move Z down until the switch triggers
    G30 P1 ;
    G1 Z5 F350;
    G1 X-170 Y-170 Z2 F2000 ;
    G1 Z-200 S1 F100 ; move Z down until the switch triggers
    G30 P2 ;
    G1 Z5 F350;
    G1 X-15 Y-170 Z2 F2000 ;
    G1 Z-200 S1 F100 ; move Z down until the switch triggers
    G30 P3 ; probe and calibrate with 4 parameters (as there is 4 points)

    G1 Z10 F350 ;


  • administrators

    1. Does the G30 command work when you use it outside the bed.g file?

    2. How do you know that the switch is triggering?

    3. Are you certain that you have the switch connected correctly to the Duet? Does the M119 command indicate correctly whether the switch is triggered or not?



  • 1- G30 WORK BUT IT DO NOT STOP WHEN THE SWITCH IS TRIGGERED
    2-THE LED IN THE Z PROB IS BEING ON
    3- THE SWITCH IS correctly WHEN I AM DOING AUTO HOME IT WORKS CORRECTLY.


  • administrators

    The problem is with this combination of lines:

    G1 Z-200 S1 F100 ; move Z down until the switch triggers
    G30 P0 ; probe

    You should probe from a sufficient Z height, say 5mm. You should not have any homing moves (i.e. G1 moves with S parameter) in bed.g. Try this:

    M561 ; clear any bed transform, otherwise homing may be at the wrong height
    G28 ; home all
    G1 Z5
    G30 P0 X-15 Y-15 Z-99999 ; probe
    G30 P1 X-170 Y-15 Z-99999
    G30 P2 X-170 Y-170 Z-99999
    G30 P3 X-15 Y-170 Z-99999 S0 ; probe and calibrate with 4 parameters (as there is 4 points)
    G1 Z10 F350 ;

    However, I am puzzled that all your X and Y coordinates appear to be negative.



  • can i ask question in g30 the z probe when it being sense it send 0v to stp bit in z limit switch
    0v with G30 can stop the moving or not can explain this point please


  • administrators

    If the output is 0V when the probe is triggered, it is active low. You need to include the I1 parameter on your M558 command to tell the firmware that, assuming you are using firmware 1.16 or later.



  • i used this code in the bed.g
    G1 Z-200 S1 F100 ; move Z down until the switch triggers
    G30 P0 ; probe

    You should probe from a sufficient Z height, say 5mm. You should not have any homing moves (i.e. G1 moves with S parameter) in bed.g. Try this:

    M561 ; clear any bed transform, otherwise homing may be at the wrong height
    G28 ; home all
    G1 Z5 ;
    G30 P0 X15 Y15 Z-99999 ; probe
    G30 P1 X160 Y15 Z-99999 ;
    G30 P2 X160 Y160 Z-99999 ;
    G30 P3 X15 Y160 Z-99999 S0 ; probe and calibrate with 4 parameters (as there is 4 points)
    G1 Z10 F350 ;

    and i used mechanical limit swutch in z axis
    the z axis in all points still down (the limit is triggered and do not stop down ) until the z postion bcome 0 and become up again


Locked
 

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