Welcome to Our Community

Some features disabled for guests. Register Today.

Help with custom Probe macro

Discussion in 'Control Software' started by ian_rsa, Jun 11, 2020.

  1. ian_rsa

    ian_rsa New
    Builder

    Joined:
    Feb 18, 2020
    Messages:
    3
    Likes Received:
    2
    Hi All

    I run a custom build CNC with BalckboxV1.0.237.

    Help will be appreciated as I am stuck on an issue - I'm new to gcode, grbl and CNC'ing in general.

    I always start new set-ups and actions on my machine with a homing cycle.

    I set-up new macros for probing XYZ. The macros are for different bit sizes and also for front-left and front-right positions as I have to flip my parts. The following is an example of my code:

    G38.2 Z-25 F50
    G91 G0 Z5

    G91 G0 X-30
    G91 G0 Z-10

    G38.2 X25 F50
    G91 G0 X-5
    G91 G0 Z10
    G91 G0 X25

    G91 G0 Y-30
    G91 G0 Z-10

    G38.2 Y25 F50
    G91 G0 Y-5
    G91 G0 Z10
    G91 Y25

    G10 L20 P0 X11.57 Y11.57 Z10


    However, once completed, the X,Y, Z values in the DRO seems to be set correctly, but the DRO function to move the machine to the Goto X0 (Work Coord) (G0 X0) and the serial command G0 X0 (or Y0, Z0) does not work for any of the X, Y, Z axis. Essentially, after running the macro, I cannot use a function or issue a command to go to zero on any axis. I'm not sure if this is due to the P or L parameter and have tried P1 or the L2 parameter ut with the same results.

    Further, the G53 function does work. If I then interrupt the command with the Abort function and clear the alarm message, I can then access the DRO functions as normal.

    Another anomaly I have detected is that when I initially start my controller, the Z probe in the wrong direction. If I then use the DRO to set the Z direction to 0 (zero) and jog one step in the negative direction and then start the probe sequence, the direction is corrected.

    Any advice will be appreciated!
     

    Attached Files:

    #1 ian_rsa, Jun 11, 2020
    Last edited: Jun 11, 2020
  2. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    13,753
    Likes Received:
    4,070
    Set a "zero" before the first probe move, as that move is relative to Zero:
    Using the Wizard's proven gcode as a starting point may help: See OpenBuilds/OpenBuilds-CONTROL


    No need for custom macros...

    Wizard allows you to change endmill diameter
    endmill dia.PNG

    And set zero on the front-right (still probing front-left but by entering the stock size, it sets the zero offset correctly:
    front corner.PNG

    We use L20 in the wizard...

    P1 = G54 (default work coordinate system), (P2 = G55 etc)

    L2: G Codes
    L20: G Codes

    We set zero after each direction's probe, not all at once at the end.

    Again, our wizard's proven code for inspiration: OpenBuilds/OpenBuilds-CONTROL
     
  3. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,239
    Likes Received:
    1,815
    first suggestion, do not use G91, even the LinuxCNC documentation says it is dangerous (-:

    and, do include a G21 to set the units, if you happen to run an inch file before the macro lots of crashing will happen
     
    Peter Van Der Walt likes this.
  4. ian_rsa

    ian_rsa New
    Builder

    Joined:
    Feb 18, 2020
    Messages:
    3
    Likes Received:
    2
    Thanks - let me review the proven code and make some changes.

    I work with larger pieces of stock (± 650mm) and need to very accurately detect the edge (at 0.1mm accuracy) but I do not have a method to measure accurately over this distance, so that is why I am trying the right front probe macro
     
    Peter Van Der Walt likes this.
  5. Peter Van Der Walt

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

    Joined:
    Mar 1, 2017
    Messages:
    13,753
    Likes Received:
    4,070
    PS: If you drill index pins in one "side-on" using the machine, then flip over onto the Index pins - you don't have to probe flipped side at all :)
     
    Steveathome likes this.
  6. ian_rsa

    ian_rsa New
    Builder

    Joined:
    Feb 18, 2020
    Messages:
    3
    Likes Received:
    2
    Hi Peter

    Thanks - the example code worked and I managed to fix my macros.

    thanks for the tip in using pins - I am going to do some test on this - a method I want to try is to use my fixture plate bolt holes (M5, spaced in 75mm grid) to the same effect.

    Ian
     
    Peter Van Der Walt likes this.
  7. Friess

    Friess New
    Builder

    Joined:
    Nov 25, 2022
    Messages:
    2
    Likes Received:
    0
    Hi Peter
    I can't find the Wizard's proven gcode mentioned above. The link is no longer valid.
    Could you provide the actual link?
    Much appreciaded!
    Stefan
     
  8. sharmstr

    sharmstr OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 23, 2018
    Messages:
    2,030
    Likes Received:
    1,428
  9. Friess

    Friess New
    Builder

    Joined:
    Nov 25, 2022
    Messages:
    2
    Likes Received:
    0
    Got it, thank you very much!
     
  10. Honver

    Honver New
    Builder

    Joined:
    Mar 24, 2023
    Messages:
    5
    Likes Received:
    1
    Is there a way to modify the movement sequence of the probe by using a JavaScript macro and copying and pasting and changing the source of the probev2.js? The probe sequence is moving too far for me and shaking the probe plate out of position (moving bed). I want it to stay near the circle on top.
     

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