maocypher / Octoprint-Smart-Filament-Sensor

OctoPrint plugin that lets integrate Smart Filament Sensors like BigTreeTechs SmartFilamentSensor directly to RaspberryPi GPIO pins.
GNU General Public License v3.0
13 stars 20 forks source link

After/Before Print Job is paused scripts? #43

Open Jeeves71 opened 3 years ago

Jeeves71 commented 3 years ago

Octoprint - GCode Scripts If you do not want that the print is paused right on your print, I recommend to add a GCode Script for "After print job is paused". Also adding GCode script "Before print job is resumed" might be useful, in the case you hit the heatbed or print head during the change of the filament or removing the blockage.

Anyone have examples of how to do this? Example scripts? Any help would be appreciated!

maocypher commented 3 years ago

Hi here kept very simple

After print job paused

G91 Z              ; Set to relative positioning mode
G1 Z15             ; Move hotend away from part by 15mm
G90 Z              ; Set to absolute positioning mode

After print job is resumed

G91 Z              ; Set to relative positioning mode
G1 Z-15            ; Return to original position
G90 Z              ; Set to absolute positioning mode
G92;

You can make it as complex as you like. To extend this you could make use of