Changing the G-Codes for the buttons in the Control Tab


Is there a way to change the G Codes that are send to the printer when clicking a button in the control tab by a user?
It's because Prusa uses G28 in a different way. So homing X/Y does not work at all and homing Z homes all axes the way it is now.


Well tell Prusa to stop deviating from what has already been established. Marlin tried that once and broke almost every piece of host software.

You can add your own custom controls to add new home buttons, but you'll need to create a plugin if you want to modify the already existing buttons.


Hi @PythonAteMyPerl,

it's always annoying when devs leaving the ways.

These custom controls are a neat workaround. Maybe I put some move buttons beside the self made homing buttons to keep things together...

I already tried Themeify, but obviously this does only works with GUI settings...


I don't use themeify but I'm pretty sure that just re-skins octoprint, by "plugin" I meant something like what the M84 plugin does for the motors off button It takes the stock M18 command and re-writes it to M84 to be compatible with repetier firmware. You could take inspiration from that plugin to create a "prusa firmware homing" plugin or something that does the same thing but for G28 commands.


Another great hint.
Never wrote a plugin. I think, I'll dig into that matter the next weeks.


WHYYYYYY?! :sob::sob::sob:


I think Josef is the only one who knows the answer :pensive:


I have the same issue for Fractalworks Julia printer. The Z axis home is configured differently. The Z home is not executed at X0 Y0. Hence, upon clicking Z home, the nozzle just crashes into the heatbed. Is there any way to change that? Is there any workaround for this without adding custom buttons?


Hi @Arun_Baby!

I my opinion, when a nozzle crashes into the print bed with a proper machine, this is a fault of the firmware.
The firmware should take care by checking the Z sensor to prevent this.


Hi @Ewald_Ikemann

I think this is not a fault, but intentionally done by the manufacturer for some reason.
The home calibration is doing well for all axis when I give G28 command.
When I give G28 Z0 (by pressing the Z home button on the GUI), the head is not moving to something like X100 Y200 Z0, which is the position where metal plate is stuck for Z axis calibration.

Can you suggest me a way to change the command from G28 Z0 to something like G28 X100 Y200 Z0 when I press the Z home button on the GUI.


I will check this mysterious X100 Y200 position when my current printing is done.


When you give your printer G28 Z0, you're telling it to only home Z, and do absolutely nothing else with X and Y. There's no software error here, not trying to be a jerk but this is purely user error. That's how it should work. If your print head needs to be in a specific place before homing, that's up to you to put the nozzle in the correct place first if you want to manually home the axis individually.

The home calibration is doing well for all axis when I give G28 command.

It works with just G28 because your firmware is taking care of the X and Y being in the correct position.

Like I said, I'm not trying to be a jerk, and my printer also has a similar issue, but I know that it's up to me to make sure my bed is in the right place before I home my Z axis if I do it manually.