Hello Guest it is March 28, 2024, 05:39:40 PM

Author Topic: Using The Knee For Tool Length Comp....  (Read 8950 times)

0 Members and 1 Guest are viewing this topic.

Using The Knee For Tool Length Comp....
« on: December 17, 2009, 01:11:53 AM »
    Today I finished the new wiring for the quill, and got limits working, so I now have a quill drive and a knee drive.  Tomorrow I want to implement the tool length comp using the knee.  Mach3 v3 doesn't really suport this, as G43/G49 are processed internally.  So, here's what makes sense to me as a temporary kludge until Mach3 v4 is ready:

Setup:
    1) Load tool table with length offsets - reference tool is longest tool of entire set, with length set to 0.000".  All other tools will have negative offsets.
    2) Setup fixture as follows:
          Load and select reference tool
          Set quill (Z axis) a reasonable distance down from top of travel (rapid/safeZ height + some pad at a minimum)
          Raise knee (A axis) until top of workpiece almost touches reference tool tip, and Zero A work offset DRO
          Lower quill to touch-off on workpiece and set Z work offset DRO

Usage:
    1) Use M143 in place of G43, M149 in place of G49, to enable/disable tool length offsets
    2) M143 will move knee up to current tool length offset.  i.e. - if tool length offset is -1.234", knee will move up to A1.234.
    3) M149 will move knee down to A0.000"

    Do you guys see any problems with this?  I can't see any reason this won't work, and it's dead-simple to implement.

Regards,
Ray L.
Regards,
Ray L.
Re: Using The Knee For Tool Length Comp....
« Reply #1 on: December 17, 2009, 01:54:25 AM »
Unless I'm missing something, the following two trivial macros are all that's required to make this work - four whole lines of code.  In simulation, it seems to work fine.  I'll try it on the machine tomorrow AM.


''
'   Bogus G43 Macro
'
'   Usage:
'       M143 P<OffsetNumber>
''

''========================================================================================
ToolParam_ZOffset =     2
''========================================================================================

''========================================================================================
''   Start of Macro Code
''========================================================================================

' Get the offset number to use
ToolOffsetNum = Param1()
' Lookup the offset
ToolOffset = GetToolParam(ToolOffsetNum, ToolParam_ZOffset)
' Apply it
Code "G0 A" & 0 - ToolOffset




''
'   Bogus G49 Macro
'
'   Usage:
'       M149
''

''========================================================================================
''   Start of Macro Code
''========================================================================================

Code "G0 A0.000"



Regards,
Ray L.
Regards,
Ray L.

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Using The Knee For Tool Length Comp....
« Reply #2 on: December 17, 2009, 04:50:57 AM »
Just wondering, from a practical standpoint, would  it not be easier to set the reference tool up to the gauge line on your taper and have positive offsets for your tools? My thinking is you can never have a shorter tool than your gauge line but if you were using a max length tool as the reference then it may be in the future you get a tool that is longer and thus will have to redo everything.

Hood

Offline Dan13

*
  •  1,208 1,208
    • View Profile
    • DY Engineering
Re: Using The Knee For Tool Length Comp....
« Reply #3 on: December 17, 2009, 07:07:12 AM »
Sorry for the silly question, but what is the benefit of using the knee for tool length compensation? Why not do everything with the quill or alternatively with the knee?

Just wondering, from a practical standpoint, would  it not be easier to set the reference tool up to the gauge line on your taper and have positive offsets for your tools? My thinking is you can never have a shorter tool than your gauge line but if you were using a max length tool as the reference then it may be in the future you get a tool that is longer and thus will have to redo everything.

Hood

Don't you have to redo everything for each job anyway? I only have 7 toolholders, so I have to setup the tools and tool table for each job.

Daniel

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Using The Knee For Tool Length Comp....
« Reply #4 on: December 17, 2009, 07:20:48 AM »
Sorry for the silly question, but what is the benefit of using the knee for tool length compensation? Why not do everything with the quill or alternatively with the knee?

