Hello Guest it is April 18, 2024, 03:15:23 AM

Author Topic: zeroing Z axis via a MAchine Op header file (ie via g-code itself)  (Read 6431 times)

0 Members and 1 Guest are viewing this topic.

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)

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: zeroing Z axis via a MAchine Op header file (ie via g-code itself)
« Reply #1 on: January 14, 2012, 03:45:12 PM »
Do a search for auto zero or auto tool zero and you should come up with plenty info.
Hood
Re: zeroing Z axis via a MAchine Op header file (ie via g-code itself)
« Reply #2 on: January 14, 2012, 03:48:42 PM »
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.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: zeroing Z axis via a MAchine Op header file (ie via g-code itself)
« Reply #3 on: January 14, 2012, 04:01:18 PM »
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

Offline budman68

*
  • *
  •  2,352 2,352
    • View Profile
Re: zeroing Z axis via a MAchine Op header file (ie via g-code itself)
« Reply #4 on: January 14, 2012, 04:10:46 PM »
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
----------------------------------------------------------------------
Just because I'm a Global Moderator, don't assume that I know anything !

Dave->    ;)
Re: zeroing Z axis via a MAchine Op header file (ie via g-code itself)
« Reply #5 on: January 14, 2012, 04:12:25 PM »
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.
« Last Edit: January 14, 2012, 04:16:11 PM by peskywinnets »

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: zeroing Z axis via a MAchine Op header file (ie via g-code itself)
« Reply #6 on: January 14, 2012, 04:15:41 PM »
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

Offline budman68

*
  • *
  •  2,352 2,352
    • View Profile
Re: zeroing Z axis via a MAchine Op header file (ie via g-code itself)
« Reply #7 on: January 14, 2012, 04:16:02 PM »
Doesn't this mean you just need an insulating layer on your touch plate?

Dave
----------------------------------------------------------------------
Just because I'm a Global Moderator, don't assume that I know anything !

Dave->    ;)

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: zeroing Z axis via a MAchine Op header file (ie via g-code itself)
« Reply #8 on: January 14, 2012, 04:17:32 PM »
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.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: zeroing Z axis via a MAchine Op header file (ie via g-code itself)
« Reply #9 on: January 14, 2012, 04:18:31 PM »
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