M6 remap in pure python lessons learned

More
18 Nov 2021 01:34 #226818 by cmorley

Another big one that's not documented is that in a pure python remap it cannot run three python scripts in a row. It just wont do it no matter how hard you try.

So, prolog => toolchange => epilog WILL NOT WORK PERIOD...... you put the prolog and epilog in your remap file like in my code and it processes the commands no problem. The way I got it to work is the prolog function is called within the remap and after the toolchange the epilog is built into the end of the remap. This is the only way I could get it to work properly.
 

I can't find it in the docs at the moment but I am sure that prolog and epilog are for NGC based remaps only.
In a pure Python remap you do as you did - code it all in one file.
 

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

More
18 Nov 2021 10:54 #226852 by bevins
In the  Remap Extending Gcode  it references stndglue a few times. Once in Section 9 and once in section 9.3. It is very misleading as this is the python sections and you cant use std glue the normal way it was explained in earlier section of the docs. This should be stated in the docs. Otherwise it's a bit misleading and guys are getting stuck there. I've seen it time and time again.

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

More
18 Nov 2021 13:11 #226860 by cmorley
Sorry - I don't follow how what I said has anything to do with standardglue?

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

More
18 Nov 2021 14:39 #226871 by bevins

Sorry - I don't follow how what I said has anything to do with standardglue?

Sorry, I assumed we were discussing remapping M6 and the change_prolog and change_epilog is used most of the time in this situation which is in standardglue. 

Sorry I misinterpreted your response.

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

More
19 Nov 2021 08:31 #226961 by cmorley
I am discussing m6 remap.
NGC based remaps include python code with - change_prolog and change_epilog entries.

Python only remapping does not.

You can infer the info from here:
linuxcnc.org/docs/devel/html/remap/remap..._the_remap_statement
and here:
linuxcnc.org/docs/devel/html/remap/remap..._option_combinations

Chris

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

More
30 Nov 2021 14:00 #228010 by bazhenov4job
Hi everyone.
Thanks for your replies.
As Bob said the decision is in source files.
My remap now is almost completely consists of calling emccanon functions with poor g-code usage.
I also found a working way to stop interpreter execution using yield expression in python. We also found a way to continue interpreter execution.
The only problem now we have is to move to ender gauge continiously until it becomes corresponding state, like a g38 but in emccanon.
Show you code later.

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

More
01 Dec 2021 06:14 #228095 by bazhenov4job
BTW 
all operations described in prolog and epiloge sections are homed in pure python routine. Hence former two are unnecessary

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

More
17 Dec 2021 12:22 #229286 by bazhenov4job
described all investigation result in separate topic

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

Time to create page: 0.093 seconds
Powered by Kunena Forum