Problems with tool table and 2.6.0

More
24 Jun 2013 11:01 #35965 by garymcrobertpdx
Problem with tool table and 2.6.0 I have used the remapping for M6 to create
an automated tool change. I have written the routine in G code and it generally
works except for some reason the value #<_selected_pocket> seems to not
correspond to the pocket number value but instead to the order the tools appear
in the tool table.

This is inconvenient is this a problem with the tool table format or some other bug?
Also the tool table editor fails to work most of the time.

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

More
24 Jun 2013 13:45 #35969 by cmorley
I am not very familiar with remap code.
But posting your remap code might help. also what GUI and what tool table editor are you using?
How does the tool table editor fail to work?

Chris M

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

More
24 Jun 2013 18:19 - 24 Jun 2013 20:08 #35976 by ArcEye
Not directly related, but on a similar theme.

cncbasher and I were trying to get a toolchanger component I wrote for his new mill working recently, using 2.6~pre

It kept setting the wrong tool number ( one less than it should be all the time ) and we could not see what could be wrong.

In a flash of inspiration I checked his copy of tool.tbl and found that there was a tool 0 set, which cncbasher was in the habit of using for a reference tool.
The code which reads the tool table obviously just reads the line which should correspond to the entry and not what is in that line.
It was reading line 1 as being tool 1 and so forth, resulting in the tool number reported and whose offsets were used, being one out each time. :side:

There is quite a lot wrong with the tool table and how it is set up and used.
It is being looked at and may even be replaced by a .sql database or similar

regards
Last edit: 24 Jun 2013 20:08 by ArcEye.

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

More
24 Jun 2013 18:50 #35979 by cncbasher

Problem with tool table and 2.6.0 I have used the remapping for M6 to create
an automated tool change. I have written the routine in G code and it generally
works except for some reason the value #<_selected_pocket> seems to not
correspond to the pocket number value but instead to the order the tools appear
in the tool table.

This is inconvenient is this a problem with the tool table format or some other bug?
Also the tool table editor fails to work most of the time.


post your changes and lets take a look ?
have you based on the remap toolchange probing example ?

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

More
24 Jun 2013 22:20 - 25 Jun 2013 02:23 #35992 by garymcrobertpdx
OK first the tool table

T627 P2 Z-0.775709 D0.25 ;end mill
T297 P6 Z-0.085 D0.062 ;DRILL 1/16"
T369 P3 Z1.217 D0.156 ;drill 5/32
T102 P4 Z-0.814 D0.125 ;center drill #2
T101 P5 Z0 D.093 ;center drill #1
T616 P1 Z-0.825 D0.1562 ;end mill

The problem is that the machine seems to disregard the specified pocket number and treats
Tool T627 as if it is in pocket #1 and T297 as if it is pocket #2 and so on.

Here is the change G code it is not elegant or compact partially because I was experiencing
some trouble with using subroutines in this routine (I think I know why now).

Tools are organized into a vertical 4 x 4 rack. Pocket #1 is the upper left pocket #4 is in the
upper right. The spindle B axis rotates CW 90 degrees The mill table positions the tool holder.
M100 and M101 control the air solenoid that retains the cat40 holder. At the moment I have only
coded for eight pockets. (Is there a trick to output G code variables for debugging code?)


(change tools )
O<change> SUB

#<ORIENT_OFFSET_DEGREES>= 20
#<POCKET_PRE_DROP_X> = -7.000
#<POCKET_DROP_X> = -7.969
#<POCKET_PRE_PICK_X> = -7.000
#<POCKET_PICK_X> = -7.969

#<SAFE_POSTION_X> = 0.000
#<SAFE_POSTION_Y> = 0.000
#<SAFE_POSTION_Z> = 0.000
#<SAFE_POSTION_B1> = -90
#<SAFE_POSTION_B2> = 0.000
#<DELAY_00> = 0.500
#<DELAY_01> = 1.500
#<DELAY_02> = 1.500

#<POCKET_01_X> = -0.00 ;G53 Absolute Coordinates
#<POCKET_01_Y> = -4.500
#<POCKET_01_Z> = +2.000
#<POCKET_01_B> = -90.00

#<POCKET_02_X> = [#<POCKET_01_X> + 0.000]
#<POCKET_02_Y> = [#<POCKET_01_Y> + 3.000]
#<POCKET_02_Z> = [#<POCKET_01_Z> + 0.000]
#<POCKET_02_B> = -90.00

