Remap M6 Prolog & Epilog question
- Sziggy_NC
- Offline
- New Member
Less
More
- Posts: 17
- Thank you received: 1
03 Feb 2025 18:37 #320521
by Sziggy_NC
Remap M6 Prolog & Epilog question was created by Sziggy_NC
I am attempting to setup a standard carousel style atc.
In my INI my RS274NGC is as follows:
[RS274NGC]
PARAMETER_FILE = parameters.var
SUBROUTINE_PATH = /home/sabre/linuxcnc/configs/sabre_500_mesa_7i97t/subroutines/
REMAP= M6 modalgroup=6 prolog=change_prolog ngc=Tool_change_sub epilog=change_epilog
Does this mean that I need a file named change_prolog.py and change_epilog.py saved in the subroutines path? (I see the change_prolog & change_epilog sections in the stdglue.py)
Currently I have stdglue.py and tool_change_sub.ngc in the subroutine path and I get pycall(remap.change_prolog)failed on a tool change.
I have been reading the Remap Extending G-Code, and I don't see where or how I should save the prolog and epilog.
In my INI my RS274NGC is as follows:
[RS274NGC]
PARAMETER_FILE = parameters.var
SUBROUTINE_PATH = /home/sabre/linuxcnc/configs/sabre_500_mesa_7i97t/subroutines/
REMAP= M6 modalgroup=6 prolog=change_prolog ngc=Tool_change_sub epilog=change_epilog
Does this mean that I need a file named change_prolog.py and change_epilog.py saved in the subroutines path? (I see the change_prolog & change_epilog sections in the stdglue.py)
Currently I have stdglue.py and tool_change_sub.ngc in the subroutine path and I get pycall(remap.change_prolog)failed on a tool change.
I have been reading the Remap Extending G-Code, and I don't see where or how I should save the prolog and epilog.
Please Log in or Create an account to join the conversation.
- spumco
- Online
- Platinum Member
Less
More
- Posts: 1887
- Thank you received: 758
03 Feb 2025 19:30 - 03 Feb 2025 19:35 #320522
by spumco
Replied by spumco on topic Remap M6 Prolog & Epilog question
Create a subfolder in your config folder named 'python.'
Put remap.py, stdglue.py, and toplevel.py in the new 'python' folder.
An example can be found here:
github.com/LinuxCNC/linuxcnc/tree/master...ython-stdglue/python
The change_prolog & epilog stuff are contained within the stdglue.py file. What the "REMAP=" statement in the INI file is doing is telling LCNC:
And the ngc=Tool_change_sub section is telling LCNC to substitute that file (i.e. do whatever is in the file) for LCNC's built-in behavior.
EDIT-
Forgot to add... you also need a [PYTHON] section in your INI file if you don't already have one. That 'TOPLEVEL=' part tells LCNC where to start looking for everything.
[PYTHON]
PATH_PREPEND = python
TOPLEVEL = /your config folder name here/python/toplevel.py
PATH_APPEND = /your config folder name here/python/
Put remap.py, stdglue.py, and toplevel.py in the new 'python' folder.
An example can be found here:
github.com/LinuxCNC/linuxcnc/tree/master...ython-stdglue/python
The change_prolog & epilog stuff are contained within the stdglue.py file. What the "REMAP=" statement in the INI file is doing is telling LCNC:
- When LCNC sees and "M6"
- Look at toplevel.py and import (use) everything in remap.py
- Look at remap.py (import stdglue.py)
And the ngc=Tool_change_sub section is telling LCNC to substitute that file (i.e. do whatever is in the file) for LCNC's built-in behavior.
EDIT-
Forgot to add... you also need a [PYTHON] section in your INI file if you don't already have one. That 'TOPLEVEL=' part tells LCNC where to start looking for everything.
[PYTHON]
PATH_PREPEND = python
TOPLEVEL = /your config folder name here/python/toplevel.py
PATH_APPEND = /your config folder name here/python/
Last edit: 03 Feb 2025 19:35 by spumco.
The following user(s) said Thank You: Sziggy_NC
Please Log in or Create an account to join the conversation.
- spumco
- Online
- Platinum Member
Less
More
- Posts: 1887
- Thank you received: 758
03 Feb 2025 19:38 #320523
by spumco
Replied by spumco on topic Remap M6 Prolog & Epilog question
User manual section for the python stuff:
linuxcnc.org/docs/devel/html/remap/remap...i_file_configuration
linuxcnc.org/docs/devel/html/remap/remap...i_file_configuration
Please Log in or Create an account to join the conversation.
Time to create page: 0.112 seconds