Question about adding a button to my Ramps board?

Hey peeps

So I have a ramps 1.4 setup, everything is running 100%

But I would like to add some features but not sure if it’s possible.

I like how the marlin we are using has a custom commands feature with a. Home Z and a seperate Home X&Y

But I find myself jogging my x and y to. 70 X 110, after zeroing it. Then zeroing the Z.

I was wondering if there is a way to add a manual button to trigger the. hOme the Z and one for Homing the XnY

I think adding a physical button, wired to an unused input pin, that triggers some custom gcode would be quite tricky. You’d have to understand a lot about the fundamental control flows within Marlin to get it right

OTOH adding a new custom command to the existing menu should be much easier. Search the code for the existing custom commands, and hopefully it’s designed to be easy to understand, copy and tweak.

Or you could have a file on your SD card that just contains the GCode to do what you want, and ‘print’ that file. Something like “G0 X70 Y110”

If you’re using repetier, it has four or five buttons you can add scripts to. One of mine has a G92 X0 Y0 Z0 and another just does G92 Z0.

1 Like

Cool. I never consider Ed loading the am card with pre built gcode.

I really want to build a pendant/controller but there seems to be limited options.

One question. There is a build in home all feature in the menu, as well as the custom commands. I have never looked into it. But is there a faq/guide/best practises?
I want to customise my menus a bit and remove stuff I might trigger or not use. Like the extruder. …

I use octopi for the loader/ management and the head unit to set it up.

I don’t have a ton of space for a dedicated PC yet,. So I am doing quick steps to setup, then walk back to the PC to launch and monitor

One other thing that frustrates me, but I attribute it to the ramps board. It’s not capable of multiple commands. If I cancel a job because something slipped or I missed a step. It has to finish the last command before it will accept a cancel.

You’d need a real time firmware for that. RepRap firmware can do that, but not many are using it with the mpcnc.

If you’re still interested, I looked into this (because I’d like add a ‘goto 0’ and ‘goto top left’ command) and it looks really easy. In Configuration_adv.h, there’s a G-code Macros section, and the standard items look like this:

  #define USER_DESC_1 "Reset All Coordinates"
  #define USER_GCODE_1 "G92 X0 Y0 Z0"

  #define USER_DESC_2 "Home Z Axis"
  #define USER_GCODE_2 "G28 Z"

  #define USER_DESC_3 "Home X&Y"
  #define USER_GCODE_3 "G28 X Y"