prusa3d / PrusaSlicer

G-code generator for 3D printers (RepRap, Makerbot, Ultimaker etc.)
https://www.prusa3d.com/prusaslicer/
GNU Affero General Public License v3.0
7.79k stars 1.94k forks source link

[Feature Request] print information placeholder for g-code #10918

Open Mikeyzy opened 1 year ago

Mikeyzy commented 1 year ago

I'm trying to get PS to work with raise3d's printer. Their firmware uses the following g-code comments to display current layer and print time on printer's screen: in g-code: ;LAYER:78 ;PRINTING_TIME: 2392 ;REMAINING_TIME: 50

end of file: ;Print Time: 2442 ;Material#1 Used: 2079.2 ;Material#2 Used: 0.0 ;Material#1 Cost: 0.19 ;Material#2 Cost: 0.00

time value is in second, material used in cm

Please make the following placeholder available in G-Code, these are available in file name but not for g-code. print_time, normal_print_time, silent_print_time, used_filament, extruded_volume, total_cost, total_weight, total_wipe_tower_cost, total_wipe_tower_filament

In addition, can we have current_print_time, current_layer_count, remaining_layer_count variables for g-code placeholder. the time placeholder should be numeric

bkiziuk commented 1 year ago

I should add that having normal_print_time and silent_print_time implemented would allow to use M73 R<remaining_time> command in startup G-code to show estimated printing time right at the start of the print. I'm using Marlin, and until the actual generated M73 is sent to the printer, when running startup G-code the firmware tries to invent some insane numbers.

ThomasToka commented 11 months ago

Today i learned that those variables are missing like stated here in the issue.

print_time, normal_print_time, silent_print_time, used_filament, extruded_volume, total_cost, total_weight, total_wipe_tower_cost, total_wipe_tower_filament

Would be really cool to have them available in custom g-code.

Thanks!