bratan
Posts: 11
Joined: Thu Aug 03, 2017 2:43 pm

Showing ETA/ETL progress on LCD Screen

Is there any way to send remaining print time and progress percentage to printer's LCD controller when printing over USB? I know I can see it via Machine Control Panel, but frequently my PC has monitor off and I'd like to see it on the printer's screen (for example CR-10)...
arhi
Posts: 480
Joined: Thu Oct 06, 2016 5:13 pm

Re: Showing ETA/ETL progress on LCD Screen

yes it is possible, not with s3d but yes, possible, if you edit your g-code to add M117 with message you want shown on your LCD.

i do not own cr10 so can't say if it supports M117but most printers nowdays do

this is actually a good idea, I might add this option to my gcodestat so that it adds these M117 into code with real timing info
gcodestat integrates with Simplify3D and allow you to
Calculate print time accurately (acceleration, max speed, junction deviation all taken into consideration)
Embed M117 codes into G-Code
Upload your G-Code directly to Octoprint
open source and unlicence
arhi
Posts: 480
Joined: Thu Oct 06, 2016 5:13 pm

Re: Showing ETA/ETL progress on LCD Screen

Code: Select all


e:\Dev\eclipse-workspace\gcodestat>gcodestat.exe -g samples\test.gcode -o samples\test-gs.gcode -s 10
gcodestat v0.1
Starting with parameters:
        acceleration:           100.000000 mm/sec/sec
        junction deviation:     0.020000
        x max speed:            100000.000000 mm/min
        y max speed:            100000.000000 mm/min
        z max speed:            100000.000000 mm/min
        retraction time:        0.000000 sec
        prime time:             0.000000 sec
        speed override:         1.000000
        absolute movement:      yes
        absolute extrusion:     yes
        metering unit:          mm

Total time: ( 03:40:25 )

e:\Dev\eclipse-workspace\gcodestat>diff samples\test.gcode samples\test-gs.gcode
0a1
> M117 100% Remaining ( 03:40:25 )
2057a2059
> M117 90% Remaining ( 03:18:15 )
2567a2570
> M117 80% Remaining ( 02:56:15 )
5507a5511
> M117 70% Remaining ( 02:34:12 )
11140a11145
> M117 60% Remaining ( 02:12:14 )
18726a18732
> M117 50% Remaining ( 01:50:12 )
25905a25912
> M117 40% Remaining ( 01:28:09 )
34882a34890
> M117 30% Remaining ( 01:06:06 )
46163a46172
> M117 20% Remaining ( 44:04 )
61768a61778
> M117 10% Remaining ( 22:02 )

e:\Dev\eclipse-workspace\gcodestat>
I modified gcodestat to add M117 codes into the g-code. The frequency of the M117 commands is controlled by -s or --percent_step value so -s 10 will give you 100%, 90%, 80% ... codes, if you go with -s 1 you will get 100%, 99%, 98%... (default is 10)

-o parameter selects where you want to save the new, modified file (if -o or --output are omitted the M117 will not be added and no new file will be generated, only the time will be calculated and displayed)

-q will prevent anytyhing being displayed on the screen (except for errors, those will be sent to stderr)

use -? to get all parameters

source available on github: https://github.com/arhi/gcodestat

exe for windows attached

example s3d "additional terminal commands for post processing"

Code: Select all

{REPLACE "; outer perimeter\n" "; outer perimeter\nM204 S400\n"}
{REPLACE "; inner perimeter\n" "; inner perimeter\nM204 S800\n"}
{REPLACE "; solid layer\n" "; solid layer\nM204 S1000\n"}
{REPLACE "; infill\n" "; infill\nM204 S1000\n"}
E:\Dev\eclipse-workspace\gcodestat\gs.bat "[output_filepath]" 
E:\bin\curl-7.50.3-win64-mingw\bin\curl.exe -H "X-Api-Key: yourapikey" -F "select=false" -F "print=false" -F "file=@M117_[output_filepath]" "http://youroctoprintip/api/files/local"
Attachments
gcodestat.zip
gcodestat binary v0.1 with M117 generation support
(734.87 KiB) Downloaded 377 times
gcodestat integrates with Simplify3D and allow you to
Calculate print time accurately (acceleration, max speed, junction deviation all taken into consideration)
Embed M117 codes into G-Code
Upload your G-Code directly to Octoprint
open source and unlicence
bratan
Posts: 11
Joined: Thu Aug 03, 2017 2:43 pm

Re: Showing ETA/ETL progress on LCD Screen

Oh wow, that's very clever! Thanks!
arhi
Posts: 480
Joined: Thu Oct 06, 2016 5:13 pm

Re: Showing ETA/ETL progress on LCD Screen

I might have some free time now during holidays so it's possible I add few more functions if I get some ideas so ideas welcome :D .. also I'll probbly add full marlin support too (right now if you leave junction deviation as default and just use acceleration it is very close to marlin speeds but I want to add 100% accuracy if I can spare some time)
gcodestat integrates with Simplify3D and allow you to
Calculate print time accurately (acceleration, max speed, junction deviation all taken into consideration)
Embed M117 codes into G-Code
Upload your G-Code directly to Octoprint
open source and unlicence

Return to “General Discussion and Tips”