Hi
I have finally finished my MPCNC and while it took me a very long time from printing the parts, ordering from v1, and finally building the thing, I am very happy with the result. Especially since it came to life on the first try, even though I did all custom wiring. Only the Z-axis was reversed. I didn’t even fry anything with some reverse polarity or so. Which is quite unusual for me…
I have built it with dual endstops, an SKR Pro 1.2 (v1 firmware) + TFT35. It is attached to a Raspberry Pi running CNCjs. It is quite big, approximately 1000x800x200mm.
Three things remain especially unclear to me, though.
First, machine limits. Where do I put them? I see that I can have a machine profile in CNCjs, but apart from that, I don’t see anywhere to enter them for my build on the SKR-interface. I’d really like to have them hardcoded in the firmware.
I have seen machine limits defined in configuration.h, but I am not sure if that is the right place.
// The size of the printable area
#define X_BED_SIZE 1220 // 200
#define Y_BED_SIZE 2440 // 200
// Travel limits (linear=mm, rotational=°) after homing, corresponding to endstop positions.
#define X_MIN_POS 0
#define Y_MIN_POS 0
#define Z_MIN_POS 0
#define X_MAX_POS X_BED_SIZE
#define Y_MAX_POS Y_BED_SIZE
#define Z_MAX_POS 200
Second, Z-Max endstop. I attached one to the E2 endstop pins on the SKR1.2 and then enabled it in configuration.h by uncommenting:
#define USE_ZMAX_PLUG
The pins seem to be set correctly already in “pins_BTT_SKR_PRO_common.h”. However, I’m not sure about the “ifs” there.
#ifdef Z_STALL_SENSITIVITY
#define Z_STOP_PIN Z_DIAG_PIN
#if Z_HOME_TO_MIN
#define Z_MAX_PIN PG5 // E2
#else
#define Z_MIN_PIN PG5 // E2
#endif
#else
#define Z_MIN_PIN PG8 // Z-
#define Z_MAX_PIN PG5 // E2
#endif
I then compiled it and updated the SKR with that firmware. However, I don’t see it having any function. If I manually raise the z-axis, it runs straight into the endstop and would break it if I didn’t stop.
Third, while manually moving the machine with the controls on the TFT, the endstops don’t have any effect. The machine homes/squares fine to the endstops and the touch plate, but if I move it, say, for 100mm and then trigger an endstop, it just keeps on going.
All of my questions have a bit the same core: I know myself; I’m sometimes distracted, tired, or both. While rarely something bad happens because I know that about myself, I really want to take any measures I can to prevent the machine from running into its limits. Hence the z-max switch and the desire to have the machine limits hard-coded.
I’m not entirely sure if I’m just overlooking things or just going against the basic concept of the machine. From what I read in the forum, I did understand that endstops are not really needed apart from being handy for squaring. But that is precisely the reason why I feel like the machine limits should be stored on the deepest possible level and not just in a high-level application like CNCjs.