klipper icon indicating copy to clipboard operation
klipper copied to clipboard

Probe command is going crazy with autolevel sensor.

Open skuznetsov opened this issue 8 years ago • 6 comments

I have Anet A8 "official" autolevel sensor. In order not to crash my z stepper into the heatbed I have to add into the probe activate_gcode statement and execute gcode like this: G28 X0 Y0 G1 X110 Y110

I found that when it goes down during the probe it goes strange: it starts to move towards X/Y endstops instead of going down.

I solved it by commenting lines 69 and 70 in klippy/extras/probe.py and replacing them with pos = [ None, None, self.z_position]

Otherwise I suppose that they are moving towards 0 X/Y coords. Probably it didn't picked up correctly last coordinates from G1 X110 Y110 and still thinks that it is 0,0

Also I found that in the probe.py:build_config() it tries to add z stepper to the steppers that is already there so that Z endstop object ends up with two copies of the the same stepper instance in the self.steppers array. So it is easily solvable with simple check inside of add_stepper where you check before adding stepper into the list if that object is already there.

skuznetsov avatar May 22 '18 02:05 skuznetsov

Also I found that when I issue G1 X15 Y15 as part of probe's deactivate_gcode to go to the Bottom left position of the heatbed it goes up to the initial Z position it was probing from not the found one.Looks like it is not storing Z position from the probe.

skuznetsov avatar May 22 '18 12:05 skuznetsov

It does not make sense to put movement commands in the probe activate_gcode or deactivate_gcode sequences (don't put G28, G1, or G0 commands there). If you need to perform a particular action in order to safely home your printer, then use a homing_override section to do that. The config/sample-bltouch.cfg provides an example of this.

In the future, be sure to always attach the klipper log file to any problem reports, as described at: https://github.com/KevinOConnor/klipper/blob/master/docs/Contact.md

KevinOConnor avatar May 22 '18 15:05 KevinOConnor

Thank you Kevin!

It is weird as I did homing_override before and it didn't work the way I want so I tried it through the probe activate_gcode option.

So I removed all probe gcode from probe and modified my homing override like this: [homing_override] #set_position_x: 110 #set_position_y: 110 set_position_z: 0 gcode: G90 ; Uncomment these 2 lines to blindly lift the Z 2mm at start G1 Z7 F600 G28 X0 Y0 G1 X110 Y110 F3600 ; PROBE G28 Z0

And it started to work like a charm.

My question for now is what is the purpose of activate/deactivate_gcode in probe section then?

skuznetsov avatar May 22 '18 16:05 skuznetsov

@skuznetsov Can You Share your whole config? I want to share pins for endstop ant autolevelsensor.

ghost avatar May 27 '18 12:05 ghost

@derdigge here is my config: printer.zip

Please note that my bed tilt coordinates are little modified as my autolevel sensor is connected as per this image: img_2704

skuznetsov avatar May 27 '18 22:05 skuznetsov

Thanks. I´ll try this next week.

ghost avatar May 28 '18 07:05 ghost