Hello Guest it is April 27, 2024, 12:28:05 PM

Author Topic: How to use Automatic tool depth setting with offsets  (Read 839 times)

0 Members and 1 Guest are viewing this topic.

How to use Automatic tool depth setting with offsets
« on: March 10, 2022, 08:27:07 PM »
I have an Automatic tool changer on my machine. It only holds 7 tools, and I swap out the tools often for different jobs. So in my tool change script it gets the tool then goes to the depth setter and measures tool length. The depth setter is hooked up to my probe input. It's setup so that when the tip of the tool touches the table Z on the DRO reads 0.

I just do hobby work so I will put a pice of plywood on the machine, jog the axis over to where I want it to start cutting, and jog the z axis down to the top of the piece of plywood. I then hit the Zero X, Y, Z buttons next to the DRO. This makes it so that Z on the DRO reads 0 when the tip touches the top of the wood.

When a tool changes and it sets the depth of the new tool it messes up the work ofsets. To set the measured height I use the command:
Code: [Select]
mc.mcAxisSetPos(inst,2,measuredHeight)
Should I be using a different command? I can read the offsets using:
Code: [Select]
CurToolZOffset = mc.mcCntlGetOffset(inst, 2, 1)
But there is no way to set the value.

Does anyone know how I should be calculating the height so that the workoffset is accounted for?
Re: How to use Automatic tool depth setting with offsets
« Reply #1 on: March 10, 2022, 10:09:55 PM »
Hi,
the best way to visualise what measurements go into making the controlled point location is the 'Diagnostics Tab'

The two APIs you have tried relate to the <Work Offset> and the <G92 Offset> whereas you need to look at <Tool Offset>.

The tool APIs:
Code: [Select]
rc = mc.mcToolSetData(
number mInst,
number Type,
number Toolnumber,
number val);

Description:
Set the offset values for each tool.

Parameters: Parameter Description
mInst The controller instance.
Type MTOOL_MILL_X, MTOOL_MILL_X_W, MTOOL_MILL_Y, MTOOL_MILL_Y_W, MTOOL_MILL_HEIGHT, MTOOL_MILL_HEIGHT_W, MTOOL_MILL_RAD, MTOOL_MILL_RAD_W, MTOOL_MILL_POCKET, MTOOL_LATHE_X, MTOOL_LATHE_X_W, MTOOL_LATHE_Y, MTOOL_LATHE_Y_W, MTOOL_LATHE_Z, MTOOL_LATHE_Z_W, MTOOL_LATHE_POCKET, MTOOL_LATHE_TIPRAD, MTOOL_MILL_RAD, MTOOL_LATHE_TIPDIR
Toolnumber Tool number to be set
val Value to set the selected offset.

Craig


'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: How to use Automatic tool depth setting with offsets
« Reply #2 on: March 11, 2022, 09:54:45 AM »
I'm not sure how the tool offsets would work. My issue is that the work offset is being changed when the tool length is checked. The tool offsets will be used based on the Z offset, and if the Z offset is overwritten to be to low the tool offset will be to low.

Example (for Z axis)
using machine coordinates,
Z= 0 at table surface, Z = -7.5 Is Z axis raised to maximum position
Spoilboard is 3/4" thick piece of MDF
Workpiece is 3/4" MDF

Step 1: I load T1, a 1" long tool in machine and tool change measures tool length and sets Z offset = -6.5 (due to probe strike)

Step 2: I jog machine to X=0, Y=0, Z to top of workpiece(1.5" above table)
Step 3: I set Z = 0 at top of workpiece, now Z offset = -5 (Z offset from tool length + spoilboard thickness + workpiece thickness)

Step 4: Cut with T1, all works correctly

Step 5: Tool change to T2 is called a 1.5" long tool, tool change measures tool length and sets Z offset = -6 (due to probe strike) <- This is where the problem is The Z offset should be -4.5, but due to probe strike overwriting Z offset value set in step 3 the offset is to deep!

I can calculate the -4.5 position, but have no way to write it. I have the information to calculate the offset if it's correct (going from step 3 to 5), but once its overwritten, I can't calculate it on future tool changes!

Re: How to use Automatic tool depth setting with offsets
« Reply #3 on: March 11, 2022, 11:41:36 AM »
From my understanding with an automatic tool change is that you do not probe tool length after each tool change. Each tool is measured outside of a job and the data entered into the tool table. Tool 1 is your master tool with 0 offset value, and every other tool offset is reference to this. Your M6 macro will just control a physical changing of the tool via the ATC and the offset is applied using G43 H# where # is the tool number. Someone correct me if I am wrong
Re: How to use Automatic tool depth setting with offsets
« Reply #4 on: March 11, 2022, 05:53:37 PM »
I believe you are correct, this is the way it is normally done. But since I am constantly swapping out tools I would prefer to just measure each time