Toolchange with a Brother TC-229

More
28 Aug 2014 03:07 #50365 by tnl.lambert
I'm working with a Brother TC-229 that has a 14-tool changer. It's a rotating set of holders that engages and releases when the z-axis moves through the toolchange location. A toolchange occurs when the z-axis is retracted almost to the top limit switch, where a lever disengages the tool and the holder swings in to grab the tool from the spindle. When the z-axis is retracted, the toolchanger can rotate. By pulsing the toolchange motor using a HAL timer for a few milliseconds, a cam is rotated until a sensor picks up the alignment. The cam also helps to eliminate overshoot, so there is no need to home the tool changer.

I have written an o-code subroutine to pulse the toolchange motor that reads an optical encoder, which is also located on the toolchanger. When the encoder finds the tool number that I've requested, it stops, and the toolchange process completes. I've remapped the M6 command to refer to the o-code, but I can't find a good way to work with the pocket numbers, instead of the tool numbers (e.g. #<_selected_tool>). I know that the random toolchanger keeps track of pocket numbers, but since this toolchanger doesn't swap tools, it doesn't seem like that implementation would work. I need to track tools using the tool table, but I also need to be able to change pockets. For example, I might need to manually change Tool 5 in Pocket 8 to Tool 9 in Pocket 8. From my perspective, the number tracking problem is fairly trivial - but I don't know how to re-work the T- command to find the pocket number instead of just calling the toolchanger to the tool number.

This might be a simple fix, but I haven't had much luck finding documentation on similar toolchange processes. Thanks in advance!

Please Log in or Create an account to join the conversation.

More
28 Aug 2014 18:55 #50393 by BigJohnT
If your tool changer is not a random tool changer you ignore pockets. If you move tool 1 to tool 3 it becomes tool 3.

JT

Please Log in or Create an account to join the conversation.

More
28 Aug 2014 20:31 #50397 by tnl.lambert
You're quite right about changing tool numbers, but what I need is to be able to keep track of more tools than there are pockets. For example, if I have a set of 20 different tools, and I want to put 14 of them in the toolchanger, I will also want to be able to retain the tool information for the other 6. Since the tool number and the pocket number both need to be non-negative integers, I want to use the tool number as the identifier for the tool, and the pocket number to find the tool in the changer. That way I can swap pocket numbers when I add or remove tools, but I can keep the tool numbers the same. Thus, my g-code can always use the same T- commands, but the machine uses the pocket number to find the tool.

Please Log in or Create an account to join the conversation.

More
29 Aug 2014 19:20 #50458 by andypugh

I can't find a good way to work with the pocket numbers, instead of the tool numbers (e.g. #<_selected_tool>). I know that the random toolchanger keeps track of pocket numbers, but since this toolchanger doesn't swap tools, it doesn't seem like that implementation would work.


Until version 2.6 there was a long-unnoticed bug in iocontrol.0.tool-prepare-pocket that meant that it always returned the tool number rather than the pocket number for a non-random toolchanger.
This was fixed in git.linuxcnc.org/gitweb?p=linuxcnc.git;a...89072b107882cae36403 but I don't think it improves the behaviour of the get_tool_pocket function that is callable from the Python prologue code in your remap. (though this might be worth trying, as it is the proper way to do it)

So, the solution is probably to turn on G-code access to HAL pins: www.linuxcnc.org/docs/html/remap/structu...d_sub_ini_features_a
[RS274NGC]
FEATURES = 12

Then your O-word sub can use #<_hal[iocontrol.0.tool-prep-pocket]> to access the tool pocket.

Please Log in or Create an account to join the conversation.

Time to create page: 0.104 seconds
Powered by Kunena Forum