Tool table in CAM, LinuxCNC & pockets in a non-random tool changer

More
06 May 2019 11:25 #132949 by mydani
Hi all,

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 or Create an account to join the conversation.

More
06 May 2019 15:25 #132969 by bevins
There was last year some work in this area, non-random tool changer. I don't know what was done and how it ended up but with master, it is not dealing with the pockets like I think it should. If you have more tools than pockets you have this issue.
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 or Create an account to join the conversation.

More
06 May 2019 15:36 #132972 by pl7i92
it is comen to get the Tooltable BOTH Sync
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 or Create an account to join the conversation.

More
06 May 2019 17:27 #132977 by mydani
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

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

More
06 May 2019 18:21 - 06 May 2019 18:24 #132985 by bevins

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.
Last edit: 06 May 2019 18:24 by bevins.

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

More
07 May 2019 18:44 #133074 by andypugh
I just checked in 2.7.14 and the iocontrol.0.tool-prep-pocket _does_ give the pocket number from the tool table.

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

More
07 May 2019 18:53 #133078 by mydani
Hello Andy.

Please check the picture attached, plain linuxcnc 2.7.14., running the sim -> axis - > vismach VMC example.

Regards,
Daniel


Attachments:

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

More
07 May 2019 19:21 #133081 by mydani
Answering myself here - looks like a known issue 400issue #400 .

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

More
07 May 2019 19:22 #133082 by bevins
I've never seen anything different in linuxcnc with a non-random toolchanger than tool number equals pocket number.
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 or Create an account to join the conversation.

More
07 May 2019 22:05 #133102 by andypugh
I only checked that biocontrol.0.selected-pocket does the right thing. (I does)

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:
loadrt conv_s32_float
addf conv_s32_float.0 servo-thread
net pocket-s32 iocontrol.0.tool-prep-pocket conv_s32_float.0.in
net pocket-float conv_s32_float.0.out motion.analog-in-00


2) Put an M66 in the remap code to read the pocket number:
M66 E0 L0
#<actual_pocket> = #5399
(DEBUG, #<actual_pocket>)

It's unsatisfactory, but does appear to work.

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

Time to create page: 0.109 seconds
Powered by Kunena Forum