Notifications
Clear all

Gcodes for the octoprint UI  

  RSS
Philipp
(@philipp-5)
New Member
Gcodes for the octoprint UI

Hi there,

just getting familiar with my octoprint connected to the Prusa.

I was wondering if anybody already has nicely setup Gcodes for the " abort" "after pause" and "after resume" fundtions in the settings? 

would be a great help if posted here!

 

Thanks Philipp and healthy printing 🙂

Publié : 11/05/2020 12:19 pm
Mike Daneman
(@mike-daneman)
Estimable Member
RE: Gcodes for the octoprint UI

Here are my gcodes  The  opulent of issue with them are

1. Pause gcode doesn’t turn off the heatbed (to make sure the part doesn’t get unstuck), but the printer turns off the bed heater after 30min due to its Failsafe at which point the printer requires you to physically push the knob on it to continue.

2.  There is no easy way to save the part cooling fan speed at pause, so I just set the fan to 100% at resume which is not right for some filaments like PETG, ABs, etc  

Cancelled

M117 Print Cancelled ; Comment
M84 ; disable motors

;disable all heaters
{% snippet 'disable_hotends' %}
{% snippet 'disable_bed' %}
G91 Z ; Set to relative positioning mode
G1 Z20 ; Move hotend away from part by 20mm
G90 Z ; Set to absolute positioning mode
M106 S0 ; Disable fan

Pause

M117 Print Paused ; Comment
G91 Z ; Set to relative positioning mode
G1 Z15 ; Move hotend away from part by 15mm
G90 Z ; Set to absolute positioning mode
;disable all heaters
{% snippet 'disable_hotends' %}
;{% snippet 'disable_bed' %}
;disable fan
M106 S0

Resume

M117 Print Resumed ; Comment

; Heat up the bed if needed
{% if printer_profile.heatedBed %}
{% if pause_temperature['b'] and pause_temperature['b']['target'] is not none %}
M190 S{{ pause_temperature['b']['target'] }}
{% else %}
M140 S0
{% endif %}
{% endif %}

;Heat up the extruder
{% for tool in range(printer_profile.extruder.count) %}
{% if pause_temperature[tool] and pause_temperature[tool]['target'] is not none %}
{% if tool == 0 and printer_profile.extruder.count == 1 %}
M109 S{{ pause_temperature[tool]['target'] }}
{% else %}
M109 T{{ tool }} S{{ pause_temperature[tool]['target'] }}
{% endif %}
{% else %}
{% if tool == 0 and printer_profile.extruder.count == 1 %}
M104 S0
{% else %}
M104 T{{ tool }} S0
{% endif %}
{% endif %}
{% endfor %}

G91 Z ; Set to relative positioning mode
G1 Z-15 ; Return to original position
G90 Z ; Set to absolute positioning mode
M106 S100 ; Turn on fan to 100%, not right for PETG

Publié : 17/05/2020 9:44 pm
Boogie et ont aimé
Kshipp
(@kshipp)
New Member
RE: Gcodes for the octoprint UI

Is this still your current script? My Octo and MK3S+ are interfering with each other when i cancel a print. The printer goes through the cancellation routine, and then keeps the display as though its still printing, allowing me to cancel again… its caused some fear for me and wondered if these examples are still relevant, thanks

Publié : 19/04/2023 2:11 am
Walter Layher
(@walter-layher)
Prominent Member
RE: Gcodes for the octoprint UI

In the attached file are my current g-codes for the MK3S* and the MK4 in Octoprint. The boxes shown are the only ones with text, all the other ones are empty. Cancelling prints work with them. The screenshot is a bit large, so I won't embed it here.

Publié : 19/04/2023 2:01 pm
Kshipp
(@kshipp)
New Member
RE:

This is great, Thank you so much! Is the file you attached supposed to be more than a screenshot? I can only see the 3 fields, and I cannot scroll in the boxes. Again, thank you so much

 

EDIT: never mind, just noticed you said it was a screenshot!

Ce message a été modifié il y a 2 years 2 fois par Kshipp
Publié : 20/04/2023 1:21 am
Partager :