Avid Touch Plate bug when a tool height is set and active

There are always monkeys in he shop. Sometimes the monkey is you :slight_smile:

1 Like

Because the AvidCNC script is hardcoded to G43 H1

Written correctly the Avid touch off script would zero to current tool.

For me, I touch off with tool #99, not #1. So the AvidCNC touch off script will break my probe by jamming it essentially 1.5 inches straight down into the workpiece using a G0 :scream:

That is a very expensive bug :rofl:

Exactly what I am talking about. My reference tool sits on my shelf. I use #99 which is a Drewtronic.org S5000LED probe. a nice little American made job.

2 Likes

That would be me!

:see_no_evil:

1 Like

Also, in my carousel system you touch each tool on the way to the cut and on the way back from the cut.

One the way out, we prove we have the correct tool.

On the way back in, we prove that A) we didn’t break the tool and B) we didn’t lose stops before we try to dock the tool.

On B above, that has cost me in excess of $1,000 each time it has occurred. It is surprising just how quickly these machines can bend and break things. Especially losing steps in the Z axis.

B is even worse when dealing with static tool post because you are moving the whole spindle to dock the tool. You are 1/16" of an inch off you are breaking the tool holder clamp. A half inch and you can be ripping the core out of your motor pretty quickly.

If you don’t run with a tool length sensor using ATC you are just asking for bad things to happen.

If that’s true, I can see that being an issue for you. I guess that’s the specific detail I wasn’t picking up on from the thread, not having the equipment you’re talking about and all.

So if you change your tool numbering and carousel to start at 2…or 10… and keep T1 to manually swap in as your probe (zero offsets in Tool Table, not taking up room on the rack), does that rectify anything? This is assuming you still intend to be present during probing and you’ve not setup some auto-probing feature.

Or just use the other Mach4 probe routines instead of the Avid one, which appears to be written with a different use-case from yours in mind. I’m seeing people trying to use a product meant for locating work coordinates on a machine kit featuring manual tool changes for 3rd party purposes and getting frustrated. These same people are obviously working through a number of other high-level technical hurdles so I know I must be missing details (see above) and want to understand. Especially if I do decide to go to ATC some day and want to make informed decisions about compatibility.

After reading through this, I think I would take screenshots of the configuration pages then dump the Avid Mach4 screen set and scripts. What value is left (in the Avid screenset/touch script) after you’ve gone to servos and ATC?

My solution is simple, AvidCNC provides a stripped down hobby Mach4 interface that is perfect for beginners and those folks who just want to stay “woodworkers.”

I just don’t use AvidCNC’s screens anymore but I do use their configuration script though.

Once you get beyond this little “snafu” you get into Newfangled and Warp9’s little war over the correct interpretation of a “probe no-trigger” and whether its should result in a failure or a pollable event.

You are actually missing a ton of features that come standard with Mach4 because Warp9 does things “differently.” So when you are ready to move on and get features like surface mapping, probe to boss, angle, feature and the other advanced functions, ping me. I can walk you through that.

If you search in other topics about probes you will find I am a broken record player and repeat this stuff everywhere.

Actually, I am not sure I agree with that statement or question.

I think what you might be missing is that AvidCNC sold you a very basic machine. The UI was stripped of anything that could be confusing. The functions like touch off where designed to be “idiot proof” and thus they hardcoded values.

Remember, what you have is a “starting point” and NOT a destination. That is the very nature of a DIY machine.

I think I worded that improperly and I agree with your sentiment - I’ve edited it now. The Mach4 interface Avid provides is meant as a starting point and to work within their atmosphere. Today, that works for me just fine.

What I don’t get is why people who are clearly operating diamond mines on Pluto are bugged by the Avid touch script. Like - just stop using it?

Ah, great question. Because AvidCNC needs to fix it for safety reason. It is one line of code.

I was using the touch plate to measure tools for manual tool changes with bit collars. My project required something like 200 tool changes. My Avid setup is stock, and I haven’t customized any machine hardware or software. The multiple tools were similar in length, so it didn’t damage my touch plate, but it was an eye-opener when I realized what was happening.

1 Like

Okay, I added a work around to fix this issue. Here is how I did it:

  1. I wrote a module to disable the tool height and restore it after:
    Mach-4-Avid-CNC-Customizations/CWUtilities.lua at main ¡ corbinstreehouse/Mach-4-Avid-CNC-Customizations ¡ GitHub

The module factors in the current tool height and adjusts the Z after the touch off.

  1. I modified my screen PLC script to see if the touch window was closed; and when it was closed, I do the restore:
  -- corbin, fix the touch plate to work with tool offsets. Only runs when it is shown, which shouldn't slow anything down
    if TframeShown then
    	-- It was shown (the button clicked), make sure the dialog is still visible; if it isn't, restore state
    	-- it also might be set back to nil on close...so check for nil and restore state then too.
    	if Tframe == nil or not Tframe:IsShown() then		
    		TframeShown = false -- No longer visible..restore state
    		CWUtilities.RestoreToolHeightActiveState()						
    	end
    end
  1. I modified the Touch Plate button to save the state and set a bit that it is visible:
function btnTouchPlate_Left_Up_Script(...)
    CWUtilities.SaveToolHeightActiveStateAndDisable()
    
    --Touch Plate script
    if (Tframe == nil) then
    	package.loaded.TouchPlate = nil
    	tou = require "TouchPlate"
    	Tframe = tou.Dialog()
    	assert(Tframe ~= nil)
    else
    	Tframe:Show()
    	Tframe:Raise()
    end
    
    TframeShown = true -- set to true after the Tframe var is set
end

There’s a little more to it; using the module at the start of the main screen script and declaring the variable:

-- fixes the touch plate issue with tool heights active.
package.loaded.CWUtilities = nil
CWUtilities = require "CWUtilities"

TframeShown = false

Corbin