Subroutine that change the tool diameter.

More
13 years 6 months ago #32366 by grandixximo
i made this g code, and i have some disagreement with how the interpreter execute it...
Code:
o111 sub G10 L1 P[#5400] R[#5410/2-#800/2] o111 endsub T1M6 #800 = 10 o111 call #800 = 1 o111 call t0m6 M2

at the end of this gcode the diameter of my tool in my opinion should be smaller of 11 units, actually it only removed one units, because the parameter #5400 did not change when i changed the tool diameter with the G10 L1 , this happens also with G10 L10.
This is a minor issue i can write #800 to be 11 the second time, but still if there was an O-code to update the read only parameters it would be nice.
Another disagreement is if i add G42 movement between one diameter change and the other like here.
Code:
o111 sub G10 L10 P[#5400] R[#5410/2-#800/2] o111 endsub G40 T1M6 G0 X100 Y100 G42 X200 Y200 G1X300 Y200 F2000 G40 #800 = 10 o111 call G0 X100 Y100 G42 X200 Y200 G1X300 Y200 F2000 G40 #800 = 1 o111 call T0M6 M2

here comes the funny part, the graphical preview shows me two different trajectory when i load this, but when i play it, it goes twice on the same trajectory as if the diameter didn't change, this happens with both G10 L1 and G10 L10.
if i add a tool change in the middle just after calling the subroutine, the preview will show a single line, but when i play it i got two lines, and also the diameter will be changed 11 units instead of only one.
So placing a tool change in middle of this g code fixes it, but it's really time wasting since normally i have my spindle running at high speed and i have to stop it and run it again for the tool change to happen.
Any thoughts on why this happen exactly and is there a better solution to refresh tools, other than tool changing?

---
test signature

Please Log in to join the conversation.

More
13 years 6 months ago #32382 by grandixximo
sorry, i updated from 2.5.0 to 2.5.2 and it's working now, you can close this :)

I did have some changes in my 2.5.0, but i re downloaded the source and it presents the same problem, so this was indeed fixed from 2.5.0 to 2.5.2

---
test signature

Please Log in to join the conversation.

Time to create page: 3.386 seconds
Powered by Kunena Forum