I was murdering some aluminum, and noticed on tool change prompt, it said next tool (T15), but the tool number was the current tool not the next one. Or am i seeing this wrong? It should have been T34 is it not?
@iuliancalin for this file when you were running it, what was the tool number that appeared in the console? I think either the tool changer is picking up the wrong number, or the g-code just says tool 15 at this point.
i didn’t look in the console, i will try next time to see what it shows. but it happened again, instead of showing the next tool number, awesome idea btw, it shows the current tool number
i’ve tested today, my first tool was number 21, next tool should be 10, the tool change prompt says i should change over to tool (21) but it should be (10)
here is a copy of the last 50 lines from the console, i can’t see a tool number
down below is my test file if you want to take a look
note: the .nc file is generated using this plugin i installed in fusion
G00 Z15.0 G17 M5 (M6) ok G4 P0.5 ok ok ok ok ok ok ok M5 ok G4 P0.5 ok G91 G21 ok G53 G0 Z-10 ok G53 G0 X-350.39 Y-470.17 ok (Toolchange initiated) ok G91 G21 ok G53 G0 Z-10 ok G53 G0 X-350.39 Y-470.17 ok G53 G0 Z-44.69 ok G38.2 Z-92.31 F150 [PRB:-350.390,-470.170,-63.627:1] ok G0 Z5 ok G38.2 Z-10 F75 [PRB:-350.390,-470.170,-63.630:1] ok G4 P0.3 ok (TLO set: 3.493) ok G0 Z5 ok G90 G21 ok G53 G0 Z-10 ok
this is the console output after the tool change
(Moving back to configured location)
ok
G90 G53 G0 Z-10
ok
G90 G53 G0 X-350.39 Y-470.17
ok
G53 G0 Z-44.69
ok
G91 G21
ok
G38.2 Z-92.31 F150
[PRB:-350.390,-470.170,-61.243:1]
ok
G0 Z5
ok
G38.2 Z-15 F75
[PRB:-350.390,-470.170,-61.236:1]
ok
(Set Z to Tool offset and wait)
ok
G4 P0.3
ok
G21 G10 L20 P0 Z3.493
ok
G0 Z5
ok
G53 G21 G0 Z-10
ok
G21 G91
ok
Looking at your file, I don’t think we’re doing it wrong, I think your postprocessor is.
The g-code standard for M6 commands is that it changes to either the T command on the same line as the M6, or the last T command issued before that M6 if one isn’t on the same line.
Your file issues a T21 early, some movement, then a M5 M6 on one line (with no T command) and the a T10 on a following line.
So what you’re seeing makes sense - the first M6 encountered has no T command on the same line, so it prompts you for the last T command sent (T21). The T10 on the line after the M6 is never reached - tool changing doesn’t look ahead, again reference the standard.
You’d need to have a M6 T21 and a M6 T10 (with the T10 on the same line as the M6) if you want the initial prompt for first tool and a second prompt to change to T10.
i’m not sure if i understand what your saying, if you could show, or modify the gcode maybe i’ll get it
the thing is, what i understand from running the file is, the first tool has already finished then the m5 and m6 is called, this need to happen, after the spindle is stopped the machine is going to the tool setter.
i’ll have to look into this to see what the code should look like
edit: i asked chatgpt to show me an example based on your comment, it showed me the code down below. if this is what you mean i understand now. that means it’s not a bug, i also suspected the processor, therefore this is solved
(Face1)
M6 T21
S6000 M3
G54
… cutting with tool 21 …