Hello Guest it is August 20, 2019, 09:12:06 AM

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

0 Members and 1 Guest are viewing this topic.

Re: zeroing Z axis via a MAchine Op header file (ie via g-code itself)
« Reply #10 on: January 14, 2012, 04:24:10 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

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?



Offline Hood

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

Offline BR549

*
  •  6,886 6,886
    • View Profile
Re: zeroing Z axis via a MAchine Op header file (ie via g-code itself)
« Reply #12 on: January 14, 2012, 05:21:42 PM »
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