Bug in #<_current_pocket>
02 Mar 2017 14:04 - 02 Mar 2017 14:14 #88875
by jtc
Bug in #<_current_pocket> was created by jtc
Using version 2.7.7 and 2.8.0 pre, and trying to implement a non random toolchanger, mostly using .ngc code, I have the need to fetch the current_pocket so that the tool is left on the same pocket before moving to the next pocket.
In MDI mode, if issuing (debug,#<_current_pocket>), the value does not make sense and does not match the tool table.
It seems that the current_pocket is broken. For example a tool defined by:
Tool 1
Pocket 14
Issuing (debug,#<_current_pocket>), after tool 1 is loaded, does not return 14, and this was the value that I was expecting.
I saw other implementations that use the current_tool to get the pocket slot, but in this case, the user is limited to place the tool number X in pocket number X, and this does not make sense to me (for example forum.linuxcnc.org/30-cnc-machines/29694...-and-a-few-questions)
In MDI mode, if issuing (debug,#<_current_pocket>), the value does not make sense and does not match the tool table.
It seems that the current_pocket is broken. For example a tool defined by:
Tool 1
Pocket 14
Issuing (debug,#<_current_pocket>), after tool 1 is loaded, does not return 14, and this was the value that I was expecting.
I saw other implementations that use the current_tool to get the pocket slot, but in this case, the user is limited to place the tool number X in pocket number X, and this does not make sense to me (for example forum.linuxcnc.org/30-cnc-machines/29694...-and-a-few-questions)
Last edit: 02 Mar 2017 14:14 by jtc.
Please Log in or Create an account to join the conversation.
02 Mar 2017 16:38 #88887
by andypugh
Replied by andypugh on topic Bug in #<_current_pocket>
I think that current-pocket actually returns the index of the array element where the code is storing the data for the selected tool number.
It is basically not useful.
It is basically not useful.
Please Log in or Create an account to join the conversation.
02 Mar 2017 16:54 #88888
by jtc
Replied by jtc on topic Bug in #<_current_pocket>
Thank you Andy,
In this case how do I know the pocket of the current tool in spindle, this is, I need to know the place where I should place the current tool, before "browsing" to the next.
In this case how do I know the pocket of the current tool in spindle, this is, I need to know the place where I should place the current tool, before "browsing" to the next.
Please Log in or Create an account to join the conversation.
02 Mar 2017 23:03 #88904
by andypugh
Replied by andypugh on topic Bug in #<_current_pocket>
This was partially fixed in iocontrol some time ago. It looks like they didn't get all of it.
git.linuxcnc.org/gitweb?p=linuxcnc.git;a...89072b107882cae36403
The HAL pin iocontrol.0.tool-prep-pocket shows the "pocket number" from the tool table when you issue a "Tn" command.
This is not elegant, but ought to work.
in the HAL
Then in the G-code:
git.linuxcnc.org/gitweb?p=linuxcnc.git;a...89072b107882cae36403
The HAL pin iocontrol.0.tool-prep-pocket shows the "pocket number" from the tool table when you issue a "Tn" command.
This is not elegant, but ought to work.
in the HAL
net tool-pocket iocontrol.0.tool-prep-pocket => motion.analog-in.00
Then in the G-code:
( issue T command just to set HAL pin. )
T #<_current_tool>
M66 E0 L0
#<actual_pocket> = #5399
( now we have the pocket, set the new tool )
T #<_selected_tool>
...
The following user(s) said Thank You: jtc
Please Log in or Create an account to join the conversation.
03 Mar 2017 20:46 #88953
by jtc
Replied by jtc on topic Bug in #<_current_pocket>
Thank you!
Using this method, and many M66 after, the machine changes tools automatically.
João
Using this method, and many M66 after, the machine changes tools automatically.
João
Please Log in or Create an account to join the conversation.
03 Mar 2017 20:57 #88956
by andypugh
Replied by andypugh on topic Bug in #<_current_pocket>
The developers are looking at this bug too, hopefully there will be a fix eventually.
Please Log in or Create an account to join the conversation.
Time to create page: 0.083 seconds