Prevent interpreter/planner from executing user remap until...

More
1 year 5 months ago #328864 by 1911ut
I have a couple of user defined remaps that do read and insert timestamps  to a SQL database.
The problem is the interpreter  executes these M-codes before the action is actually performed.
Is there a way to tell the interpreter to only execute these when they actually happen?
The remaps are python routines, hoping that a flag can be set.
Tried setting the remap modalgroup to no avail.

I have 6 machines that can make use of this.
Any help appreciated.

 

Please Log in to join the conversation.

More
1 year 5 months ago #328868 by Aciera
you can use

Code:
yield INTERP_EXECUTE_FINISH


NOTE: No 'self.execute(..)' command can be used after this.

 

Attachment not found



linuxcnc.org/docs/html/remap/remap.html

 

Please Log in to join the conversation.

More
1 year 5 months ago #328869 by 1911ut
Thanks that worked perfectly

I was using the following which does not work for my purposes.

    if self.task == 0: # ignore the preview interpreter
        yield INTERP_EXECUTE_FINISH

After removing (if self.task == 0: ), it works.

 

Please Log in to join the conversation.

Time to create page: 0.077 seconds
Powered by Kunena Forum