Hello Guest it is October 18, 2019, 07:52:44 AM

Author Topic: Still lost on tool height setup  (Read 2928 times)

0 Members and 1 Guest are viewing this topic.

Offline jevs

*
  •  270 270
    • View Profile
Still lost on tool height setup
« on: April 06, 2015, 10:17:41 PM »
Broke an expensive drill bit tonight thanks to this. It just does not work for me for some reason.

I start by referencing the machine home. Then I make the tool changer go to the longest tool

I make all the settings from a freshly faced block that I plan to machine into my part

I make sure the tool offset is not lit

Then I run it down to my 1" gauge block. Gauge block height is set to 1"

I hit set tool offset. Then I save

I move to the next couple tools and do the same thing.

Then I make it switch to the longest tool which has already been set. I put that down to the 1" gauge block and have the Z gauge block height set to 1".

This is one part that confuses me. I don't know weather to have the tool Offset on/off lit or not when I do this. I would think it should be on since I am using the tool to set it. So, I do this and then it gives me some number like .0812 as the Z offset. This seems to be the actual machine Z minus the tool offset.

Now I go back and do a tool change to each tool and put in a g0z1 and guess what, they do not go where I would expect them. I would think they should all be right on the 1" gauge block, but they are all over the place.

Something is not right and I have been fighting this for a long time. I am not sure how I got two parts made, but I do know they cut deeper or not as deep as they should of in cases. I must have got lucky and they were at least close to the same length on the ones that matter.

One thing I am not sure of is if my  tool change macro should call out some G code that it is not?? There is nothing to do with tool offsets in there. Never thought it needed to since it switches the tool number as it is supposed to.

'Tool change macro for 7 tool turret
Sub Main()
   'Sets variable OldTool to what is currently loaded
   OldTool=GetCurrentTool()
   
   'Sets Variable MaxToolNum to the max number of tools possible
   MaxToolNum=7
   
   'Sets variable Newtool to the one being selected with M6 T#
   NewTool=GetSelectedTool()   
   
   'Get positions before moving to do tool change
   x = GetToolChangeStart( 0 )
   y = GetToolChangeStart( 1 )
   z = GetToolChangeStart( 2 )
   a = GetToolChangeStart( 3 )
   b = GetToolChangeStart( 4 )
   c = GetToolChangeStart( 5 )
   
   'If the current tool loaded is 0 or greater than 7 then tool has been lost
   'so need to ask what tool is currently loaded
   While OldTool=0 Or OldTool>7
   OldTool=Question ("Current tool unknown, enter tool in spindle 1 to " & MaxToolNum)
   Wend
   
   'Sets CurrentTool to Oldtool in case it was lost and entered above
   SetCurrentTool(OldTool)

   'When the tool asked for is invalid then this makes you select a valid tool
   While NewTool > MaxToolNum Or NewTool <1
   NewTool = Question ("Invalid tool chosen, enter tool number 1 to " & MaxToolNum)
   Wend
   
        'If the tool asked for is the same one that is already loaded then exit macro
   If NewTool=OldTool Then
   Message "Tool already loaded or tool not specified with T# (ex:M6 T4)"
      Exit Sub
   End If

'Turn off soft limits if they are on
If GetOEMLED(23) Then
DoOEMButton(119)
End If

'Moves To Z home from where ever it is
code "G53G0Z0"
While IsMoving()
Wend

'Sets ChangeNums to 0 for safety in case it is not at 0
ChangeNums=0

'Makes the magic happen and moves the proper number of times if new tool is higher than old
If NewTool>OldTool Then
   For ChangeNums=1 To NewTool-OldTool
   
   'Moves Z axis to the top of tool change
   code "G53 G1 F70 Z5.800"
   While IsMoving()
   Wend

   'Moves back to bottom of tool change area
   code "G53 G1 F70 Z3.8"
   While IsMoving()
   Wend
   
   Next
   
'Makes the magic happen and moves the proper number of times if new tool is lower than old   
Else
   For ChangeNums=(OldTool-NewTool) To 6
   
   'Moves Z axis to the top of tool change
   code "G53 G1 F70 Z5.800"
   While IsMoving()
   Wend

   'Moves back to bottom of tool change area
   code "G53 G1 F70 Z3.8"
   While IsMoving()
   Wend
   
   Next
End If

'Move Back to Z Home
code "G53 G1 F70 Z0"
While IsMoving()
Wend
   
'Should be a succesful tool change at this point so this sets the NewTool as the current tool
SetCurrentTool(NewTool)

'Turn back on soft limits
DoOEMButton(119)
End Sub   

Offline jevs

*
  •  270 270
    • View Profile
Re: Still lost on tool height setup
« Reply #1 on: April 06, 2015, 10:21:55 PM »
Hmm. Something interesting. If I type G54 in the MDI, then hit g0z1 the tool seems to go to the right place.

Do I have to manually type this every time I change tools and want to check the offset to my part?

Offline jevs

*
  •  270 270
    • View Profile
Re: Still lost on tool height setup
« Reply #2 on: April 06, 2015, 10:27:10 PM »
That g54 did nothing when I changed to a new tool g0z1 still put it above the 1" block instead of on it.

Attached is what I currently have 4 the tool offsets and the Current work offset.

Whatever I am doing, it does not seem to work.
« Last Edit: April 06, 2015, 10:38:47 PM by jevs »

Offline jevs

*
  •  270 270
    • View Profile
Re: Still lost on tool height setup
« Reply #3 on: April 07, 2015, 12:17:18 AM »
Figured it out I think. Took me long enough!
So, here is what I did. Loaded the longest tool. Set it on a 1" gauge block.
Zero the Z
Set the height of the tool as 0
set the rest of the tools from this same position. So all of the tools are referenced from the zero tools 0 Z position
Ref all axis home
Set the edges of the part with an edge finder
Ran the long tool down to 1" gauge block
Set the gauge block height to -1.000, yes duh -1.000, not 1"! Made sense to me once I did not have the tools at weird numbers.
Then, to make a long story short, cut my part successfully :)

Now, I wrote this all down so I can remember next time. At some point I can see I will need a master tool and will have to assign all my tools to tool numbers and cross that into BobCADCAM somehow, but for now I am just setting the heights each time.....baby steps
Re: Still lost on tool height setup
« Reply #4 on: April 08, 2015, 08:27:19 PM »
Just so you know, it really does not matter which tool you use to set the Z height to the top of the part as long as it has a tool length value and the correct tool number.  As for a master tool I prefer that to be the edge finder.  If I have to pick up edges I might as well pick up the Z too!  I like to use a 1/2" ground pin instead of a gauge block.  Roll it back and forth with the tip of your finger, easier than holding the gauge block.

I am currently setting up a CNC mill where I have acquired about 50 tool holders.  I am machining an 1-1/2" thick 12" x 48" Poly shelf to hold all the holders with the holder number engraved next to the pocket.  A second board holds all the taper drill from 3/8" to 1-1/4" by 64ths and end mills, wrenches etc.  So shortly we will have the bulk of our tools preset in holders that are numbered, sitting in holes that numbered and length and diameter stored in the CNC that match.  I plan on touching the holder and tool with nail polish when it is installed so you can tell if it moved, or someone changed it, before you crash it in the spindle.  We are not a production shop and doing mostly one offs so this should save a lot of setup time.