First MPCNC build, doing this for my neighbor. He wants a ZMAX home in case he accidentally tells the tool to home during recovery and doesn’t want the tool diving into the work. Makes sense. Also wants to use a contact probe for finding the work top surface. Still good, I’ve done similar things with 3D printers.
I’ve build multiple 3D printers using MEGA\RAMPS+Marlin, first CNC using that combo. Using the Rambo1.4 board and downloaded the firmware for dual endstops.
Made a part to attach to the Z axis to hit a switch when at the Z_MAX position.
Z now homes to max and sets the Z position to +40. Awesome.
Left USE_ZMIN_PLUG enabled
Tried G38.2 z0, Z moves down to 0 and stops and never senses the probe. (I’m closing the probe circuit by hand)
M119 indicates the ZMIN probe is working correctly and changing states.
(insert a TON of undocumented changes adding and removing comments to try to get the ZMIN and ZMAX to work correctly (like disabling USE_ZMIN_PLUG, mostly resulting in compiler errors- none of them will work)
Decided to try using a different input for the probe besides ZMIN.
Having a hard time finding an open pin on the Rambo1.4 board, or at least anything that is documented about spare pins.
Using M43 W I, I verify that the ZMIN pin is PIN10.
(insert a TON MORE undocumented changes adding and removing comments to disable ZMIN so I can use the pin- nothing works)
In the end, the following changes DID work, but they shouldn’t have.
Leaving the ZMIN pin enabled and trying to use its PIN10 input SHOULD have given me a compiler error for trying to use a protected pin. Somehow it did not, and this combination actually allows the Z axis to home to ZMAX and G38 to probe to ZMIN. Note that with this change, the ZMIN and Z_PROBE are triggered together using M119.
So is there a better way to do this? I kind of stumbled onto it because all the “normal” ways of doing this with Marlin (Which I have done on 3D printers just fine) didn’t work. Although I wasn’t using G38 to probe the bed, G29 was used for bed mapping. Maybe it’s a problem with the G38 routine?
Hope this makes sense and is answerable.