Welcome! Log In Create A New Profile

Advanced

Minor gripe with the RepRapFirmare and/or the website for Duet

Posted by David J 
Minor gripe with the RepRapFirmare and/or the website for Duet
January 09, 2016 11:40AM
This really is a minor whinge - the progress bar on the Print Status page never displays real progress when I'm printing an object on my COreXY printer.

I don't know whether it's something in the firmware or in the website, but I can see why it's happening. The "% completed" value displayed in the progress bar appears to be calculated from the height achieved so far, against the total height of the item, i.e. (current height / total height) * 100. My problem is that one of the last commands I send to my CoreXY printer is "G0 z240" to bring the bed down and make it easier to deal with the print. This means that the progress bar will show a print 24mm high going from 0% at the start to 10% at completion, then suddenly going to 100% when the bed reaches 240 (literally the last command in the gcode, apart from switching off the motors). It would be better to calculate from the file progress, or gcode lines completed.

As I say - minor, but annoying in a petty way!
Re: Minor gripe with the RepRapFirmare and/or the website for Duet
January 09, 2016 02:27PM
If you are using recent firmware (e.g. version 1.09m of my firmware fork) and web interface (DuetWebControl 1.07) then the % complete is calculated from the filament usage, not layer count. Also, I'm fairly sure that G0 commands are ignored when the firmware works out the object height. Please check which versions of the firmware and DWC you are running, and then see whether the object height is shown correctly in Print page of the web interface.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Minor gripe with the RepRapFirmare and/or the website for Duet
January 09, 2016 04:11PM
I'm on 1.09m, and (I believe) the latest web interface. I'll check the versions and reported height next time I plug in the machine (I can't at the moment).

I did do the sums when I was printing something recently - they certainly work out exactly right based on my assumption of it using item height. I'll get back to you - probably tomorrow - once I get back onto the machine.

Edited 1 time(s). Last edit at 01/09/2016 04:14PM by David J.
Re: Minor gripe with the RepRapFirmare and/or the website for Duet
January 10, 2016 05:34AM
OK - I tried a quick test this morning:

Firmware is 1.09m
Web interface is 1.07

The object I was printing was 3 layers thick @ 0.2mm - STL and gcode files attached.

This is the end G-code
M104 S0 ; turn off hot-end
M140 S0 ; turn off bed
M107 ; Turn off fan
M83 ; relative mode
G1 E-1 ; reduce filament pressure
M82 ; absolute mode
G1 X0 Y0 Z240 ; home X & Y, drop the print bed 
M84  ; disable motors
I have attached a couple of screenshots; the first shows the interface just as the very last nozzle moves were being made - note the Time Left value was 00s, and the blue progress bar was showing 2.3%. The second screenshot taken a couple of seconds later when the printbed had reached 240mm (lowest position) - note the blue progress bar showing 100%. Both show an object height of 240mm.
Attachments:
open | download - Screenshot at 2016-01-10 09:44:15.png (125.6 KB)
open | download - Screenshot at 2016-01-10 09:44:32.png (122.8 KB)
open | download - adhesion test.stl (32.5 KB)
open | download - adhesion-test-pla-corexy.gco (131.8 KB)
Re: Minor gripe with the RepRapFirmare and/or the website for Duet
January 10, 2016 10:10AM
I just checked, and I found that in chrishamm's latest version of the print monitor (which I merged into my fork), he recognises G0 as well as G1. So the trick of using G0 no longer works. I don't know if he did this to recognise a specific slicer or not. Furthermore, the code takes great lengths to recognise the G0/G1 command even if dummy parameters are added.

I have two suggestions:

1. Try using Z240 G1 instead. Technically this is probably not valid gcode, but RepRapFirmware should recognise it.

2. Create a macro file containing the G1 Z240 command, then invoke that macro using M98 in your slicer end gcode.

Edited 1 time(s). Last edit at 01/10/2016 10:10AM by dc42.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Minor gripe with the RepRapFirmare and/or the website for Duet
January 11, 2016 06:29AM
I've been doing some experiments:

I took the Z240 out of the "G1 X0 Y0 Z240 ; home X & Y, drop the print bed" and wrote a macro so that I can drop the printbed manually on completion. Unfortunately the progress bar still gives me a wrong answer due to one of the last commands in the gcode file - this raises the head 5mm before homing the X & Y axis. This 5mm is added to the total print height, so it ends up as 5.6mm instead of 0.6mm, which means that the fundamental parameter in the progress calculation is still wrong - not as wrong as before, but still wrong.

I also see daft figures popping up each time the head lowers to check the bed level at the start of the print.

It still seems fundamentally wrong to use current height/total height as the basis of this calculation - why not use g-code lines performed/total g-code lines instead? This would give a far more meaningful display.
Re: Minor gripe with the RepRapFirmare and/or the website for Duet
January 11, 2016 07:20PM
David, please send a PM to chrishamm about this. He maintains both the web interface and the PrintMonitor module in the firmware, so he is best placed to deal with it. I think the issue may lie in the web interface, because the only percent-complete figure passed back by the firmware is based on the proportion of the gcode file that has been processed.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Minor gripe with the RepRapFirmare and/or the website for Duet
January 12, 2016 10:51AM
OK - I wasn't sure which person should get involved!

Thanks
Re: Minor gripe with the RepRapFirmare and/or the website for Duet
January 12, 2016 12:00PM
The main reason the progress bar and the end-time estimations don't work properly is because your G-code does not contain any comments. Which slicer did you use to generate that one? I'd check if there is an option to enable them so that the filament usage can be used.

As for the object height detection, the easiest way to prevent the firmware from parsing an additonal lift is to encapsulate the individual lift movement via G90/G91 as I do in my end G-Code:

G1 E-10 F2400
G91
G1 Z5 F360
G90
G1 X0 Y0 F6000
M107
M0

HTH!
Re: Minor gripe with the RepRapFirmare and/or the website for Duet
January 15, 2016 03:24PM
Quote
chrishamm
The main reason the progress bar and the end-time estimations don't work properly is because your G-code does not contain any comments. Which slicer did you use to generate that one? I'd check if there is an option to enable them so that the filament usage can be used.

As for the object height detection, the easiest way to prevent the firmware from parsing an additonal lift is to encapsulate the individual lift movement via G90/G91 as I do in my end G-Code:

G1 E-10 F2400
G91
G1 Z5 F360
G90
G1 X0 Y0 F6000
M107
M0

HTH!

Hi Chris.

I find that the layer height rarely shows beyond layer one. I'm on 1.0.7 and use slic3r or S3D. Previously I added the layer height in slic3r which worked but now mostly it doesn't. Is there something I should add to my gcode to ensure this works. Thanks. David.
Re: Minor gripe with the RepRapFirmare and/or the website for Duet
January 16, 2016 10:42AM
Quote
chrishamm
The main reason the progress bar and the end-time estimations don't work properly is because your G-code does not contain any comments. Which slicer did you use to generate that one? I'd check if there is an option to enable them so that the filament usage can be used.

As for the object height detection, the easiest way to prevent the firmware from parsing an additonal lift is to encapsulate the individual lift movement via G90/G91 as I do in my end G-Code:

G1 E-10 F2400
G91
G1 Z5 F360
G90
G1 X0 Y0 F6000
M107
M0

HTH!

Chris,

By coincidence, I was playing with a different slicer setup today - and got sensible results in the web page!



In the past I used to use Repetier-Host, and it's still where all my configuration files are (lots of them). Because of this I used either the Cura plug-in, or the Slic3r one, then saved the gcode file for printing. This morning I used Slic3r directly (because Repetier-Host was crashing - again) and, when I tried the output, it did the proper job - even with the 'go to Z240' command at the end.

Sorry if I wasted anyone's time... sad smiley
Re: Minor gripe with the RepRapFirmare and/or the website for Duet
January 16, 2016 11:03AM
I'm glad you got this sorted. If you are looking for more improvements, I suggest you try out my DWC v1.08 sometime soon as well winking smiley
Re: Minor gripe with the RepRapFirmare and/or the website for Duet
January 22, 2016 10:11AM
Purely FYI: I tried one of these "gcode files without comments" after upgrading the Duet to 1.09r/1.08 - and the progress bar is far, far worse! It's horrible! yawning smiley

Never mind - the solution is quite simple - use the separate Slic3r or Cura apps to get complete gcode files, and see everything working as it should. smiling smiley
Sorry, only registered users may post in this forum.

Click here to login