prusa3d / Prusa-Firmware-Buddy

Firmware for the Original Prusa MINI, Original Prusa MK4 and the Original Prusa XL 3D printers by Prusa Research.
Other
1.17k stars 229 forks source link

[BFW-5832] [BUG] M73 G-Code status report not correct #4089

Open samdurnxn opened 4 months ago

samdurnxn commented 4 months ago

Printer model

Mini+

Firmware version

6.0.0, 6.0.3

Upgrades and modifications

None

Printing from...

Prusa Link

Describe the bug

In PrusaSlicer, the option to send progress("Printers -> general -> Supports remaining time") is correctly tick.

For my purpose, I create a python script which read serial data from the printer, every 60s I'd like to know the progress, the remain time and the time until the next change (break or color change). As it's explain in this article, you can get the progress by sending the M73 G-Code without any parameters.

The printer answer this code with : M73 Progress: 5% Time left: 0m Change: 10m

But the values for time left and change are not updated.

How to reproduce

You can reproduce this issue like this :

Expected behavior

Normally, the time left value and the time of next change have to be update like the progress value.

Files

No response

danopernis commented 4 months ago

Hi @samdurnxn thanks for the report. I confirm the issue is present, we will work on fixing it.

samdurnxn commented 3 months ago

just for my information, any news on the fix ?

danopernis commented 3 months ago

@samdurnxn the fix was merged into 6.1.0, which was just released for mk4s; release for other printers will follow "in near future" - probably in several weeks.

samdurnxn commented 3 months ago

My bad, I check the release summary not the comparaison with previous release. I will wait for the MK4 version of it. Thanks for your works!

danopernis commented 3 months ago

Nah, it is OK to ask. Nobody expects you to read 1000 commit messages. I would personally prefer smaller releases more often, but that's the way it is :slightly_smiling_face:

samdurnxn commented 3 months ago

I fully understand as I'm an developer too ;)

danopernis commented 3 months ago

@samdurnxn new version of the firmware 6.1.2 should contain the fix, can you test that?

samdurnxn commented 3 months ago

Hello, Response of M73 is OK for the time left now but not for the next change.

T:231.06/230.00 B:59.98/60.00 X:37.75/36.00 A:50.31/0.00 @:101 B@:67 HBR@:255
> echo: M73 Progress: 1%;
> Time left: 36m;
> Change: 0m;
> ok
> T:230.51/230.00 B:59.93/60.00 X:37.55/36.00 A:50.39/0.00 @:109 B@:64 HBR@:255
> T:230.25/230.00 B:60.06/60.00 X:37.08/36.00 A:50.39/0.00 @:104 B@:20 HBR@:249
> T:230.08/230.00 B:60.05/60.00 X:36.98/36.00 A:50.44/0.00 @:107 B@:40 HBR@:248
> T:229.85/230.00 B:60.06/60.00 X:36.93/36.00 A:50.50/0.00 @:113 B@:27 HBR@:245
.....
> T:229.85/230.00 B:60.00/60.00 X:36.95/36.00 A:50.69/0.00 @:111 B@:50 HBR@:255
> T:229.92/230.00 B:59.98/60.00 X:36.91/36.00 A:50.69/0.00 @:109 B@:53 HBR@:255
> X:122.03 Y:108.91 Z:0.20 E:0.00 Count X:12581 Y:10482 Z:45
> T:230.06/230.00 B:59.94/60.00 X:37.17/36.00 A:50.75/0.00 @:105 B@:57 HBR@:255
> echo:busy: processing
> T:229.68/220.00 B:59.89/55.00 X:37.40/36.00 A:50.80/0.00 @:0 B@:0 HBR@:255
> echo: M73 Progress: 4%;
> Time left: 35m;
> Change: 0m;

And on the printer screen, the next change value is "N/A". Strange because I add little box in PrusaSlicer with many colors changes with the MMU3. Picture and bgcode attached Shape-BoxTestM73.zip screenshot

samdurnxn commented 3 months ago

Update from my previous test with the 6.1.2 firmware. With a new print, I have to insert break to put magnets during printing, and the remaining time works. I have the remaining time both on serial link(M73) and on screen when I use M601 gcode.

@danopernis can you confirm that for the moment the remaing time is handle only with M6xx gcode ? I think this because with the MMU3, the colors changes are done with a Tx gcode and not a M600.

If I'm right, can you add the Tx gcode support for the remaining time for a future version ?

samdurnxn commented 2 months ago

I just update the firmware to 6.2 alpha1. Time left is still OK but the next time change is still at 0m.

Have you plan to handle this value for both M6xx and Tx gcode or not ?

I don't know if it's relevant to many people but for me I need this information to add it on a detached monitoring screen.

danopernis commented 2 months ago

@samdurnxn I was looking into this, but then got distracted by something more important. I am still hoping to fix this at least by final v6.2.0

Thanks for the suggestion about MMU and Tx gcodes, that helped a lot and seems like you are on the right track.

samdurnxn commented 2 months ago

No problem, I understand. Great if you can add the support for TX gcode! Good luck finding the solution. Last week, I cloned the repo on my PC to see if I could find where it could be modified, but I didn't manage to. I'm better with PHP code than C++ ;)

danopernis commented 2 months ago

@samdurnxn I looked into it some more and the only G-code that sets up time to pause is M73 Cx Dy. I tried generating some G-code for MMU with the pause and indeed I don't see any M73 Cx Dy in generated file. This looks like a bug on the Slicer side if I understand it correctly. Can you please open an issue at https://github.com/prusa3d/PrusaSlicer ?

Technical detour, we need to have those M73 in the instruction stream because it is not possible to put entire G-code to MCU memory and compute actual time. For serial printing that is also impossible, because actual lines of G-code arrive some time in the future. The solution to this problem is for slicer to essentially simulate the printer and insert those M73 G-codes to instruct the printer what to display on the screen.

samdurnxn commented 2 months ago

@danopernis ah I understand.

An issue have been already opened on this bug -> https://github.com/prusa3d/PrusaSlicer/issues/13031#issuecomment-2358388811

I had a comment on it.

Prusa-Support commented 2 days ago

I seem to understand that part of the remaining issue had to be corrected in Prusa Slicer. Also, I seem to understand that the correction was already made in Prusa Slicer so it may be included with the new PrusaSlicer 2.9.0-alpha1 Pre-release. Please give it a try and consider closing the issue if the fix is confirmed in your tests.

Michele Moramarco Prusa Research

samdurnxn commented 2 days ago

Hello, I download this version and test with only a shape box and some multipainting. If I open the generate GCODE, there is no M73 Cxx line. So for me the bug is not solve yet. I will add a comment in the ticket https://github.com/prusa3d/Prusa-Firmware/issues/4734 too