2

I have a few G-code files uploaded to Octoprint for a project, where I will be printing many items of the same model, sometimes in different colors. I have some new filament for this project, in a different color and from a different brand, but of the same basic type (still supposedly normal PLA). However, this filament seems to like a different temperature from the original... it wants to be just a few degrees warmer for best results. Otherwise it globs a bit and doesn't adhere to the bed as well. Add 4℃ to both tool and bed and suddenly everything is happy again.

Other than the temperature, the existing G-code is fine. Right now I am able to start the print, adjust the temperature in Octoprint as soon as I see the print head start moving, and things are okay. But I'd like to not need to do that, since it takes a minute for the temperatures to adjust and requires me to intervene at just the right time.

I don't have the original G-code, and this was a challenging part to get sliced well. The temperature near the beginning of the G-code in Octoprint is the only thing that's off. I'd also like to avoid keeping two sets of G-code for the same item and project. What I really want to do is edit the G-code in place in Octoprint.

Is there a way, perhaps a plug-in, that will let me edit the G-code in Octoprint, or download it from Octoprint so I can edit and re-upload it? Maybe even a plugin specifically for temperature adjustments?

Greenonline
  • 6,748
  • 8
  • 40
  • 68
Joel Coehoorn
  • 2,720
  • 4
  • 19
  • 34

1 Answers1

4

As sometimes happens, the act of composing the question helped me organize my thoughts well enough to solve my own problem. It led to some quick research into a plugin specifically designed for temperature override, which in turn led me to re-examine the Offset area of the Temperature tab, where I would preheat before starting a print.

In the past, I had always just looked past and ignored this section as not useful: the G-code I was printing would already be at the correct temperature. But I see today this should do exactly what I need. I can set an offset from the temperature specified in a G-code file, even including negative values if I want, and in this way get the desired result without needing to either edit the G-code or install a plugin.

It's worth noting here the offset only seems to work if it's in place before starting a file. The temperature commands are generally near the beginning of a file and are processed almost immediately, and this offset only applies to temperatures when they are first read from the G-code. It does not seem to matter for other adjustments made directly on the temperature tab. This adjustment is saved and remembered by Octoprint, so it's also important to remember to remove it before moving on to a different print

For completeness, there is also a download link in the files list I could have used to edit the G-code locally and re-upload, as well as a plugin that adds an edit icon with a basic text editor to the same panel of buttons. I may end up installing the plugin just so I can inspect the G-code there in the browser to be sure I remember the original temperature correctly and set the offsets I need.

Joel Coehoorn
  • 2,720
  • 4
  • 19
  • 34