issues with iocontol and M6 remap in python

More
16 Mar 2019 15:42 - 16 Mar 2019 15:51 #128744 by bevins


Maybe change that to
import emccanon
so that you have access to all the canonical commands.


Thank you, Thank you, Thank you,

The emccanon.CHANGE_TOOL went through.

I thought for sure the emccanon message was enough cause thats all its doing is sending the message. apparently not.

Anyway, I have to test to make sure things are ok.

The only way I could get it to work is put the epilog inside the remap body. Otherwise it wouldnt work. Now I can do some testing to get it outside the remap body.

Anyway, big step forward. Thanks....

Why would it not error out? It erorrs when I sneeze......
Last edit: 16 Mar 2019 15:51 by bevins.

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

More
16 Mar 2019 17:54 - 16 Mar 2019 17:55 #128758 by bevins
Yeah I see. Needed access to the emccanon commands. Still doesnt explain why it doesnt spit an error.

But I am happy for now. Offsets are working with the 33 drills, and 3 spindles and the TLO.
Last edit: 16 Mar 2019 17:55 by bevins.

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

More
16 Mar 2019 21:17 - 16 Mar 2019 21:19 #128775 by bevins
LESSONS LEARNED: github.com/bobbevins/Linuxcnc_python_remap_M6

The docs really need a section for remap in pure python. It is different than NGC remap. If you follow the NGC remap it wont work in pure python.

I had to remove all yield and INTERP_EXECUTE_FINISH statements because it doesn't work in python remap from what I have found. I don't know why and I know what the docs says but it just doesn't work. It is working without and this remap is pretty intense. As far as I can tell the interpreter is acting correctly with the queuebusters and not yielding. When you start to nest functions, the interpreter has an issue with that. I limited my code to one deep and it is working. IF you delve further you may run into issues.

The standard glue is bizare in pure python remap. I am not calling it anywhere, but the file has to be in the python path. If I remove the stdglue.py file linuxcnc complains that the plugin cant run. I dont use it and I am not using it in the remap statement in the ini file.
Probably has something to do with installing python plugin. This is what you need if you want it to work. REMAP=M6 modalgroup=6 python=M6_Remap_BiesseRover346 . I probably should change the modalgroup though to 10.

You can put a change_prolog1 def and run the function within the remap body and that works. I did have the change_prolog working at one point from standard glue but I removed it. If you try change_epilog you will see it wont run. the only way to get it to work is to run the three commands in the remap body at the end of the remap. WITHOUT the INTERP_EXECUTE_FINISH and it works.

There are some issues with running three python functions in sequence a outside the body of a remap. This was documented back in 2014 in devel forums.

I would love to do more tests and play with this a bit but this is a production machine so I wont mess with it much more. Cleanup the code a bit. Hope this helps someone a bit.
Last edit: 16 Mar 2019 21:19 by bevins.

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

Time to create page: 0.072 seconds
Powered by Kunena Forum