CustomControlEditor Script Not Working

What is the problem?

I have the custom control editor plugin installed. I have these 2 buttons: Load Filament and Unload Filament.
Load Filament G-Code Commands:

G1 F300
G1 E110

Unload Filament G-Code Commands:

G1 F300
G1 E-100

The unload button works, and it unloads, but when I click the load button, it doesn't extrude anything. And as I'm doing this, I'm not printing, I'm just swapping filaments for a different print. Can someone tell me what I'm doing wrong and how to fix it? If so, please say!

Thanks in advance.

You may end the commands with G92 E0
Also: Do you use absolute or relative extrusion?

I don't know, how would I find out which I use?
I'm pretty sure relative because in my G-Code scrips in OctoPrint, I have G83 a lot.

Absolute or Relative filament movement (E) is controlled by G90, G91, M82 and M83. The current value can the set by G92. See https://marlinfw.org/meta/gcode/ for descriptions of each of these commands (Hint: G90 and G91 set X,Y,Z, and E; M82 and M83 only set E).

Unfortunately, there is no command in Marlin to query the current absolute/relative state for any axis. This means that any scripts should set the state they need at the beginning. If the script is to be executed in the middle of a print, then the script should restore the state to what the print is expecting.

To answer the absolute or relative extrusion question requires examining settings in your slicer (or examining the gcode output of your slicer). Multiple G92 E0 commands usually indicates relative E.

Hopefully, you have lots of M83 and not lots of G83 (which is a Prusa specific command).

Yes, in:
CaliCube5x5.gcode (78.8 KB)
There are 3 M83 commands, and 0 G83 commands.

Here are my suggestions for the load script:

M83
G92 E0
G1 E110 F300
G92 E0

and the unload script:

M83
G92 E0
G1 E-100 F300
G92 E0

Both scripts leave the extruder in relative mode at zero.

1 Like

Thank you for all the help!