Gcode preview and remap

More
12 years 5 months ago #47302 by REEEN
Hello,
I'm using a Remap M6 Gcode routine to control my toolchanger, this routine has several if statements.
It works great the changer does what it should perfectly !

But if I start a programm in auto mode, with several toolchanges, the Gcode preview ( I mean the window that shows the next lines in Gcode) will stuck in the first toolchange routine. It does not return to the code when the routine is done, so it is impossible to see what line of code comes next, it just jumps through the remap Hcode sript line by line ...

Is there any way to hide this routines ?

I mean this remap scripts should not be shown in the preview, the interpreter will not follow the if statements at all, so it makes no sense anyway and of course the biggest problem is that it won't leave this script.

I'm using the latest version of gmoccapy.

Thank you all :)


Greets Rene

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

More
12 years 5 months ago #47389 by andypugh
Replied by andypugh on topic Gcode preview and remap
This might actually be specific to Gmoccapy. It might be worth asking in the GUI section.

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

More
12 years 5 months ago #47420 by newbynobi
Replied by newbynobi on topic Gcode preview and remap
Hallo Rene,

Have you tested with gscreen and or axis?

Norbert

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

More
12 years 3 months ago #49163 by orangecat
Replied by orangecat on topic Gcode preview and remap
Exact same problem in tkemc. It appears to be a bug in the underlying LinuxCNC code and cannot be fixed by changing the tcl code. It appears as if there's code that's doing some significant lookahead, as the job tends to be stuck inside the M6 handling subroutine until after the last M6 in the g-code file.

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

More
12 years 3 months ago #49167 by andypugh
Replied by andypugh on topic Gcode preview and remap

REEEN wrote: But if I start a programm in auto mode, with several toolchanges, the Gcode preview ( I mean the window that shows the next lines in Gcode) will stuck in the first toolchange routine. It does not return to the code when the routine is done, so it is impossible to see what line of code comes next, it just jumps through the remap Hcode sript line by line ...


Oddly I have the opposite problem. I make lots of things using pre-defined macros, but the Axis G-code display doesn't know this, and as my code runs through the macros is actually highlights the corresponding line in the "LinuxCNC" splash G-code.

Are you saying that with a remapped M6 the G-code listing changes to show the remapped G-code, then doesn't return to showing the main G-code listing?

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

More
12 years 3 months ago #49176 by orangecat
Replied by orangecat on topic Gcode preview and remap
Yes. It appears as if the program is stuck in the g-code subroutine handling M6, but i do not believe this problem occurs after the last M6 in a g-code file. So for g-code files with one M6 command it works as it should.

emc_program_line is returning the correct line number associated with the main program or current subroutine, however,

emc_program is incorrectly returning the name of the subroutine file instead of the main program (in most cases) after the subroutine handling the remapped M6 has returned.

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

Time to create page: 0.366 seconds
Powered by Kunena Forum