#<POCKET_03_X> = [#<POCKET_01_X> + 0.000]
#<POCKET_03_Y> = [#<POCKET_01_Y> + 6.000]
#<POCKET_03_Z> = [#<POCKET_01_Z> + 0.000]
#<POCKET_03_B> = -90.00

#<POCKET_04_X> = [#<POCKET_01_X> + 0.000]
#<POCKET_04_Y> = [#<POCKET_01_Y> + 9.000]
#<POCKET_04_Z> = [#<POCKET_01_Z> + 0.000]
#<POCKET_04_B> = -90.00

#<POCKET_05_X> = [#<POCKET_01_X> + 0.000]
#<POCKET_05_Y> = [#<POCKET_01_Y> + 0.000]
#<POCKET_05_Z> = [#<POCKET_01_Z> - 3.000]
#<POCKET_05_B> = -90.00

#<POCKET_06_X> = [#<POCKET_01_X> + 0.000]
#<POCKET_06_Y> = [#<POCKET_01_Y> + 3.000]
#<POCKET_06_Z> = [#<POCKET_01_Z> - 3.000]
#<POCKET_06_B> = -90.00

#<POCKET_07_X> = [#<POCKET_01_X> + 0.000]
#<POCKET_07_Y> = [#<POCKET_01_Y> + 6.000]
#<POCKET_07_Z> = [#<POCKET_01_Z> - 3.000]
#<POCKET_07_B> = -90.00

#<POCKET_08_X> = [#<POCKET_01_X> + 0.000]
#<POCKET_08_Y> = [#<POCKET_01_Y> + 9.000]
#<POCKET_08_Z> = [#<POCKET_01_Z> - 3.000]
#<POCKET_08_B> = -90.00

#<POCKET_09_X> = [#<POCKET_01_X> + 0.000]
#<POCKET_09_Y> = [#<POCKET_01_Y> + 0.000]
#<POCKET_09_Z> = [#<POCKET_01_Z> - 6.000]
#<POCKET_09_B> = -90.00

#<POCKET_10_X> = [#<POCKET_01_X> + 0.000]
#<POCKET_10_Y> = [#<POCKET_01_Y> + 3.000]
#<POCKET_10_Z> = [#<POCKET_01_Z> - 6.000]
#<POCKET_10_B> = -90.00

#<POCKET_11_X> = [#<POCKET_01_X> + 0.000]
#<POCKET_11_Y> = [#<POCKET_01_Y> + 6.000]
#<POCKET_11_Z> = [#<POCKET_01_Z> - 6.000]
#<POCKET_11_B> = -90.00

#<POCKET_12_X> = [#<POCKET_01_X> + 0.000]
#<POCKET_12_Y> = [#<POCKET_01_Y> + 9.000]
#<POCKET_12_Z> = [#<POCKET_01_Z> - 6.000]
#<POCKET_12_B> = -90.00

#<POCKET_13_X> = [#<POCKET_01_X> + 0.000]
#<POCKET_13_Y> = [#<POCKET_01_Y> + 0.000]
#<POCKET_13_Z> = [#<POCKET_01_Z> - 9.000]
#<POCKET_13_B> = -90.00

#<POCKET_14_X> = [#<POCKET_01_X> + 0.000]
#<POCKET_14_Y> = [#<POCKET_01_Y> + 3.000]
#<POCKET_14_Z> = [#<POCKET_01_Z> - 9.000]
#<POCKET_14_B> = -90.00

#<POCKET_15_X> = [#<POCKET_01_X> + 0.000]
#<POCKET_15_Y> = [#<POCKET_01_Y> + 6.000]
#<POCKET_15_Z> = [#<POCKET_01_Z> - 9.000]
#<POCKET_15_B> = -90.00

#<POCKET_16_X> = [#<POCKET_01_X> + 0.000]
#<POCKET_16_Y> = [#<POCKET_01_Y> + 9.000]
#<POCKET_16_Z> = [#<POCKET_01_Z> - 9.000]
#<POCKET_16_B> = -90.00

#<RETURN_TO_X> = #<_X> ;G53 Absolute Coordinates
#<RETURN_TO_Y> = #<_Y>
#<RETURN_TO_Z> = #<_Z>
#<RETURN_TO_B> = #<_B>

#<_current_pocket_TEMP> = #<_current_pocket> ; copy values in case they change
#<_selected_pocket_TEMP> = #<_selected_pocket>
#<_selected_tool_TEMP> = #<_selected_tool>

