One of the basic features which seems missing from current systems is support for the build status, name and remaining build time to be displayed on the printer's front LCD when printing from the host. Sure, it displays the build status when printing from SD card but you don't always want to do that.
This functionality would require the addition of a new G-code.
So I thought I'd put together a strawman proposal.
What are some of the properties that we want from a solution:
- consumes virtually no bandwidth during printing (as the serial link is already pretty much fully utilized) [in other words, you do not want to have to update the LCD from the host all the time]
- allows (at minimum) the display of operation (e.g., object name or print activity), % complete & remaining build time.
- gracefully handle the pause, resumption or abort of a print
Notes on estimating build completion and remaining time.
- a simple way of calculating build completion is to count the number of Gcode lines in a file but this is not necessarily accurate (consider printing a pyramid).
- build completion is ideally an expression of remaining build time compared total build time.
- build time is harder to calculate/estimate accurately (and may not be implemented by all host programs)
- so, you want the host to be able to use either Gcode lines or remaining time based on its level of sophistication
- neither approach requires the host to send frequent updates to printer.
- a host may not be able to predict remaining build time until the print has progressed for a certain time.
Proposed G-code:
Mxxx [S:a] [D:"abcdef"] [SL:uuu] [EL:www] [TT:mmmm] [TR:nnnn]
Mxxx new M code.
S:a . State: 0 = new print activity, 1 = print update, 2 = paused, 3 = aborted, 4 = complete
D:"abcedef" description of activity (could be filename, object name, etc)
SL:uuu start GCode line number
EL:www end GCode line number
TT:mmmm total estimate build time (in XXhYYmZZs where seconds & hours are optional)
TR:nnnn total remaining build time (in XXhYYmZZs where seconds & hours are optional)
Any parameter which is missing is assumed unchanged from the last instruction (except when starting a new print activity when they are all cleared).
The firmware is free to choose what or how it displays the information based on the available LCD space.
Recommendations:
- Build % Complete calculation should be as follows:
If only SL and EL are supplied, then build completion % is calculated from (CurrentLine - SL)/(EL - SL).
If TT and TR are supplied, then build completion % is calculated from (1 - TR/TT).
- Remaining built times can be specified in seconds (to get good synchronization with the host) but normally times would be displayed to the user only in minutes.
- The description string should be limited to 35 characters on the sending side (to ease max line lengths problems).
Questions:
- do people see this as something which needs fixing?
- do people think this is the right way to go about it? (if not, why not)
- suggestions
This functionality would require the addition of a new G-code.
So I thought I'd put together a strawman proposal.
What are some of the properties that we want from a solution:
- consumes virtually no bandwidth during printing (as the serial link is already pretty much fully utilized) [in other words, you do not want to have to update the LCD from the host all the time]
- allows (at minimum) the display of operation (e.g., object name or print activity), % complete & remaining build time.
- gracefully handle the pause, resumption or abort of a print
Notes on estimating build completion and remaining time.
- a simple way of calculating build completion is to count the number of Gcode lines in a file but this is not necessarily accurate (consider printing a pyramid).
- build completion is ideally an expression of remaining build time compared total build time.
- build time is harder to calculate/estimate accurately (and may not be implemented by all host programs)
- so, you want the host to be able to use either Gcode lines or remaining time based on its level of sophistication
- neither approach requires the host to send frequent updates to printer.
- a host may not be able to predict remaining build time until the print has progressed for a certain time.
Proposed G-code:
Mxxx [S:a] [D:"abcdef"] [SL:uuu] [EL:www] [TT:mmmm] [TR:nnnn]
Mxxx new M code.
S:a . State: 0 = new print activity, 1 = print update, 2 = paused, 3 = aborted, 4 = complete
D:"abcedef" description of activity (could be filename, object name, etc)
SL:uuu start GCode line number
EL:www end GCode line number
TT:mmmm total estimate build time (in XXhYYmZZs where seconds & hours are optional)
TR:nnnn total remaining build time (in XXhYYmZZs where seconds & hours are optional)
Any parameter which is missing is assumed unchanged from the last instruction (except when starting a new print activity when they are all cleared).
The firmware is free to choose what or how it displays the information based on the available LCD space.
Recommendations:
- Build % Complete calculation should be as follows:
If only SL and EL are supplied, then build completion % is calculated from (CurrentLine - SL)/(EL - SL).
If TT and TR are supplied, then build completion % is calculated from (1 - TR/TT).
- Remaining built times can be specified in seconds (to get good synchronization with the host) but normally times would be displayed to the user only in minutes.
- The description string should be limited to 35 characters on the sending side (to ease max line lengths problems).
Questions:
- do people see this as something which needs fixing?
- do people think this is the right way to go about it? (if not, why not)
- suggestions