Is G43 Hxx supported when probing (in mach3)

Help for setting up and using
Post Reply
fabhund
Posts: 2
Joined: Sun Jan 14, 2018 8:50 pm

Is G43 Hxx supported when probing (in mach3)

Post by fabhund »

Dear Support.
Before purchase I would like to know if I have a G43 H01 (Tool length compensentation for tool no.1) active, and the probing
sequence is running, does it take the tool length offset into account.
If you a using the GETVAR(2002) directly without other compensation, then it's no. And the probe will most likely crash into the stock :)
-Bo-
daedelus
Site Admin
Posts: 387
Joined: Tue Oct 01, 2013 1:41 pm
Location: London, UK
Contact:

Re: Is G43 Hxx supported when probing (in mach3)

Post by daedelus »

Hi,

I could be wrong and have the wrong end of the stick here but when you mentioned GETVAR(2002) it suggests to me that you are thinking that Autoleveller and AutolevellerAE are "mods" for Mach3. This is not uncommon to think that but it is not true.

AL and AE read a GCode file and produce a levelled GCode file in response. The output GCode is just a levelled version of your original GCode, plus some probing at the start of the file. AL and AE do not interact directly with Mach 3 at all.

The best thing to do here is to download the free version: http://www.autoleveller.co.uk/download/ and give it a test run to see what it does.

I do not use tool length compensation myself but AL and AE have lines like this "#500=#2002" to store each probe point in parameters, so I presume that if G43 H01 is active then the "#500=#2002" lines work with tool compensation too. I could be wrong here too, someone else may be able to correct me.
http://www.autoleveller.co.uk/. Software to probe and adjust a GCode file for PCB's or any probe-able surface.

http://www.autoleveller.co.uk/cnc-probe-guide/. A short guide to setting up the probe.

-James
fabhund
Posts: 2
Joined: Sun Jan 14, 2018 8:50 pm

Re: Is G43 Hxx supported when probing (in mach3)

Post by fabhund »

Dear Sir.
Thank you for your reply, and I learned something new today.
So, the GETVAR(2002) is a command you can exceute when running scripts in Mach3, fx. Toolchange scripts etc.
The parameter "2002" is the same as you use directly in the G-code runtime as the #2002 parameter.

Mach3 does not handle the tool lenght compensation within the #2002 / GETVAR(2002) parameter.
I made a small test and the behaviour is as follows:
:geek:
1. My probe is precise 5mm above stock. This is also Z=0
2. My tool length offset is +3.00 mm
3. I probe the surface with G31 and the value of #2002 is precisly -2.00mm
So the machine moved a physical distance of Z-5mm but reported back to #2002 that it only moved Z-2.00mm :?
The missing 3mm is caused by the tool length offset.

Meaning running the full AL program with initial probe + milling routine, then the mill is 3mm above the stock.

The solution would be to:
Identify which tool number is current tool, find the corresponding tool length offset value in the tool table database.
Subtract that value from bi-linear interpolation, then it would work. :o
However I have no idea if this can even be done in the G-code runtime. I think there is a better chance of running it as a script instead.
Or as an alternative create a Tool length offset input in your program, but that also gets really complicated fast, as you would also need to know which tool number the user intended to use for each process: Engraving, multiple drillings, routing of holes, and finally the cut-out milling.
But we are getting way out in the deep end of the pool here.

I still think the program is Great ! And a low-pratical solution for me could be to ensure all my tool used with this program has same offset (Tool length = 0) for all tools.
-Bo-
daedelus
Site Admin
Posts: 387
Joined: Tue Oct 01, 2013 1:41 pm
Location: London, UK
Contact:

Re: Is G43 Hxx supported when probing (in mach3)

Post by daedelus »

It is my understanding too that there is no difference between #2002 as a parameter in the GCode and GETVAR(2002) as used in Mach 3 scripts. And I also agree that your proposed solution would be easiest in a Mach 3 script.

However, in the member version of AL, you can perform the probing stage and the etching stage separately. It works like this...
  1. Perform only the probing first(All the probe values get logged to a file and each Z value is an offset of 0)
  2. Go back to AL and apply your probe file to the actual etching (this uses the log file rather than the #2002 parameter)
  3. AL now embeds the levelled values for each Z in the new etching GCode file after calculating them from the log file values
  4. This new file will probe 1 time before the etching begins to find the top of your stock (or you can remove this initial probe and set Z=0 manually if you prefer)
This means that you can use 1 tool for probing and another for etching and you should not need to set a tool length offset at all.

Would this method help in your situation?
http://www.autoleveller.co.uk/. Software to probe and adjust a GCode file for PCB's or any probe-able surface.

http://www.autoleveller.co.uk/cnc-probe-guide/. A short guide to setting up the probe.

-James
Post Reply