Hello Guest it is March 28, 2024, 04:28:29 PM

Author Topic: Z probe macro with offset  (Read 17437 times)

0 Members and 1 Guest are viewing this topic.

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Z probe macro with offset
« Reply #10 on: May 18, 2015, 04:53:28 PM »
With tool setting all values HAVE to be referenced to Something, normally a master tool OR the spindle face.  THEN the top of part MUST be touched off with the master tool and Work Z has to be set to ZERO.  The master tool is the reference tool. When you change tools the offset is the difference between the master tool and the current tool.

The master tool can be ANY tool NUMBER but the offset is ZERO. IF you use a tool as the master it must be used for every setup UNLESS you reset all the tools to a different master tool. That would a  reason to use the spindle FACE as the master as it never changes. But it is not always the best option.  Here I have a master STUB tool holder( #2 morse taper) that is ALWAYS the master for this machine. It make it very easy to use compared to the spindle face.

IF you are quill travel limited you would use the longest tool as the master. To prevent sucking up the tool into the quill, not good on a KneeMill.

Now are there OTHER ways to do it sure, Just pick one and stick with it.

Just a thought, (;-) TP



Offline TPS

*
  •  2,501 2,501
    • View Profile
Re: Z probe macro with offset
« Reply #11 on: May 18, 2015, 05:03:10 PM »
That is what i try to say in may bad bavarian english,

---With tool setting all values HAVE to be referenced to Something


all the height's are not based to the matierial, they are based to
one paticulare heigt (master tool, ore what ever you want to call it).

so you do not only have to measaure the material, also you have
tho measure your tool hights based to this macic height.
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.

Offline AVRnj

*
  •  52 52
    • View Profile
Re: Z probe macro with offset
« Reply #12 on: May 18, 2015, 05:04:01 PM »
OK, I THINK I am seeing what you both are saying. This is different than the way I used to do this.

What you guys are saying is make my probe as tool zero, and say for argument sake, it has a height of 4"

Now, if Tool 2 is an end mill, and it's height is 3", in my Tool Table, I would enter -1" for it's height, is this what you guys are saying?

In the past I would devote my zero'ing tool as its own tool number in the table, and track it's height, this is far easier for recording, but I suppose I see how what you are saying would work, I just have to subtract out my probe height from the actual tool height before I put it in the table.

Am I reading you guys correctly?

Thanks!

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Z probe macro with offset
« Reply #13 on: May 18, 2015, 05:37:20 PM »
Put you master tool ( Probe)  into the spindle. It can be any tool # does not matter.  In the tool table make SURE that that tool(probe) is set to 0.000 (length).

Probe down with the macro to find the TOM (top of material) . The macro should have set the Z to zero. Install the next Tool and jog DOWN and touch off on the material.  The value in Z is the amount of offset from the master. Put that value into the tool table for THAT tool#.  Do all your tools.

NOW when you start a job , load the MasterTool (probe) in the spindle and run the macro to find the TOM.

Now from the Gcode program side load your 1st tool (M6T1) and apply the G43 H1 X1.000  AND the comp move and it will be set to the material top.  From there on out each tool will be comped correctly.

(;-) TP 

Offline AVRnj

*
  •  52 52
    • View Profile
Re: Z probe macro with offset
« Reply #14 on: May 18, 2015, 09:33:21 PM »
Thanks guys, I get it. This is definitely different than what I was hoping to do, I use TTS and wanted to measure the tool height off the spindle, and just capture the height of each tool, but I get it. Thanks for your help and your patience!

Offline AVRnj

*
  •  52 52
    • View Profile
Re: Z probe macro with offset
« Reply #15 on: May 19, 2015, 08:27:45 AM »
After walking through the macro, and understanding it a bit more, I was able to get this to behave the way I wanted it to.

I was able to capture the current tool's offset by capturing GetOEMDRO(32) and setting it in a variable. Then when the probe is triggered, instead of going back to the point where the probe was triggered, which is getVar(2002), I go back to getVar(2002) - the tool offset I stored in a variable. I then retract one inch, and set the Z DRO to 1. All of this is done with my probe in the tool table. and using the offset.

I like to measure all of my tools before a job, so what this allows me to do is use a granite block with a hole bored through it, place each TTS tool holder with tool in it in the bore, and use a height gauge to measure all of my tools including my probe. I then enter the height for all of my tools into the tool table, including probe, and everything works perfectly.

For me this is much faster and more accurate than having to use the probe as my master or tool zero without an offset.

This is the way Tormach does it.

Thanks for your help guys. If anyone is interested, I can post the exact macro that I am using.

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Z probe macro with offset
« Reply #16 on: May 19, 2015, 11:17:24 AM »
So when you set up to do a job do you use the probe to set the TOM (top of material) to zero ??

It would nice for you to show the macro you use for future users who may want to do it that way.

Yes Tormach does it that way but MOST do not have a seperate tool height guage so they use the machine (;-)

(;-) TP

Offline AVRnj

*
  •  52 52
    • View Profile
Re: Z probe macro with offset
« Reply #17 on: May 19, 2015, 02:20:05 PM »
Yes, I use the probe as tool 99 to set the TOM according to the height of the probe. Since I use TTS tools, I splurged on a granite block and a height gauge. To me, it would be one thing to use the machine if you only needed to do it once, but I like to measure all of my tools that I am going to use for a job, each time I do a new job. That would be a bit cumbersome to use the machine to do that every time.

Here is the code I am using, there are only 2 lines of code that are different than the original code I was using:

Code: [Select]
CurrentFeed = GetOemDRO(818) 'Get the current feedrate to return to later
PlateThickness = GetUserDRO(1151) 'Z-plate thickness DRO
ProbeHeight = GetUserDRO(32)

If GetOemLed (825)=0 Then 'Check to see if the probe is already grounded or faulty
DoOEMButton (1010) 'zero the Z axis so the probe move will start from here
Code "G4 P2" ' two second delay
Code "G31 Z-1.0 F5" 'Z goes down a max of 1.0 at 5IPM
While IsMoving() 'wait while it happens
Wend
ZProbePos = GetVar(2002) - ProbeHeight 'get the axact point the probe was hit, making sure to account for the tool offset which is not accounted for in 2002
Code "G0 Z" &ZProbePos 'go back to that point, always a very small amount of overrun
While IsMoving ()
Wend
Call SetDro (2, PlateThickness) 'set the Z axis DRO to whatever is set as plate thickness
Code "G4 P0.25" 'Pause for Dro to update.
Code "G0 Z1.0" 'retract Z to 1.0 inch
Code "(Z axis is now zeroed)" 'puts this message in the status bar
Code "F" &CurrentFeed 'Returns to prior feed rate
Else
Code "(Z-Plate is grounded, check connection and try again)" 'this goes in the status bar if aplicable
Exit Sub
End If

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Z probe macro with offset
« Reply #18 on: May 19, 2015, 06:07:23 PM »
If you have not noticed you are still using the Probe as the master tool (;-) You just fudged the length values to suite your way of doing it.  Not a problem. There are as many ways to do this as there are machinest doing it.

You can set tools in the machine just about as fast as you would the tool setter AND the values are automatically loaded into the tool table (;-) So IF you count the time to enter the values the machine would be faster.

THANKS for posting your code it may be a great help to others

Just a thought, (;-) TP

Offline AVRnj

*
  •  52 52
    • View Profile
Re: Z probe macro with offset
« Reply #19 on: May 20, 2015, 08:34:46 AM »
Oh yeah, I realize I am still using the probe as the master, I always wanted to do that, I just did not want to use it as tool zero.

I may give the other method a shot. I am a bit set in my ways and have always done it that way, but it can't hurt to give a new way a shot. For me its time consuming to touch down with a tool on Z, I need to jog down, then step down until I touch the rolling paper, and then account for the thickness, it just seems to take too long.

Thanks for all your help on this.