Tool change .ngc brakes the ability to use "run from here"

More
18 Mar 2017 08:16 - 18 Mar 2017 10:19 #89847 by emcPT
emcPT created the topic: Tool change .ngc brakes the ability to use "run from here"
Using the latest stable version, and after so much time in setting a tool change of a umbrella type changer in a vertical mill, all implemented with a sub routine with a lot of "if" "endif", linuxcnc now does not have the ability of using "run from here".
When I try to use it, strangely, all the tool changes before the line that I choose to "run from here" are executed (toolchange is simply executed without any actually machining).
I also notice that although I am executing the "main program", in normal machining, the name of the program that appears on the window name is the tool change file, in my case "change.ngc"

There is any "best practice" for implement a tool change with a sub routine? Or a sub routine should be avoided?
We choose to use a sub routine because we got the need to issue G0 G1 and it looked the best way to go.



Thank you
Last Edit: 18 Mar 2017 10:19 by emcPT.
More
20 Mar 2017 13:05 #89940 by andypugh
andypugh replied the topic: Tool change .ngc brakes the ability to use "run from here"

emcPT wrote: When I try to use it, strangely, all the tool changes before the line that I choose to "run from here" are executed (toolchange is simply executed without any actually machining).


You might need to exit the tool-change routine if the system on the basis of:
#<_task> - 1.0 if the executing interpreter instance is part of milltask, 0.0 otherwise. Sometimes it is necessary to treat this case specially to retain proper preview, for instance when testing the success of a probe (G38.x) by inspecting #5070, which will always fail in the preview interpreter (e.g. Axis).

Can you (debug, #<_task> and see if that gives different values in the two cases?
More
20 Mar 2017 17:52 #89958 by jtc
jtc replied the topic: Tool change .ngc brakes the ability to use "run from here"
Hi.

In both cases, running the program from start or using "run from here" the #<_task> variable is always 1.
More
20 Mar 2017 18:57 #89960 by andypugh
andypugh replied the topic: Tool change .ngc brakes the ability to use "run from here"

jtc wrote: In both cases, running the program from start or using "run from here" the #<_task> variable is always 1.


There goes that idea, then. Sorry.

Which LinuxCNC version? We can see if it is a new problem, or a solved problem, or neither.
More
22 Mar 2017 14:40 #90071 by jtc
jtc replied the topic: Tool change .ngc brakes the ability to use "run from here"
It's 2.7.8
More
22 Mar 2017 18:30 #90083 by andypugh
andypugh replied the topic: Tool change .ngc brakes the ability to use "run from here"
The following user(s) said Thank You: jtc
Time to create page: 0.122 seconds
Powered by Kunena Forum