Knees are often slow but even if not then have a lot of mass for lots of small quick movements, that is what the quill is great at. The quill however has limited travel so putting a 30mm drill in then a 1mm endmill the next and you would run out of offset travel, the knee however usually has 16 inch plus of travel so a combination of both is the solution.
Just wondering, from a practical standpoint, would  it not be easier to set the reference tool up to the gauge line on your taper and have positive offsets for your tools? My thinking is you can never have a shorter tool than your gauge line but if you were using a max length tool as the reference then it may be in the future you get a tool that is longer and thus will have to redo everything.

Hood

Don't you have to redo everything for each job anyway? I only have 7 toolholders, so I have to setup the tools and tool table for each job.

Daniel

No, if you have the gauge line set as your reference tool then all tools will be offset to that and you will only ever have to alter the tool in question in the tooltable. The Gauge line will never change.
 If  you used the longest tool method then it would be the same but only if you were sure you would never ever have a tool in that was longer than the reference tool. I am not 100% sure but I seem to remember that you can have positive length offsets or negative length offsets but not a mixture of both, could be wrong though and if I am then it wouldnt matter a toss which way things were done.

Hood

Offline Dan13

*
  •  1,208 1,208
    • View Profile
    • DY Engineering
Re: Using The Knee For Tool Length Comp....
« Reply #5 on: December 17, 2009, 07:45:06 AM »
Thanks Hood.

The only "drawback" I can see in using the shortest "tool" as the reference is if for some reason one forgets to enable the offset for the current tool causing the quill collide with something. On the other hand, nothing would happen if the longest tool was used as a reference - the other tool tools simply won't reach the work surface if the offset is not enabled.

Daniel

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Using The Knee For Tool Length Comp....
« Reply #6 on: December 17, 2009, 07:54:04 AM »
There are a lot of things that can happen if you forget to do something ;D
But I do take your point, so if you are in the habit of forgetting things then maybe moving your Quill fully up, knee fully down and call that your zero offset point, if your homing is accurate then that would never change.

Hood

Offline Dan13

*
  •  1,208 1,208
    • View Profile
    • DY Engineering
Re: Using The Knee For Tool Length Comp....
« Reply #7 on: December 17, 2009, 08:01:41 AM »
Just had it happen a few times :( Used the MDI after running a program forgetting that M30 turns off any offsets. Probably need a big LED on the screen to show if the offset is enabled. Another idea I had is creating a macro that would check the current tool and see of the right offset is enabled before executing any commanded move. If not it would throw a warning message.

Daniel
Re: Using The Knee For Tool Length Comp....
« Reply #8 on: December 17, 2009, 09:47:18 AM »
Just wondering, from a practical standpoint, would  it not be easier to set the reference tool up to the gauge line on your taper and have positive offsets for your tools? My thinking is you can never have a shorter tool than your gauge line but if you were using a max length tool as the reference then it may be in the future you get a tool that is longer and thus will have to redo everything.

Hood

Hood,

I considered that, but the problem is, what happens when you do a G49 (or M149 in this cas)?  The knee would want to return full up, which will pretty much guarantee a crash unless the tool is first removed.  By referencing to the longest tool, a G49 will lower the knee, which will always be "safe".

Right now, I setup the tool table before each job, so if I get a longer tool at some point, I make a longer reference too, and I'm back in business.  I don't have enough holders to have a "persistent" tool table.

Regards,
Ray L.
Regards,
Ray L.
Re: Using The Knee For Tool Length Comp....
« Reply #9 on: December 17, 2009, 09:51:15 AM »
If  you used the longest tool method then it would be the same but only if you were sure you would never ever have a tool in that was longer than the reference tool. I am not 100% sure but I seem to remember that you can have positive length offsets or negative length offsets but not a mixture of both, could be wrong though and if I am then it wouldnt matter a toss which way things were done.

Hood

Hood,

Mach3 doesn't care whether the tool table offsets are all positive, all negative, or some of each.  And, in this case, circumventing G43 with a macro, it really doesn't matter.  Mach3 v4 will use a completely different setup, and probably will allow G43/G49 to invoke VB macros.

Regards,
Ray L.
Regards,
Ray L.