O4000 IF[#<_current_pocket_TEMP> NE #<_selected_pocket_TEMP>]


F100
G20
M5
G53 G0 Z#<SAFE_POSTION_Z>
G53 G0 X#<SAFE_POSTION_X> Y#<SAFE_POSTION_Y>
G53 G0 B#<SAFE_POSTION_B1>

O2000 IF [#<_current_pocket_TEMP> EQ 0] ;NO TOOL DO NOTHING
G4 P#<DELAY_00>

(drop the tool)
O2000 ELSEIF [#<_current_pocket_TEMP> EQ 1]
G53 G0 X#<POCKET_01_X> B#<POCKET_01_B>
G53 G0 Z#<POCKET_01_Z> Y#<POCKET_01_Y>
G53 G0 X#<POCKET_PRE_DROP_X>
S00
M3 ;SPINDLE MUST BE ON FOR ORIENT TO WORK
M19 R#<ORIENT_OFFSET_DEGREES>
G4 P#<DELAY_00>
G53 G0 X#<POCKET_DROP_X>
G4 P#<DELAY_01>
M100 ;RELEASE TOOL
G4 P#<DELAY_02>
G53 G0 X#<POCKET_01_X>

O2000 ELSEIF [#<_current_pocket_TEMP> EQ 2]
G53 G0 X#<POCKET_02_X> B#<POCKET_02_B>
G53 G0 Z#<POCKET_02_Z> Y#<POCKET_02_Y>
G53 G0 X#<POCKET_PRE_DROP_X>
S00
M3
M19 R#<ORIENT_OFFSET_DEGREES>
G4 P#<DELAY_00>
G53 G0 X#<POCKET_DROP_X>
G4 P#<DELAY_01>
M100 ;RELEASE TOOL
G4 P#<DELAY_02>
G53 G0 X#<POCKET_02_X>

O2000 ELSEIF [#<_current_pocket_TEMP> EQ 3]
G53 G0 X#<POCKET_03_X> B#<POCKET_03_B>
G53 G0 Z#<POCKET_03_Z> Y#<POCKET_03_Y>
G53 G0 X#<POCKET_PRE_DROP_X>
S00
M3
M19 R#<ORIENT_OFFSET_DEGREES>
G4 P#<DELAY_00>
G53 G0 X#<POCKET_DROP_X>
G4 P#<DELAY_01>
M100 ;RELEASE TOOL
G4 P#<DELAY_02>
G53 G0 X#<POCKET_03_X>

O2000 ELSEIF [#<_current_pocket_TEMP> EQ 4]
G53 G0 X#<POCKET_04_X> B#<POCKET_04_B>
G53 G0 Z#<POCKET_04_Z> Y#<POCKET_04_Y>
G53 G0 X#<POCKET_PRE_DROP_X>
S00
M3
M19 R#<ORIENT_OFFSET_DEGREES>
G4 P#<DELAY_00>
G53 G0 X#<POCKET_DROP_X>
G4 P#<DELAY_01>
M100 ;RELEASE TOOL
G4 P#<DELAY_02>
G53 G0 X#<POCKET_04_X>

O2000 ELSEIF [#<_current_pocket_TEMP> EQ 5]
G53 G0 X#<POCKET_05_X> B#<POCKET_05_B>
G53 G0 Z<POCKET_05_Z> Y#<POCKET_05_Y>
G53 G0 X#<POCKET_PRE_DROP_X>
S00
M3
M19 R#<ORIENT_OFFSET_DEGREES>
G4 P#<DELAY_00>
G53 G0 X#<POCKET_DROP_X>
G4 P#<DELAY_01>
M100 ;RELEASE TOOL
G4 P#<DELAY_02>
G53 G0 X#<POCKET_05_X>

O2000 ELSEIF [#<_current_pocket_TEMP> EQ 6]
G53 G0 X#<POCKET_06_X> B#<POCKET_06_B>
G53 G0 Z#<POCKET_06_Z> Y#<POCKET_06_Y>
G53 G0 X#<POCKET_PRE_DROP_X>
S00
M3
M19 R#<ORIENT_OFFSET_DEGREES>
G4 P#<DELAY_00>
G53 G0 X#<POCKET_DROP_X>
G4 P#<DELAY_01>
M100 ;RELEASE TOOL
G4 P#<DELAY_02>
G53 G0 X#<POCKET_06_X>

O2000 ELSEIF [#<_current_pocket_TEMP> EQ 7]
G53 G0 X#<POCKET_07_X> B#<POCKET_07_B>
G53 G0 Z#<POCKET_07_Z> Y#<POCKET_07_Y>
G53 G0 X#<POCKET_PRE_DROP_X>
S00
M3
M19 R#<ORIENT_OFFSET_DEGREES>
G4 P#<DELAY_00>
G53 G0 X#<POCKET_DROP_X>
G4 P#<DELAY_01>
M100 ;RELEASE TOOL
G4 P#<DELAY_02>
G53 G0 X#<POCKET_07_X>

O2000 ELSEIF [#<_current_pocket_TEMP> EQ 8]
G53 G0 X#<POCKET_08_X> B#<POCKET_08_B>
G53 G0 Z#<POCKET_08_Z> Y#<POCKET_08_Y>
G53 G0 X#<POCKET_PRE_DROP_X>
S00
M3
M19 R#<ORIENT_OFFSET_DEGREES>
G4 P#<DELAY_00>
G53 G0 X#<POCKET_DROP_X>
G4 P#<DELAY_01>
M100 ;RELEASE TOOL
G4 P#<DELAY_02>
G53 G0 X#<POCKET_08_X>

O2000 ENDIF



(pick up a tool)
O3000 IF [#<_selected_pocket_TEMP> EQ 0];NO TOOL DO NOTHING
G4 P#<DELAY_00>

O3000 ELSEIF [#<_selected_pocket_TEMP> EQ 1]
G53 G0 X#<POCKET_01_X> B#<POCKET_01_B>
G53 G0 Z#<POCKET_01_Z> Y#<POCKET_01_Y>
M100 ;READY TO GRAB TOOL
G53 G0 X#<POCKET_PRE_PICK_X>
S00
M3
M19 R#<ORIENT_OFFSET_DEGREES>
G4 P#<DELAY_00>
G53 G0 X#<POCKET_PICK_X>
G4 P#<DELAY_01>
M101 ;GRAB TOOL
G4 P#<DELAY_02>
G53 G0 X#<POCKET_01_X>

O3000 ELSEIF [#<_selected_pocket_TEMP> EQ 2]
G53 G0 X#<POCKET_02_X> B#<POCKET_02_B>
G53 G0 Z#<POCKET_02_Z> Y#<POCKET_02_Y>
M100 ;READY TO GRAB TOOL
G53 G0 X#<POCKET_PRE_PICK_X>
S00
M3
M19 R#<ORIENT_OFFSET_DEGREES>
G4 P#<DELAY_00>
G53 G0 X#<POCKET_PICK_X>
G4 P#<DELAY_01>
M101 ;GRAB TOOL
G4 P#<DELAY_00>
G53 G0 X#<POCKET_02_X>

O3000 ELSEIF [#<_selected_pocket_TEMP> EQ 3]
G53 G0 X#<POCKET_03_X> B#<POCKET_03_B>
G53 G0 Z#<POCKET_03_Z> Y#<POCKET_03_Y>
G53 G0 X#<POCKET_PRE_PICK_X>
S00
M3
M19 R#<ORIENT_OFFSET_DEGREES>
G4 P#<DELAY_00>
G53 G0 X#<POCKET_PICK_X>
G4 P#<DELAY_01>
M101 ;GRAB TOOL
G4 P#<DELAY_02>
G53 G0 X#<POCKET_03_X>

O3000 ELSEIF [#<_selected_pocket_TEMP> EQ 4]
G53 G0 X#<POCKET_04_X> B#<POCKET_04_B>
G53 G0 Z#<POCKET_04_Z> Y#<POCKET_04_Y>
G53 G0 X#<POCKET_PRE_PICK_X>
S00
M3
M19 R#<ORIENT_OFFSET_DEGREES>
G4 P#<DELAY_00>
G53 G0 X#<POCKET_PICK_X>
G4 P#<DELAY_01>
M101 ;GRAB TOOL
G4 P#<DELAY_02>
G53 G0 X#<POCKET_04_X>

O3000 ELSEIF [#<_selected_pocket_TEMP> EQ 5]
G53 G0 X#<POCKET_05_X> B#<POCKET_05_B>
G53 G0 Z#<POCKET_05_Z> Y#<POCKET_05_Y>
G53 G0 X#<POCKET_PRE_PICK_X>
S00
M3
M19 R#<ORIENT_OFFSET_DEGREES>
G4 P#<DELAY_00>
G53 G0 X#<POCKET_PICK_X>
G4 P#<DELAY_01>
M101 ;GRAB TOOL
G4 P#<DELAY_02>
G53 G0 X#<POCKET_05_X>

O3000 ELSEIF [#<_selected_pocket_TEMP> EQ 6]
G53 G0 X#<POCKET_06_X> B#<POCKET_06_B>
G53 G0 Z#<POCKET_06_Z> Y#<POCKET_06_Y>
G53 G0 X#<POCKET_PRE_PICK_X>
S00
M3
M19 R#<ORIENT_OFFSET_DEGREES>
G4 P#<DELAY_00>
G53 G0 X#<POCKET_PICK_X>
G4 P#<DELAY_01>
M101 ;GRAB TOOL
G4 P#<DELAY_02>
G53 G0 X#<POCKET_06_X>

O3000 ELSEIF [#<_selected_pocket_TEMP> EQ 7]
G53 G0 X#<POCKET_07_X> B#<POCKET_07_B>
G53 G0 Z#<POCKET_07_Z> Y#<POCKET_07_Y>
G53 G0 X#<POCKET_PRE_PICK_X>
S00
M3
M19 R#<ORIENT_OFFSET_DEGREES>
G4 P#<DELAY_00>
G53 G0 X#<POCKET_PICK_X>
G4 P#<DELAY_01>
M101 ;GRAB TOOL
G4 P#<DELAY_02>
G53 G0 X#<POCKET_07_X>

O3000 ELSEIF [#<_selected_pocket_TEMP> EQ 8]
G53 G0 X#<POCKET_08_X> B#<POCKET_08_B>
G53 G0 Z#<POCKET_08_Z> Y#<POCKET_08_Y>
G53 G0 X#<POCKET_PRE_PICK_X>
S00
M3
M19 R#<ORIENT_OFFSET_DEGREES>
G4 P#<DELAY_00>
G53 G0 X#<POCKET_PICK_X>
G4 P#<DELAY_01>
M101 ;GRAB TOOL
G4 P#<DELAY_02>
G53 G0 X#<POCKET_08_X>

O3000 ENDIF


G53 G0 X#<SAFE_POSTION_X>
G53 G0 Z#<SAFE_POSTION_Z> Y#<SAFE_POSTION_Y>
G53 G0 B#<SAFE_POSTION_B2>
M5
M6
O4000 ENDIF


;G53 G0 X#<RETURN_TO_X> Y#<RETURN_TO_Y> ;G53 Absolute Coordinates
;G53 G0 Z#<RETURN_TO_Z> B#<RETURN_TO_B>

O<change> ENDSUB [4]

M2
Last edit: 25 Jun 2013 02:23 by garymcrobertpdx.

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

More
24 Jun 2013 22:29 #35993 by andypugh

There is quite a lot wrong with the tool table and how it is set up and used.
It is being looked at and may even be replaced by a .sql database or similar

Comments appreciated:
wiki.linuxcnc.org/cgi-bin/wiki.pl?ToolDatabase

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

More
24 Jun 2013 23:22 #35996 by BigJohnT

There is quite a lot wrong with the tool table and how it is set up and used.
It is being looked at and may even be replaced by a .sql database or similar

Comments appreciated:
wiki.linuxcnc.org/cgi-bin/wiki.pl?ToolDatabase


Very well thought out!

Would the tool editor be written in Python?

JT

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

More
24 Jun 2013 23:30 #36000 by andypugh

Would the tool editor be written in Python?

I imagine so, though I have not got that far yet. I would anticipate the tool editor hiding the underlying structure and presenting a conventional flat table.

it is also likely that the toolchange behavious would be handled by "pluggable" HAL modules. This would look a lot like the current hal_manual_toolchange invocation, but it would respond directly to NML messages, not to HAL pins. There probably needs to be a version that exports HAL pins for Classic Ladder changers.

Then a rack-style changer can get the pocket positions directly from the tool table.

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

More
25 Jun 2013 02:17 #36009 by garymcrobertpdx
So it appears that for the present I must place my tool holders in the rack in the same
order as they appear in the tool table.

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

More
25 Jun 2013 15:05 #36029 by ArcEye

There is quite a lot wrong with the tool table and how it is set up and used.
It is being looked at and may even be replaced by a .sql database or similar

Comments appreciated:
wiki.linuxcnc.org/cgi-bin/wiki.pl?ToolDatabase


Looks good, needs to be comprehensive enough to suit any application, with null fields just being ignored in simple ones.

My thoughts about the spindle / magazine linkage were already voiced on the developers forum regards dual nozzle reprap machines.
So long as the structure is flexible enough to be able to suit every application, a few applications may have to store data in a slightly non-intuitive fashion,
so that the correct data is found where it is expected to be.

Now all you have to do is finish it by the end of July for Seb's deadline :laugh:

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

Time to create page: 0.186 seconds
Powered by Kunena Forum