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

More
21 May 2025 15:28 #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 or Create an account to join the conversation.

More
21 May 2025 17:54 - 21 May 2025 17:57 #328868 by Aciera
you can use

yield INTERP_EXECUTE_FINISH


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

 

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

 
Attachments:
Last edit: 21 May 2025 17:57 by Aciera.

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

More
21 May 2025 19:00 #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 or Create an account to join the conversation.

Time to create page: 0.078 seconds
Powered by Kunena Forum