Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: peskywinnets on January 14, 2012, 03:14:56 PM
-
I might be going mad, but I'm sure I saw some funky g-code (somewhere or other) where mach3 would read the g-code & start descending the z axis until the probe pin changed value & then set the Z axis to zero.
My wish is to incorporate such gcode into a machine op 'header' file in CAM software - when I generate the g-code each tool change would have the auto zero g-code incoprated into the main g-code output file. Therefore, when I change a tool, I just simply press run, the new tool will descend until it probes 0 then contnue on with the cycle (which saves the faff of using a manual touch/probe plate)
-
Do a search for auto zero or auto tool zero and you should come up with plenty info.
Hood
-
I will (but didn't cos I reckoned it'd pull back plenty of the wrong info ...most stuff is related to vbscript & touch off plates)...I just seek the g-code to start mach3 hunting for zero from within the g-code file & then the g-code for zeroing the z axis.
-
But is that not what you would need for this? ie a mcode that runs the auto zero routine. If not how else is Mach going to know when the tool is zeroed?
Hood
-
Here is a very helpful thread to read through, at least I "think" this is what you're after?
http://www.cnczone.com/forums/mach_wizards_macros_addons/100594-mach_3_tool_setter_big-tex.html
Dave
-
Thanks but no...that was vbscript (which I have already but needs me to manually touch off after each tool change).
I'm hoping to deploy such a solution when milling copper clad fr4 ...the clamp I use to hold the copper board is grounded (therefore so is the fr4 copper clad surface - well at least initially ie before too much isolation milling takes place!) - so the engraving tool descends touches the copper clad surface, the 'probe pin' changes condition - mach3 then knows, zeros the Z dro & continues with the g-code. I'm pretty sure I saw some g-codes once that do this mach3 auto-zero hunting/zeroing but from within the g-code file itself.
-
That is just the same thing, instead of moving off to a plate you would just be using the workpiece as the plate. Still exactly the same kind of macro needed, you would then just have the mcode for that macro in your G Code at each tool change. You could also have it in the M6 macro I suppose.
Hood
-
Doesn't this mean you just need an insulating layer on your touch plate?
Dave
-
I have the auto zero incorporated in my M6 macro, so that when I change tools the new tool get's zeroed automatically. But I use a fixed probing plate for the toolchanges, like the Big Tex version above.
-
I see you edited, if you already have that code then all you do is put it into a notepad file and save as something like M123.m1s and place in your profiles macro folder. Then every time you call m123 from your code it will do that routine.
Hood
-
I see you edited, if you already have that code then all you do is put it into a notepad file and save as something like M123.m1s and place in your profiles macro folder. Then every time you call m123 from your code it will do that routine.
Hood
Thanks for that....so you are saying I can just insert the line into the gcode, for example...
G0 x10 y-20
m123 (i.e. call auto tool zero macro from within gcode file)
G0 x20 y-40
.....etc?
-
Yes, or have it in your m6 macro like I said and Ger does and then no need to even do anything except have the tool call.
You would also need to set auto tool change in General config and have the M6 stop spindle etc and allow you to change the tool then when you press start it does its thing.
Hood
-
The only way to do it from the GCODE only approach is to use the G31 probe cycle or the G28.1 refhome cycle then apply offset corrections via G92 or G52 or G10.
We do it all the time in plasma to find the top of material (Z0.000)
No macro code involved.
Just a thought, (;-) TP