- Posts: 100
- Thank you received: 0
Tool table in CAM, LinuxCNC & pockets in a non-random tool changer
my idea how to setup CAM flow is as follows:
Master for my tool table is in my CAM which maintains tool no, speeds/feeds, etc.
Same table I set up in LinuxCNC, which contains the tool specific offsets, etc.
From the generated .NC-file, I can manually read the required tools and put them into the 9 pockets of my changer, updating the tool table accordingly. E.g. putting tool 17 in pocket 1, tool 24 in pocket 2, etc.
The toolchanger control (remapped M6) would then check the pocket of the requested tool, if it is a pocket >0 it will be loaded into spindle, if not it would complain with some error message "operator did not load tools properly".
So far so good - BUT now I read in the developers manual that for a non-random tool changer, the pockets are not used as in the tool table but renumbered (or better compacted, I guess to have gap-less numbers). I fear that my idea of the tool workflow is therefore obsolete.
What hints / experiences can you guys give me?
Thanks!
Regards,
Daniel
Please Log in to join the conversation.
You can certainly deal with this in the remap. That's what I do. I think it is using pocket=tool# logic.
I deal with this and set it myself in the remap, and funny enough, once the Change_tool flag is set to true, glue sends the pocket back to linuxcnc. So I don't understand the logic, so I deal with in remap code.
Your scenario will work if you code it in the remap.
Please Log in to join the conversation.
you will have Cutters Drills in standard pockets no matter what size
Example on a 12ATC
tool 1 is the Zero Tool
up to 6 are mill bits
7-10 are Drills
11 12 are Specials
if you got more drills as we all most have
only tol 2,3,4 are mill bits
and in sync with the CAM
as the length is from G43
and diameter only matters at RPM speed
it is up to work area as you may got tools outside to manuell input
or Your CAm gots a list of all in the Chain and reload a spare tooltable by editing ini
Please Log in to join the conversation.
The thing is, my g-code might contain tool 6, 17, 22 for example.
In the linuxcnc tool table they are also 6,17,22.
I have them in the pockets 1, 2 and 3 of my changer.
So I of course have to load the offsets of the tool 6, 17, 22.
But where do I get the mapping of tool to pocket if not from the tool table? Do I need to write my own tool table handler reading some file format for this?
Did you handle sth. like this already?
Regards,
Daniel
Please Log in to join the conversation.
mydani wrote: Do you use some python code to search in the tool table for a specific tool pocket? Or how do you store the info which tool is in which pocket, if it is not reliable in the tool table?
The thing is, my g-code might contain tool 6, 17, 22 for example.
In the linuxcnc tool table they are also 6,17,22.
I have them in the pockets 1, 2 and 3 of my changer.
So I of course have to load the offsets of the tool 6, 17, 22.
But where do I get the mapping of tool to pocket if not from the tool table? Do I need to write my own tool table handler reading some file format for this?
Did you handle sth. like this already?
Regards,
Daniel
Offsets are by tool# not tool pocket.
If you have tool 6 in toolchanger pocket# 3, and you use G43 on tool 6, then it will lookup tool# and use that offset.
I have 3 rack toolchanger. I figured out this issue after I wrote the toolchanger code for my machine. So I use only tools 1,2 or 3. However, you can change the code to use tools 1,2,3 in pockets 1,2,3, and tools 4,5,6 in pocket 4,5,6 in the tool table and so on, but in the remap code tools 1,2,3 are in pockets 1,2,3 and tools 4,5,6 are in pockets 1,2,3. So if you want to use tool#4 then you have to put it in pocket 1 and you cant use tool 1 in the same program. In the remap code you select depending on selected_tool, you know which pocket it is in. That's the way I have mine done with my remap code. I also have three spindles and 43 drills, so depending on what is the "selected_tool" I get from linuxcnc (TxM6), then I can perform the change pertaining to that tool, wether it is change it for the selected_tool or drop drill bit etc....
I also use free pocket to determine which tool is in spindle, you can do the same but for more tools than just 1 in this case.
Here is my remap code
I haven't decided if I will change my code to enable many tools or keep just the three and change within my CAM program.
Please Log in to join the conversation.
Please Log in to join the conversation.
Please check the picture attached, plain linuxcnc 2.7.14., running the sim -> axis - > vismach VMC example.
Regards,
Daniel
Attachment not found
Please Log in to join the conversation.
Please Log in to join the conversation.
The docs says the pocket number in a non-random toolchanger are meaningless, but it should say you cant put tool# 1 in any other pocket except 1, unless you deal with it yourself in a remap.
Just my thoughts.
Please Log in to join the conversation.
It seems that there is a problem with the Python interface that stdglue.py uses.
As you have noted, there is a fix "in the works" but to yet committed.
I have found an inelegant workaround that works without code changes.
1) Connect the iocontrol pocket HAL pin to motion,analog-in-XX, though a type conversion:
2) Put an M66 in the remap code to read the pocket number:
It's unsatisfactory, but does appear to work.
Please Log in to join the conversation.
