Hi and thank for your help. I had my own XYZ probe machined. I used it a couple of times as Z-probe only and I manged to do the custom setup. I then got a custom written code to use and had to change a few settings in it. I want to use it as a macro for probing XYZ. In Openbuilds CONTROL I clicked on the Macros-tab and then on the big "Create New Macro" button. From here I labeled it and clicked on GCODE. I copied the text of the Gcode and pasted it in the box. I clicked apply and it was there under macros. (The code follows below.) When I run the Macro, I get this error message: error: 2 - Numeric value format is not valid or missing an expected value. [ %ENDMILL_DIAMETER = 3.175 ] I there something I am doing wrong? Thank you so much. ; Set user-defined variables %ENDMILL_DIAMETER = 3.175 ;in millimeters %PROBE_BLOCK_Z = 3.88 ;Thickness of 3-axis probe in Z direction %PROBE_BLOCK_Y = 12.8 ;Thickness of 3-axis probe in Y direction %PROBE_BLOCK_X = 12.8 ;Thickness of 3-axis probe in X direction G21 ;make sure we are in mm G91 ;Incremental mode G38.2 Z-25 F75 ;Probe Z G0 Z2 ;lift 2mm G38.2 Z-25 F45 ;Probe Z G4 P0.1 G10 L20 P1 Z[PROBE_BLOCK_Z] ;Set Current Z as plate thickness G4 P0.1 G0 Z3 ;lift Z 3mm G0 X-25 ;Move left 25mm G0 Z-10 ;Move down 10mm, should be 7mm below probe surface G38.2 X30 F75 ;Probe X to the right 30mm G0 X-2 G38.2 X30 F45 ;Probe X to the right 30mm G4 P0.1 G10 L20 P1 X[-ENDMILL_DIAMETER/2 -PROBE_BLOCK_X] ;Set current X location as negative half the bit diameter G4 P0.1 G0 X-20 ;Move left 20mm G0 Y-35 ;Move forward 35mm G90 G0 X5 ;Move to X5 (absolute) - will put you 5mm to the right of left edge of stock G91 ;incremental G38.2 Y30 F75 ;Probe Y G0 Y-2 G38.2 Y30 F45 ;Probe Y G4 P0.1 G10 L20 P1 Y[-ENDMILL_DIAMETER/2 -PROBE_BLOCK_Y] ;Set current Y location as negative half the bit diameter - 7mm thickness G4 P0.1 G0 Y-10 ;Move Y-10 G0 Z10 ;Move Z up 10mm, should be 8mm above probe plate G90 G0 X0Y0 ;Go to X0Y0
well, yeah, you didn't read the GRBL wiki (-: GRBL does not understand the %ENDMILL... variable definitions, you cannot use this code on a Blackbox 4x (however, similar code is possible on a X32, I hope to figure it all out over Christmas) in the code below I have replaced the variables with numbers and then calculated the results because GRBL cannot do the [] formulas will only work correctly with a 1/8" bit, I suggest using an accurate 1/8" pin instead of a bit, then swap to the bit and re-probe Z only Code: ; Set user-defined variables ;%ENDMILL_DIAMETER = 3.175 ;in millimeters cant do this, need to remove variables from the code and put the numbers in where needed ;%3.88 = 3.88 ;Thickness of 3-axis probe in Z direction ;%PROBE_BLOCK_Y = 12.8 ;Thickness of 3-axis probe in Y direction ;%PROBE_BLOCK_X = 12.8 ;Thickness of 3-axis probe in X direction G21 ;make sure we are in mm G91 ;Incremental mode G38.2 Z-25 F75 ;Probe Z G0 Z2 ;lift 2mm G38.2 Z-25 F45 ;Probe Z G4 P0.1 G10 L20 P1 Z3.88 ;Set Current Z as plate thickness G4 P0.1 G0 Z3 ;lift Z 3mm G0 X-25 ;Move left 25mm G0 Z-10 ;Move down 10mm, should be 7mm below probe surface G38.2 X30 F75 ;Probe X to the right 30mm G0 X-2 G38.2 X30 F45 ;Probe X to the right 30mm G4 P0.1 G10 L20 P1 X-14.387 ;Set current X location as negative half the bit diameter G4 P0.1 G0 X-20 ;Move left 20mm G0 Y-35 ;Move forward 35mm G90 G0 X5 ;Move to X5 (absolute) - will put you 5mm to the right of left edge of stock G91 ;incremental G38.2 Y30 F75 ;Probe Y G0 Y-2 G38.2 Y30 F45 ;Probe Y G4 P0.1 G10 L20 P1 Y-14.387 ;Set current Y location as negative half the bit diameter - 7mm thickness G4 P0.1 G0 Y-10 ;Move Y-10 G0 Z10 ;Move Z up 10mm, should be 8mm above probe plate G90 ; absolute mode G0 X0Y0 ; Go to X0Y0 [/QUOTE]
[/QUOTE] Thank you so muck for your reply. No, I didn't read the Wiki. I just trusted that it will work. Thank you also for the tip on the bit. It really makes sense. Thanks again.
You can still use it with CONTROL PROBE wizard > Probe Type > Custom > click the Gear icon > set your dimensions as offsets. No macro needed
Thanks. I tried but the spindle went the opposite direction of where the probe was. It went to the right hand top of the workpiece. I must have done something wrong. Will try again later.
check under advanced (top arrow in image below) for which corner you selected the bottom arrow points at the place where you set custom probe block size
Thanks David. I have done that. What I don't understand is why I need to put in the dimensions of the work piece. II will try again and give feedback. Just to let you know, I don't have a Black Box or Openbuilds XYZ probe. I made my own XYZ probe. Thanks for your help.
you put in the stock dimension because we always probe front left corner and then set the offset from there using the stock dimensions. if you are probing and using the front left corner, then the dimensions are not needed