Skip to content
Christian Lefrançois edited this page Sep 30, 2015 · 2 revisions

WARNING - TO BE USED WITH FULL GRAPHIC LCD

Until now, there was no way firmwares can figure out if a host were printing. I introduces 3 new M commands to change this:

M2 - Host printing started
M3 - Host printing ended
M4 - Object information and status: E<extrusion needed> in mm, P<percent completed>

NOTE: You don't need these commands if you're printing from SD card.

I intend to add more M4 parameter in the future: maximum width in mm, maximum depth in mm, maximum height in mm, material (0=dryrun 1=ABS 2=PLA, etc.), material cost per mm, etc..

The M2 and M3 commands should be added to the host start/end code script, respectively. In Repetier-Host, these scripts can be found in the Scripts tab of Printer Settings. Adding the M2 command to the start script tells the firmware that the host began sending G-code, for the purpose of printing something. It'll also start the timer displayed over the progress bar. The M3 command informs the printer of completion, and stop the timer.

For the M4 command, it must be added to the slicer start G-code manually (since no slicers support it yet). This command gives the firmware the ability to show the progress of the print using the E parameter. If E is omitted or set to 0, the P one will take control of the progress bar, showing current percent completed. To add M4 to Slic3r, brings up the Custom G-code pane located in the Printer Settings tab, type in M4 E. Right now, the parameter E must be entered manually, from the G-code generated by Slic3r. In Repetier-Host, after Slic3r have done its job, go to the bottom of the G-Code Editor tab, find the line ; filament used = X.Xmm (X.Xcm3) and add the mm to the top M4 command: M4 EX.X.

The firmware will do the rest to update print source and progress bar.