- Configuring LinuxCNC
- Advanced Configuration
- Error: Calling a remapped M6 toolchange from a remapped cycle
Error: Calling a remapped M6 toolchange from a remapped cycle
19 Oct 2017 02:27 - 19 Oct 2017 02:31 #100534
by bevins
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.
Replied by bevins on topic Error: Calling a remapped M6 toolchange from a remapped cycle
and track it.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??
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: 19 Oct 2017 02:31 by bevins.
Please Log in or Create an account to join the conversation.
- terans1085
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 38
- Thank you received: 0
20 Oct 2017 14:30 #100582
by terans1085
Replied by terans1085 on topic Error: Calling a remapped M6 toolchange from a remapped cycle
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:
def m6(self):
if self.task==0:
yield INTERP_OK
result = m6_prolog(self)
if result == 1:
print("m6 prolog ready")
yield INTERP_EXECUTE_FINISH
elif result == 2:
print("M6: no change required")
yield INTERP_OK
else:
print("M6: prolog error")
yield INTERP_ERROR
if m6_epilog(self) == 1:
print("m6 epilog ready")
yield INTERP_OK
else:
print("M6: epilog error")
yield INTERP_ERROR
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.....
So far, the only way I could get around the readahead issue mentioned earlier is by using this code:
Warning: Spoiler!
def m6(self):
if self.task==0:
yield INTERP_OK
result = m6_prolog(self)
if result == 1:
print("m6 prolog ready")
yield INTERP_EXECUTE_FINISH
elif result == 2:
print("M6: no change required")
yield INTERP_OK
else:
print("M6: prolog error")
yield INTERP_ERROR
if m6_epilog(self) == 1:
print("m6 epilog ready")
yield INTERP_OK
else:
print("M6: epilog error")
yield INTERP_ERROR
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.
20 Oct 2017 16:22 #100583
by bevins
It loads part 1 only after you manually stop part 2? Thats bizarre behavour. I will check if mine does that.
Did you use the stock epilog and it runs ok using your M6 functions?
Replied by bevins on topic Error: Calling a remapped M6 toolchange from a remapped cycle
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!
def m6(self):
if self.task==0:
yield INTERP_OK
result = m6_prolog(self)
if result == 1:
print("m6 prolog ready")
yield INTERP_EXECUTE_FINISH
elif result == 2:
print("M6: no change required")
yield INTERP_OK
else:
print("M6: prolog error")
yield INTERP_ERROR
if m6_epilog(self) == 1:
print("m6 epilog ready")
yield INTERP_OK
else:
print("M6: epilog error")
yield INTERP_ERROR
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.....
It loads part 1 only after you manually stop part 2? Thats bizarre behavour. I will check if mine does that.
Did you use the stock epilog and it runs ok using your M6 functions?
Please Log in or Create an account to join the conversation.
- terans1085
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 38
- Thank you received: 0
20 Oct 2017 17:25 #100585
by terans1085
Replied by terans1085 on topic Error: Calling a remapped M6 toolchange from a remapped cycle
No I run my epilog, but it is mostly copied from stock.
No, any file loads fine, but if I stop the machine in the middle of a run, it reloads the previously loaded file.
No, any file loads fine, but if I stop the machine in the middle of a run, it reloads the previously loaded file.
Please Log in or Create an account to join the conversation.
- Configuring LinuxCNC
- Advanced Configuration
- Error: Calling a remapped M6 toolchange from a remapped cycle
Time to create page: 0.079 seconds