Welcome to Our Community

Some features disabled for guests. Register Today.

French_BB32X_Compil grblhal

Discussion in 'Control Software' started by Mulot35, Mar 25, 2024.

  1. Mulot35

    Mulot35 New
    Builder

    Joined:
    Mar 25, 2024
    Messages:
    3
    Likes Received:
    0
    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:
    orig.jpg

    But I can't compile if I modify line 1257/1258/1259 with $.
    mod.jpg

    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)
     
    #1 Mulot35, Mar 25, 2024
    Last edited: Mar 25, 2024
  2. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    15,507
    Likes Received:
    4,422
    Checkout section 15 of Terms of Service and Rules | OpenBuilds

     
  3. Mulot35

    Mulot35 New
    Builder

    Joined:
    Mar 25, 2024
    Messages:
    3
    Likes Received:
    0
    Sorry I understand, I edited my message
     
  4. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    15,507
    Likes Received:
    4,422
    Why add a "$"?

    Code:
    # this is a comment
    
    Code:
    this is just code (not commented)
    
    Code:
    $this is not correct - comments are done with #
    
     
  5. Mulot35

    Mulot35 New
    Builder

    Joined:
    Mar 25, 2024
    Messages:
    3
    Likes Received:
    0
    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 ?
     
  6. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    15,507
    Likes Received:
    4,422
    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
     
  7. terjeio

    terjeio Well-Known
    Builder

    Joined:
    Oct 18, 2020
    Messages:
    61
    Likes Received:
    63
    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.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice