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

More
08 May 2019 13:46 #133138 by bevins
Another issue with non-random toolchanger is if you have more tools than pockets, for example: 3 pockets 6 tools, the tool table pocket field is unique in that you cannot have two pocket numbers the same. So if you have tool 4 in pocket 4 tool 5 in pocket 5 and if you want to use one of them you have to change pocket in tool table before your tool changer will work. The tool table pocket field should not be unique. Multiple tools with same pocket is a valid scenario.

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

More
08 May 2019 13:59 - 08 May 2019 14:03 #133141 by mydani
I have to say I disagree.
  • My tool changer needs to put the tool in the same pocket again from which it was loaded (!random)
  • My tool changer has 9 pocket, ID 1 to 9, which I fill manually with tools, tool IDs between 1 and 50
  • Therefore a pocket btw. 1-9 shall only be used once in the tool table, because physically there cannot be 2 tools in 1 pocket
  • Exception for me: pocket 0 means not in the tool changer at all.

Example:
Tool 17 was in pocket 3 and actually loaded in spindle.
Tool 5 is in pocket 9.
M6 T5 is called.

Algo is like this:
--> search t17 in tool table, get pocket no 3
--> tool changer is moved to pocket 3
--> tool 17 is unloaded
--> search T5 in tool table, get pocket no 9
--> tool changer is moved to pocket 9
--> tool 5 is loaded
Last edit: 08 May 2019 14:03 by mydani.

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

More
08 May 2019 14:14 #133143 by bevins

I have to say I disagree.
  • My tool changer needs to put the tool in the same pocket again from which it was loaded (!random)
  • My tool changer has 9 pocket, ID 1 to 9, which I fill manually with tools, tool IDs between 1 and 50
  • Therefore a pocket btw. 1-9 shall only be used once in the tool table, because physically there cannot be 2 tools in 1 pocket
  • Exception for me: pocket 0 means not in the tool changer at all.

Example:
Tool 17 was in pocket 3 and actually loaded in spindle.
Tool 5 is in pocket 9.
M6 T5 is called.

Algo is like this:
--> search t17 in tool table, get pocket no 3
--> tool changer is moved to pocket 3
--> tool 17 is unloaded
--> search T5 in tool table, get pocket no 9
--> tool changer is moved to pocket 9
--> tool 5 is loaded


That is a random toolchanger. Pockets in random toolchanger and non-random toolchanger are handled differently.

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

More
08 May 2019 15:54 - 08 May 2019 15:54 #133160 by mydani
This is what the documentation says :

"RANDOM_TOOLCHANGER = 1 - This is for machines that cannot place the tool back into the pocket it came from. For example, machines that exchange the tool in the active pocket with the tool in the spindle."

My tool changer can and must place the tool back into the pocket it came from.

So I think I am right by saying, as per this documentation, I do not have a random toolchanger.
Last edit: 08 May 2019 15:54 by mydani.

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

More
08 May 2019 17:30 #133174 by bevins

This is what the documentation says :

"RANDOM_TOOLCHANGER = 1 - This is for machines that cannot place the tool back into the pocket it came from. For example, machines that exchange the tool in the active pocket with the tool in the spindle."

My tool changer can and must place the tool back into the pocket it came from.

So I think I am right by saying, as per this documentation, I do not have a random toolchanger.


Yeah that's a non-random. I misunderstood your explanation.

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

More
08 May 2019 17:43 #133176 by bevins

I have to say I disagree.
  • My tool changer needs to put the tool in the same pocket again from which it was loaded (!random)
  • My tool changer has 9 pocket, ID 1 to 9, which I fill manually with tools, tool IDs between 1 and 50
  • Therefore a pocket btw. 1-9 shall only be used once in the tool table, because physically there cannot be 2 tools in 1 pocket
  • Exception for me: pocket 0 means not in the tool changer at all.

Example:
Tool 17 was in pocket 3 and actually loaded in spindle.
Tool 5 is in pocket 9.
M6 T5 is called.

Algo is like this:
--> search t17 in tool table, get pocket no 3
--> tool changer is moved to pocket 3
--> tool 17 is unloaded
--> search T5 in tool table, get pocket no 9
--> tool changer is moved to pocket 9
--> tool 5 is loaded


So your manually changing the pockets in the tool table when you add a tool that does not have a pocket that equals the tool number.
I don't see any other way around it. Thats why if you could have same pocket #'s for different tools, then you could handle that in the remap code and only have to just swap out tools out of the magazine and not have to deal wioth the tool table. Thats all I was saying.

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

More
09 May 2019 17:41 #133258 by andypugh
One way round the more-tools-than-pockets thing is to do something clever with the pocket numbers in your tool changer HAL or remap.

If you have 4 tools that you put in pocket 5, then put them in the tool table in pockets 5, 15, 25.
Then, simply pass T-number MOD 10 to whatever drives the tool changer logic.

Though I agree that neither tool number or pocket number should have to be unique. (though most databases need some unique key, so even the database schema I came up with had such an identifier:
wiki.linuxcnc.org/cgi-bin/wiki.pl?ToolDatabase

In that case you would switch tool "sets" by changing the active "magazine"

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

More
09 May 2019 17:46 #133260 by mydani
I understand the workarounds, but those are still workarounds with some caveats. I guess u know this. :)

Guess the uniqueness thing is a matter of taste - coming from some decades of development, a tool and a pocket is a physically existing unique thing, and therefore - imho - should be represented only once also within the SW. I understand that the experiences or limitations of the current implementation leads to the wish to have it otherwise.

I will stick my nose in the code some more and change the interpreter accordingly...

Cheers
Daniel

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

More
09 May 2019 18:21 #133265 by bevins

One way round the more-tools-than-pockets thing is to do something clever with the pocket numbers in your tool changer HAL or remap.

If you have 4 tools that you put in pocket 5, then put them in the tool table in pockets 5, 15, 25.
Then, simply pass T-number MOD 10 to whatever drives the tool changer logic.

Though I agree that neither tool number or pocket number should have to be unique. (though most databases need some unique key, so even the database schema I came up with had such an identifier:
wiki.linuxcnc.org/cgi-bin/wiki.pl?ToolDatabase

In that case you would switch tool "sets" by changing the active "magazine"


Is your DB interface working? Can I query it, write to a record and read a field within python during a remap?

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

More
09 May 2019 18:38 #133270 by andypugh

Is your DB interface working? Can I query it, write to a record and read a field within python during a remap?


In a word, "No"

I didn't manage to persuade anyoen else to even try the experimental branch, so it has been fallow for several years.

github.com/LinuxCNC/linuxcnc/commits/andypugh/tooltable

Look for commits around July 2013 for the files that were changed.

Looking back at it I think that there might be a sample config, but not a lot of docs. (any, in fact)

That version attempts to have a user-editable python interface interacting with a usr-defined tool database.
I don't think any of the samples there actually use the proposed schema.

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

Time to create page: 0.434 seconds
Powered by Kunena Forum