Good morning, I will need to do my reference travel axis by axis and therefore use $HX, $HY, $HZ. I understand that GRBlhal needs to be recompiled. I can easily compile a compilation if I don't touch anything: But I can't compile if I modify line 1257/1258/1259 with $. Do you have any examples to compile GRBLhal for the x32 blackbox? Likewise, I would like to have the possibility of creating custom machines, is this possible? And finally where is the command line to create the 4th axis? Thanks for your help. (the web compiler does not have the homing single axis option)
Why add a "$"? Code: # this is a comment Code: this is just code (not commented) Code: $this is not correct - comments are done with #
ok I think I understand you just have to pass the line in esp32/main/grbl/config.h : Code: #define DEFAULT_HOMING_SINGLE_AXIS_COMMANDS Off // Default disabled. Set to \ref On or 1 to enable. towards Code: #define DEFAULT_HOMING_SINGLE_AXIS_COMMANDS On // Default disabled. Set to \ref On or 1 to enable. Then compiler. Same choice for axis number in esp32/main/grbl/config.h: Code: #define N_AXIS 3 // Number of axes towards Code: #define N_AXIS 4 // Number of axes Then I have to modify esp32/main/boards/BlackBox32_map.h (endstop axis a in axis y): Code: #if N_AUTO_SQUARED || N_AXIS > 3 towards Code: #if N_AUTO_SQUARED || N_AXIS > 4 and Code: #if N_ABC_MOTORS > 0 #define M3_AVAILABLE #define M3_STEP_PIN GPIO_NUM_33 #define M3_DIRECTION_PIN GPIO_NUM_32 #if N_AUTO_SQUARED // add limit pin definitions to stop compiler complaints (from preprocessor). #if X_AUTO_SQUARE #define M3_LIMIT_PIN GPIO_NUM_35 // Same as X limit, switched to Z by board code during homing. #elif Y_AUTO_SQUARE #define M3_LIMIT_PIN GPIO_NUM_34 // Same as Y limit, switched to Z by board code during homing. #else #define M3_LIMIT_PIN GPIO_NUM_39 // Same as Z limit, switched to X by board code during homing. #endif #endif #endif // Endstops #define X_LIMIT_PIN GPIO_NUM_35 #define Y_LIMIT_PIN GPIO_NUM_34 #define Z_LIMIT_PIN GPIO_NUM_39 towards Code: #if N_ABC_MOTORS > 1 #define M3_AVAILABLE #define M3_STEP_PIN GPIO_NUM_33 #define M3_DIRECTION_PIN GPIO_NUM_32 #if N_AUTO_SQUARED // add limit pin definitions to stop compiler complaints (from preprocessor). #if X_AUTO_SQUARE #define M3_LIMIT_PIN GPIO_NUM_35 // Same as X limit, switched to Z by board code during homing. #elif Y_AUTO_SQUARE #define M3_LIMIT_PIN GPIO_NUM_34 // Same as Y limit, switched to Z by board code during homing. #else #define M3_LIMIT_PIN GPIO_NUM_39 // Same as Z limit, switched to X by board code during homing. #endif #endif #endif // Endstops #define X_LIMIT_PIN GPIO_NUM_35 #define Y_LIMIT_PIN GPIO_NUM_34 #define Z_LIMIT_PIN GPIO_NUM_39 #define M3_LIMIT_PIN GPIO_NUM_34 Then compiler. It's good ?
Sounds good, give it a try. We mainly recommend using Web Builder - but it doesn't expose all the options yet, if you get stuck with specifics - can also ask at Issues · grblHAL/ESP32
Most compile time options in legacy Grbl is run time options in grblHAL, including enabling single axis homing commands. $$=22 $22: Homing cycle as bitfield where setting bit 0 enables the rest: 0 - Enable (1) 1 - Enable single axis commands (2) 2 - Homing on startup required (4) 3 - Set machine origin to 0 (8) 4 - Two switches shares one input pin (16) 5 - Allow manual (32) 6 - Override locks (64) 7 - Keep homed status on reset (128) ok More info here - and also in the config.h file itself.