markniu / Bed_Distance_sensor

Auto bed level with High resolution distance sensor
281 stars 28 forks source link

Real Time update fail: update z must be >0 #150

Closed Townie-au closed 3 months ago

Townie-au commented 5 months ago

BDsensorVer:V1.2c pandapi3d ,switch_mode=1,collision_homing=1,collision_cal=1

About a minute into the print, halts printer.

Townie-au commented 5 months ago

logs-20240611-154328.zip

markniu commented 5 months ago

here the actual error is the timer too close, and I will change this message fail: update z must be >0 as a warning message later. you can add rt_sample_time:20 into the BDsensor section,here 20 means the distance reading sample time is 20ms. The value of rt_sample_time depends on the MCU speed, please increase this value if the MCU speed is low.

Townie-au commented 5 months ago

Different error this time [Uploading klippy.log (13).txt…]()

markniu commented 5 months ago

Seems the klippy.log file was not updated successfully.

Different error this time Uploading klippy.log (13).txt…

Townie-au commented 5 months ago

CPU: Allwinner H616, Quad-core Cortex-A53 @1.5GHz

markniu commented 5 months ago

Different error this time Uploading klippy.log (13).txt…

could you update the klippy.log file again? and I cann't download this file

Townie-au commented 5 months ago

klippy.log (13).txt

markniu commented 5 months ago

did the error " Unable to read tmc uart 'stepper_z' register GSTAT" happen in the first layer?

Townie-au commented 5 months ago

Yes

Townie-au commented 5 months ago

BD sensor and klipper were out of date. I updated it this morning. I'll give it another go when I get home.

markniu commented 5 months ago

did the error " Unable to read tmc uart 'stepper_z' register GSTAT" happen in the first layer?

and I think this should be the same as the error timer too close, you can adjust the the rt_sample_time: to 25 or 30

Townie-au commented 5 months ago

What does this mean?

Real Time update fail: update z must be >0

3:45 PM

Real time leveling height:0.20 ( 0.20 z_offset:0.00)

Andrew

On Wed, 19 June 2024, 12:16 pm Mark, @.***> wrote:

did the error " Unable to read tmc uart 'stepper_z' register GSTAT" happen in the first layer?

and I think this should be the same as the error timer too close, you can adjust the the rt_sample_time: to 25 or 30

— Reply to this email directly, view it on GitHub https://github.com/markniu/Bed_Distance_sensor/issues/150#issuecomment-2177408661, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGMK5OMK52GYZM4OJSM2NY3ZIDSWHAVCNFSM6AAAAABJDS426OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZXGQYDQNRWGE . You are receiving this because you authored the thread.Message ID: @.***>

Townie-au commented 5 months ago

klippy.log (14).txt

Townie-au commented 5 months ago

On the bottom of printer.cfg it has this

747 #*# [BDsensor]

748 #*# z_adjust = 0.0

749 #*# z_offset = 0

Townie-au commented 5 months ago

So changing rt_sample_time: to 30. Seems to have worked but still getting the real time update fail error in the console but print continuing.

markniu commented 5 months ago

What does this mean? Real Time update fail: update z must be >0 3:45 PM Real time leveling height:0.20 ( 0.20 z_offset:0.00)

that means it will not adjust the z height while printing because the current z position is <0 or higher than setting value

markniu commented 5 months ago

What does this mean? Real Time update fail: update z must be >0 3:45 PM Real time leveling height:0.20 ( 0.20 z_offset:0.00)

that means it will not adjust the z height while printing because the current z position is <0 or higher than setting value

I have changed this message, and this message is normal sometimes because the z maybe changed in the first layer,for example the intro line in the start gcode in the slicer or retraction

Townie-au commented 5 months ago

Nope. Shutdown 6% in timer too close EBBCan klippy.log (15).txt

markniu commented 5 months ago

Nope. Shutdown 6% in timer too close EBBCan klippy.log (15).txt

did it happen in the first layer? if not make sure there is a BDSENSOR_SET REAL_TIME_HEIGHT=0 after first layer in the gcode file to disable this feature.

in theory, if it is disabled after first layer by BDSENSOR_SET REAL_TIME_HEIGHT=0 , then there is no any code of BDsensor running both in linux or mcu.

Townie-au commented 5 months ago

Yeah that's what I thought. I have that gcode in already. I'll try it with a bed mesh and see how it goes.

feral42 commented 3 months ago

any updates on this? I'm having the same problem.

Townie-au commented 3 months ago

I managed to get real time levelling working.

I didnt remove all bed mesh related sections in my printer.cfg and I changed rt_sample_time to 16ms.