Hello Guest it is April 19, 2024, 12:19:53 AM

Author Topic: Auto tool measuring and offsets  (Read 18841 times)

0 Members and 1 Guest are viewing this topic.

Re: Auto tool measuring and offsets
« Reply #10 on: April 11, 2012, 01:54:07 PM »
FWIW - I used to to tool length that way, but switched some time ago to just doing it off-line using a digital height gauge.  I find it MUCH faster and more convenient, as I don't have to swap out all the tools.  I can measure a dozen tools in maybe 2-3 minutes, where it would take 10 minutes to do using the machine.  Might be a different matter with a PDB....

Regards,
Ray L.
Regards,
Ray L.
Re: Auto tool measuring and offsets
« Reply #11 on: April 11, 2012, 03:14:24 PM »
currently by using the single macro it measures in less than 30sec and I am testing out the repeatability. But for what I am doing it is great so far and leaves operator error out of the loop. I would only run the whole program on every Monday and really don't have to unless a tool is removed or broken ( in which case if a tool is removed or broken they can run just the single tool offset macro and be back in business).

And also I have looked into a digital height gauge for a iso 30, $1500 is not in my budget and measuring equipment breaks. I would much rather use the cnc as the measuring gauge.

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Auto tool measuring and offsets
« Reply #12 on: April 11, 2012, 04:31:33 PM »
You are correct the Get Var() is the correct call. I have been flipping back and forth in the Fanuc world a lot lately and they call them parameters(;-)

I am not sure WHY you keep invoking the G43 H# it should have nothing to do with what you are trying to do.

Probe the master tool, set the Z to zero and the TOOL offset to Zero

Probe the next tool Apply the Z value as that tool offset (it will show the difference between the master and the set tool Remember the master is Zero)
PRobe the next tool and apply the Zvalue as that tool offset

etc
etc
Untill  you run out of tools to set.

That is basically all there is to it.

Just a thought, (;-)TP
Re: Auto tool measuring and offsets
« Reply #13 on: April 11, 2012, 05:15:06 PM »
I don't know that much about vbscripting. I went with an all ready written tool offset macro and tweaked it with help from Gerry. It is automatically inputting the offsets in the tool table so I am happy. Here is the actual finished macro that is running on the machine with no hiccups, but feel free to optimize. I all ready plowed the tool setter off trying to make my own auto tool zero macro. I got it working but Darn could have done without the mishap.

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Auto tool measuring and offsets
« Reply #14 on: April 11, 2012, 06:22:54 PM »
IF it makes you happy that is all that matters(;-)

You may want to look at something like this as a comparison. It starts by measuing the master then you can set as many tool#s as you like or cancel to end.

Sub Main()   
 'Macro for tool setting
code " G28 Z0.000"
code " G28 X0.000 Y0.000"
While Ismoving()
Sleep(10)
Wend

'Set Master Tool Routine
MsgBox(" Place the Master tool into the spindle")
Tnum = Question ("Tool Number?")
Ret = MachMsg ("Are you ready to run the MasterTool setting function?", "MasterTool", 1)
If Ret=2 Then End
code "G31 z-10 f20."
While IsMoving()
Sleep(10)
Wend
PRP= (GetVar(2002)+.2)
code "G0 z" & PRP
code "G31 z-10. f3."
While IsMoving()
Sleep(10)
Wend
Code"G92 Z0.000"
Tlo=GetDro(2)
Code" G28 Z0.000"
SetToolParam(Tnum,2,Tlo)

N1:
' SetNext Tool Routine
Ret = MachMsg ("Are you ready to run the Next Tool Setting function?", "MasterTool", 1)
If Ret=2 Then End
Tnum = Question ("Tool Number?")
MsgBox(" Place the NEXT tool into the spindle THEN press OK Routine Will Start.")


code "G31 z-10 f20."
While IsMoving()
Sleep(10)
Wend
PRP= (GetVar(2002)+.2)
code "G0 z" & PRP
code "G31 z-10 f3."
While IsMoving()
Sleep(10)
Wend
Tlo=GetDro(2)
Code" G28 Z0.000"
SetToolParam(Tnum,2,Tlo)
While Ismoving()
Sleep(10)
Wend
GoTo N1

End Sub

         


Re: Auto tool measuring and offsets
« Reply #15 on: April 11, 2012, 11:05:19 PM »
Thanks I will have to give that a try.
Re: Auto tool measuring and offsets
« Reply #16 on: December 08, 2012, 07:40:17 PM »
I am totally new to all this and am looking at you guys writing your own macros in awe.  If I wanted to use BR549's code, where would I insert that into MACH3.  anybody got any suggestions how I would go about having the knee's servo motor take care of compensating for tool lengths?    I am running a knee mill

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Auto tool measuring and offsets
« Reply #17 on: December 08, 2012, 09:19:52 PM »
Unless your Knee is the Z axis there is no direct way to use both the knee and the quill. It will be one or the other.

Now if you want to run hybrid Gcode where you have macros do the tool height comp it can be done BUT you can no longer run standard Gcode.

You would also have to MOdify the CAm post to add in the required code and remove the Tool Height comp code(Gcode).

(;-) TP

Re: Auto tool measuring and offsets
« Reply #18 on: December 09, 2012, 08:17:22 AM »
lets say during tool change G43 is called up and the tool being inserted is H3 ( 3" longer than shortest tool)  so after the tool change when cycle start is pressed the first thing to happen is the knee going down 3" and the knee dro zeroing at that position.   Basically the H value is inserted into a macro that automatically moves teh knee by that amount and makes that Z zero for the part.  That's it so now we have ofsetted for that tool and when the next tool change occurs that will happen again.    
« Last Edit: December 09, 2012, 08:27:17 AM by Mountainman »

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Auto tool measuring and offsets
« Reply #19 on: December 09, 2012, 11:58:33 AM »
Your problem will be when the G43 runs it moves the Z axis. IF you move the Z and the macro moves the KNEE then what.

Like I said you can do one or the other with standard Gcode. IF you want to run hybrid Gcode you can do it with knee and quill.

(;-) TP