Gmoccapy Toollength sensor routine stops sometimes

More
1 year 11 months ago #315379 by pe8art
Dear All.

I use Gmoccapy for my CNC-Router.
I use the macro below to measure my tool height.  
Switching between tools it for some tools stops in the middle of traveling to the probe.
For others it doesn't, does anyone have an idea?

Best regards from The Netherlands. 
Bart
Code:
o<messen> sub #1700=2        (Wechsel X Position) #1701=4        (Wechsel Y Position) #1702=-10        (Wechsel Z Position) #1800=-220        (Position sicheres Z) #1801=38         (Position Taster X) #1802=110        (Position Taster Y) #1900=#<_coord_system>    (NP merken nur G54 bis G59) o500 if [#<_current_tool> EQ #<_selected_tool>] ;(debug, Tool bereits in der Spindel) o500 else  M5 G54 G90 G0      G53 Z#1702                    (Wechsel Z Position) G53 X#1700 Y#1701        (Wechsel XY Position) M6 T#<_selected_tool> G53 X#1801 Y#1802       (Taster Position) G53 Z#1800                (Sichere Z Position) G43.1 Z0                (TLO reset) G91 G38.2 Z-60  F500        (messen grob) G1    Z1.0  F500        (frei fahren)     G38.2 Z-10  F25         (messen fein) #2000=[#5063+#5223]     (Tastpunkt+NP Verschiebung) #2001=[#2000-#2002+#2003](Neu - diff + alt)   #2002=[#2000]           (Tastpunkt alt merken) #2003=[#2001]            (Offset alt merken)      G1 Z5.0 F500            (frei fahren) G90 G0 G43.1 Z#2001            (TLO set) G53 Z#1800         (Sichere Z Position) G53 Z#1702            (Wechsel Z Position) ;(debug, Differenz ist: #2001) (NP wiederhestellen nur G54 bis G59)     o100 if[#1900 EQ 540] G54 o100 endif o101 if[#1900 EQ 550] G55 o101 endif o102 if[#1900 EQ 560] G56 o102 endif o103 if[#1900 EQ 570] G57 o103 endif o104 if[#1900 EQ 580] G58 o104 endif o500 endif o<messen> endsub M2
 

Please Log in to join the conversation.

More
1 year 11 months ago #315405 by Aciera

stops in the middle of traveling to the probe.

Which move do you mean?
- XY move (G53 X#1801 Y#1802 )
- Z move (G53 Z#1800 )
- the actual probing move (G38.2 Z-60 F500 )

Please Log in to join the conversation.

More
1 year 11 months ago #315409 by pe8art
It stops doing this move.

- XY move (G53 X#1801 Y#1802 )

Please Log in to join the conversation.

More
1 year 11 months ago #315446 by Aciera
For testing try inserting a queue buster command to halt the read ahead until the move is finished:


Code:
G53 Z#1702 (Wechsel Z Position) G53 X#1700 Y#1701 (Wechsel XY Position) M66 E0 L0 (Stop read-ahead and wait for code execution to catch up) M6 T#<_selected_tool>
 

Also try and start your config from terminal (note the minux+letter'L') and check for messages when the routine fails.
Code:
linuxcnc -l

Please Log in to join the conversation.

More
1 year 11 months ago #315453 by pe8art
I tried the command but no different effect.

The Terminal spits out " 3 2 " every time regardless if it stops in the move or not.
It seems to be stopping at a specific sequence from tool to tool.
Some of the work ok some don't.
I have tried changing diameter of the tool for to no avail.

Please Log in to join the conversation.

More
1 year 11 months ago #315474 by Aciera
Not sure what's going on but you might want to insert some debugging statements:
Code:
M66 E0 L0 (Stop read-ahead and wait for code execution to catch up) (DEBUG, 1702: #1702) G53 Z#1702 (Wechsel Z Position) M66 E0 L0 (Stop read-ahead and wait for code execution to catch up) (DEBUG, 1700: #1700 1701: #1701 ) G53 X#1700 Y#1701 (Wechsel XY Position) M66 E0 L0 (Stop read-ahead and wait for code execution to catch up) M6 T#<_selected_tool>

Also make sure you don't have X or Y offsets in your tool table.

Please Log in to join the conversation.

More
1 year 11 months ago #315486 by pe8art
I included the debug in the file ( and added some more to see where its stops. )
It seems to stop between :
M6 T#<_selected_tool>
And
G53 X#1801 Y#1802       (Taster Position)


https://www.dropbox.com/scl/fi/e0e86m3nybph5brtqs0gq/debug.png?rlkey=nxuc87agn0ob35qfrmbiw368k&st=20z6b974&dl=0
[img
 

Attachment not found



Tools look like this:
T1 P1 X0.0 Y0.0 Z0.0 A0.0 B0.0 C0.0 U0.0 V0.0 W0.0 D1.0 I0.0 J0.0 Q0 ;1 MM 
T2 P2 X0.0 Y0.0 Z0.0 A0.0 B0.0 C0.0 U0.0 V0.0 W0.0 D20.0 I0.0 J0.0 Q0 ;2mm 


 

Please Log in to join the conversation.

More
1 year 11 months ago #315518 by Aciera
Oh, apologies I was looking at the wrong move.

Maybe try this:
Code:
G53 X#1700 Y#1701 (Wechsel XY Position) M6 T#<_selected_tool> M66 E0 L0 (Stop read-ahead and wait for code execution to catch up) (DEBUG, 1801: #1801 1802: #1802 ) G53 X#1801 Y#1802 (Taster Position) G53 Z#1800 (Sichere Z Position) M66 E0 L0 (Stop read-ahead and wait for code execution to catch up)

Please Log in to join the conversation.

More
1 year 11 months ago #315558 by pe8art
I have included your code and added some extra debug comments.Consistently it stop changing from tool 1 to 2.  
The code I added is:
Code:
M6 T#<_selected_tool> (DEBUG, M6: #<_selected_tool> ) M66 E0 L0 (Stop read-ahead and wait for code execution to catch up) (DEBUG, 1801: #1801 1802: #1802 ) G53 X#1801 Y#1802       (Taster Position) (DEBUG, before Z#1800) G53 Z#1800                (Sichere Z Position) M66 E0 L0 (Stop read-ahead and wait for code execution to catch up) (DEBUG,Before G43) G43.1 Z0                (TLO reset) (DEBUG, before G91) G91 (DEBUG, before G38.2) G38.2 Z-60  F500        (messen grob)

 

Attachment not found

Please Log in to join the conversation.

More
1 year 11 months ago #315565 by Aciera
Only other thing I can think of is to add 'G0' to those 'G53' lines.

Please Log in to join the conversation.

Time to create page: 0.067 seconds
Powered by Kunena Forum