Friday, 10 May 2019

Tool length offsets - basics

Tool length offset conventions:
Although it's far from rocket science, you need to be clear in your mind what is going on before you can write a macro to do what you need of it. For instance, you could get into a fine old state if you started mixing up machine coordinates (G53) and work coordinates (G54 etc). Generally, tool length offsets are created using machine coordinates so that they are not screwed up by changes in work origins etc. However, work coordinates are obviously set relative to a particular workpiece setup. You want to get your tool offsets set up so that they work with any subsequent work setup. On a good day, you'd not want to have to reset your tool length offsets each time you move the work. 

Use of the "Reference tool" for tool length offsets:
Whether or not you have either a Renishaw-type probe tool or a touch pad tool setter, the approach to determining tool length offsets is fairly well established. Indeed, you don't even need to use any specialised gadgets at all to get the work done.

The concept is fairly simple. You choose a "reference tool" as a standard to compare tool lengths against. In the tool table, this tool will usually have a length offset of zero. There needs to be some fixed height surface for measuring tool lengths to be measured against during the offset measurement process. The Z position of the spindle (G53 coordinates) of the "reference tool" when in touch-off with the reference surface is referred to as "Zref" and as mentioned, it should not change during the subsequent measurement activity. If the reference tool tool is now changed out for a real tool and the touch-off spindle position remeasured, the difference between the current Z coord and the Zref coord is the tool length offset for that tool. A tool that is shorter than the ref tool will have a negative offset length in the tool table and vice versa. Pretty simple really.
  • If you move the table height or use a different surface to touch off against, you will need to reacquire a new Zref value using the same ref tool as before before measuring any further tool length offsets. The existing offsets should then remain valid.
  • If you change the ref tool length, you somehow need to recalibrate it against the existing tools in the table. Presumably you could do this manually by touching off both it and a known tool and frigging the length offset for the reference tool.
  • You can add new tools or change the tools allocated to a position in the table without having to remeasure all the other existing tool offsets.
So for a tool length setting macro, you need to create / nominate a fixed reference tool as the basis for the calculations. Then determine the Zref height with that tool fitted. Then determine the length difference from Zref to each subsequent tool. On the Newker controller, the "Redeem" (tool offset) screen allows you to save the current machine Z coordinate as the length offset, so the macro could simply park the tool at the touch-off position and get you to save the resulting change in machine position to the correct tool number offset. Even better, though, would be to save the value directly to the table. Is there a way to tell it which tool number we are currently measuring though?

Work Coordinate System (WCS) setting:
Once the tool length offsets are taken care of, the rest is fairly straightforward. The Newker controller allows the current machine position to be stored as the current WCS (press the "Setup" panel button) - and the G43 tool length offset command automatically compensates for tool changes. 

I really just need to create a macro to take care of setting up tool length offsets and the rest should follow. Given that the Newker system comes with pre-existing user programmable macros M880 - M885 and claims to recognise up to M889, it looks as if there is room for at least 4 additional macros of my own design, starting with M886.

Game on.

No comments:

Post a Comment

TIG welder up and running - after some fault diagnostics and repair

Finally got some time to connect up the flow meter and argon hose. Plugged in the torch and ground cables and the torch hose etc. Powered it...