Using Zmax and Zmin endstops with Coordinate Space

Hello all! First time posting a while. I started with a Burly some years back but I let it fall into disrepair. It served me well, and after a few half hearted attempts to repair/improve on it, I threw in the towel. (Still have my V1 sand table, and it wows ALL my guests!)

I am now currently building a semi custom machine that is based on the OpenBuilds frame components but with import HGR rails and SFU ballscrews. For now, I am going to stick with the Mini Rambo while deciding on a controller that can get the most out of my new build.

Now, in the time I’ve been away I started using a Haas mill at work, and I have become very accustomed to G53/G54 coordinate spaces and offsets. Not trying to replicate this or anything, but I was hoping for some enlightenment with the Z endstops.

I want a limit switch at Z-max, and have configured my Marlin FW to home in the +direction and trigger on Zmax. This is good for G53. However when I set up, I want to be able to use a probe/touchplate to home in the Zmin direction and set G54 Z0.

Can this be done completely with Gcode, or will I have problems because the homing direction in the FW is set to +? I read that G38 doesn’t play nice with G28. The Marlin reference page doesnt say so, but can G28 be used in a specific coordinate space? Can G28 have a direction appended to it that overrides the FW?

I did some searching but I didnt find anything definitive. Thanks in advance!

Marlin firmware allows you to designate a different Probe pin (in config.h) from either of the Z min or Z max end stops. I think that doing so will get you access to the behavior you want.

I saw that and I think I understand it however that would still require me to use g38 correct? I’m assuming g28 will only home in the end stop homing direction specified in config.h? If that’s the case it’s a totally fine and workable solution.

However the second question is which coordinate system would be updated by a g38 probe and would I have control over it? In other words I would like g28 to update the g53 machine coordinate system, but g38 to update say g54. Is that part of the equation possible without having to manually specify a g92 in the g54 workspace?

Not an expert, but my understanding is that what G54 (or any of the G54-G59) does it to remember the offset between the “hard stops” of the G53 default (or machine coordinate) system and the currently active coordinate system. I believe if you execute a G54 before you do the G38, then the probe will update the current active coordinate system.

So, in Haas language the work space coordinate system commands are considered “modal”…which means they persist until changed or canceled.

If indeed marlin works the same, as you say…then my problem is solved. Easy enough to test, once my machine is actually running again. I’m in the wiring phase.