Error: Calling a remapped M6 toolchange from a remapped cycle

More
9 years 3 weeks ago #100134 by terans1085
So what I have done as an interim (possibly permanent) solution is, nest functions rather than remaps.

def m6(self):
if m6func(self) == 1: return INTERP_OK

def m6func(self):
**all m6 code, returning a 1 rather than an INTERP_OK**

Calling m6func(self) directly from the G81.5 remap went well so far. Also I have been reading some of Bevins' threads about his remap. I have not been able to grasp the concept of "yield INTERP_EXECUTE_FINISH", did not notice any difference so far.

Would it be rude if I ask you to have a look at your actual M6 remap python code? as I could not find on the posts.

Thanks a lot for your time!! :)

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

More
9 years 3 weeks ago #100168 by bevins

terans1085 wrote: So what I have done as an interim (possibly permanent) solution is, nest functions rather than remaps.

def m6(self):
if m6func(self) == 1: return INTERP_OK

def m6func(self):
**all m6 code, returning a 1 rather than an INTERP_OK**

Calling m6func(self) directly from the G81.5 remap went well so far. Also I have been reading some of Bevins' threads about his remap. I have not been able to grasp the concept of "yield INTERP_EXECUTE_FINISH", did not notice any difference so far.

Would it be rude if I ask you to have a look at your actual M6 remap python code? as I could not find on the posts.

Thanks a lot for your time!! :)


I posted it in another posr last week i think, but i,ll post it here when i get to the shop tonight.

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

More
9 years 3 weeks ago #100184 by bevins
my remap file. I have an xml class in there, so just blow by that.

I had to change the py extension to .hal so the forum would take it.
The following user(s) said Thank You: terans1085

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

More
9 years 2 weeks ago #100516 by terans1085
I have been going through your code, and noticed you use yield INTERP_EXECUTE_FINISH inside function queuebuster(), but never make any call to that. And when I did call, didn't work in my case.

**Might be moving on to something different here, dunno if I should open a new thread....**

I have finally managed to get my remapped M6 somewhat working, BUT, when a gcode file with multiple toolchanges is run, readahead is setting global variables and parameters (from my epilog) way before the next toolchange happens. So if the program is stopped at any point, the machine thinks that the "next" tool is loaded.

Using yield INTERP_EXECUTE_FINISH directly in my remapped m6() produced erratic results, like having linuxcnc open axis.ngc (default).

Any ideas about a workaround??

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

More
9 years 1 week ago - 9 years 1 week ago #100534 by bevins

terans1085 wrote: I have been going through your code, and noticed you use yield INTERP_EXECUTE_FINISH inside function queuebuster(), but never make any call to that. And when I did call, didn't work in my case.

**Might be moving on to something different here, dunno if I should open a new thread....**

I have finally managed to get my remapped M6 somewhat working, BUT, when a gcode file with multiple toolchanges is run, readahead is setting global variables and parameters (from my epilog) way before the next toolchange happens. So if the program is stopped at any point, the machine thinks that the "next" tool is loaded.

Using yield INTERP_EXECUTE_FINISH directly in my remapped m6() produced erratic results, like having linuxcnc open axis.ngc (default). one.

Any ideas about a workaround??

and track it.

I put it there so I could call it easy. I since removed al instances of it but left the function there. I amt not completely done yet, and I dont think that is the latest one. I will pull the one off my machine. I just moved and its very hectic getting all the machines up. Plus a few more retrofits in the door.

The problem is the epilog, the way I had to do it, but it does not work properly this way I agree. Did you use it like mine was or left the change_epilog as original, cause I could never get it to process it as it is, as the documentation states buried down within.
Last edit: 9 years 1 week ago by bevins.

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

More
9 years 1 week ago #100582 by terans1085
I used it similar to you, as it also occurred to me that REMAP does not call the epilog when used with a pure python remap.

So far, the only way I could get around the readahead issue mentioned earlier is by using this code:

Warning: Spoiler!


This forces sync before each epilog, and I'm somewhat happy. However this also causes a curious "bug" in such a chain of events:

- I open part1.nc in axis
- I open part2.nc in axis
- I run part2.nc
- I manually stop part2.nc
- part1.nc is loaded back automatically. Titlebar shows part1.nc. Preview still shows part2.ngc
- Manually pressing CTRL-R or reload icon reloads part2.nc

So i'm wondering, if it is possible to come up with an "abort" script that reloads the proper gcode file.....

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

Time to create page: 0.232 seconds
Powered by Kunena Forum