540,523 active members*
1,771 visitors online*
Register for free
Login
Results 1 to 5 of 5
  1. #1
    Registered
    Join Date
    Nov 2009
    Posts
    3

    Tool Height Macro

    After searching far and wide for a good macro for setting tool heights in the tool table, i cant seem to find anything that suits my needs. I am basically looking for a macro that does what the tool height setter in mach4 does. here is my workflow:

    (1) set z 0 on my mill top (i do this is with a probe in the spindle, but could be accomplished many ways)
    (2) put the tool height setter on the mill top where i just measured z0
    (3) put tool to be measured in spindle and set the tool number so mach3 knows what tool to change the height for in the tool table
    (4) hit button for macro that drives the tool into the height setter, automatically sets the tool height in the tool table (this measurement would be the z height measured minus the height of the tool setter)
    (5 )z backs off the setter and and is ready for the next tool to be measured.

    variables that would need to be predefined:
    (A) z plunge feed rate
    (B) Height Setting offset (height of the setting off the table)
    (C) Height of the retract after tool height is set

    Lets assume i already have (1) worked out as setting z zero is easy. any help would be greatly appreciated. i am not a macro programmer in anyway, i am working on a killer screen set right now and this is the only piece i am missing before i give it way.

  2. #2
    Registered
    Join Date
    Feb 2011
    Posts
    338

    Re: Tool Height Macro

    these two may not be compatible as it sounds as through he tool height setter is not connected to the control by wire or wireless there fore the control doesn't know where the setter is

    (2) put the tool height setter on the mill top where i just measured z0
    (4) hit button for macro that drives the tool into the height setter, automatically sets the tool height in the tool table (this measurement would be the z height measured minus the height of the tool setter)

    unless the setter is connected to the control the machine would not know when to stop
    you might be able to write a macro
    1) that would take the measurements you want
    2) would index to the next tool
    3)if the index position is or is placed in a different spot would return it to the location of the setter
    4) manually bring down the tool to touch the setter
    5)cycle start to do #1-#5 again

  3. #3
    Registered
    Join Date
    Jul 2003
    Posts
    168

    Post Re: Tool Height Macro [here's one for LinuxCNC]

    I created this for LinuxCNC with my Chinese CNC, which came with a "Z height setter" and a cable connection for it. The tool is spring-loaded, normally closed (NC), "knife" switch with its two wires connected to the control board. With a G38 (probe) command, the control is monitoring the voltage across that pair of terminals. Closed, the voltage will be (pulled down) to zero, but when the contacts in the switch are separated, the voltage will be (pulled up) to high. The change in voltage indicates contact has been made with the plate. (If you have bare wires, you connect the red one to your control boards "signal" pin and clip the other one onto the cutter (it could be any ground as long as the cutter is electrically connected to the same ground).

    To use the code, center the cutter over the height setter "at a reasonable height" (0.1-0.5" would be good: G38 is defined to "give up and declare failure" after a predefined probe distance and "probing air" is not satisfying) and set G59's X,Y to 0,0 there. G10 L20 P6 X0 Y0. Run the code, with thumb hovering above the ESC key--as you would for ANY strange G-code...

    The tool will descend at a "FEEL" speed, and after contact, reverse and repeat at a slower "PROBE" speed before finally backing off to 0.1" above the top plate. I then record the values of G53 coordinates at this spot and proceed to set my part zero(es) and record their displacements from G59 X0 Y0 Z0.1 (I prefer to return to Z0.1 and NOT Z0 because I don't like to touch the setter any more than necessary.)
    Attached Files Attached Files
    --
    Dan

  4. #4
    Registered
    Join Date
    Jul 2003
    Posts
    168

    Re: Tool Height Macro [IMPORTANT EDIT]

    Incidentally, I just realized it would be wiser to set the variable #<ZMAXDOWN> to something LESS than the full-travel of the height-setter's plunger.

    For example, supposing the plunger's travel is 0.5" before bottoming out, setting
    #<ZMAXDOWN>=0.4"
    means the plunger will only travel 0.4", even if the tool starts 1/10th of a mil away and contact fails to be detected.

    It also means that if you start with the tool over 0.4" away, the probe will fail and you'll get to run the program again from the current location.

    (The G38 command uses #<ZMAXDOWN> to decide when to stop probling.)
    --
    Dan

  5. #5
    Registered
    Join Date
    Jul 2003
    Posts
    168

    Re: Tool Height Macro [here's one for LinuxCNC]

    "Baloney" Alert:
    Quote Originally Posted by cnczane View Post
    ... The [Z height setter] is [a]spring-loaded, normally closed (NC), "knife" switch with its two wires connected to the control board....
    NO, IT ISN'T.[1] Electrically, it's the same thing as a lump of metal with no moving parts. The spring and plunger are NOT in there to make-or-break an electrical connection, but SOLELY to absorb impact of a tool probing down to "find" the surface by making electrical contact with the plunger.

    Quote Originally Posted by cnczane View Post
    ... (If you have bare wires, you connect the red one to your control boards "signal" pin and clip the other one onto the cutter (it could be any ground as long as the cutter is electrically connected to the same ground). ...
    What do I know about wire colors??? After posting this I immediately saw pictures of probes with black-and-WHITE wires, and RED clips being clipped onto cutting tools prior to probing.

    The POINT is that the wire connected to the base should be connected to the ground of the controller, and the clip's wire should be connected to the PROBE-IN pin of the controller.

    I apologize for having muddied this thread with my ignorant "insights."

    [1] https://www.cnczone.com/forums/calib...ml#post2440262 (There's pictures.)
    --
    Dan

Similar Threads

  1. Tool Height Macro
    By madmikethespoon in forum Milling
    Replies: 3
    Last Post: 04-30-2020, 02:56 PM
  2. M6 macro z height issue when changing from short to long tool
    By Buoyen in forum UCCNC Control Software
    Replies: 1
    Last Post: 02-01-2020, 05:43 PM
  3. Basic z-height probe macro trouble
    By vengeful in forum Mach Wizards, Macros, & Addons
    Replies: 0
    Last Post: 02-04-2018, 02:10 AM
  4. Help wiring Tool Height/ Z axis height base into C10 BOB
    By SpecialEd in forum Tormach Personal CNC Mill
    Replies: 2
    Last Post: 11-21-2016, 02:13 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •