How to Implement T1M6 and T2M6 for Dual Z-Axis in LinuxCNC
- pd_2832
- Offline
- New Member
-
Less
More
- Posts: 8
- Thank you received: 0
31 Jan 2025 09:21 - 31 Jan 2025 09:25 #320216
by pd_2832
How to Implement T1M6 and T2M6 for Dual Z-Axis in LinuxCNC was created by pd_2832
I'm working on a multihead CNC machine with a dual Z-axis configuration. My goal is to use T1M6 to activate Z1 and T2M6 to activate Z2. I've tried implementing Python remapping, but I'm encountering the following error:
AttributeError: module 'linuxcnc' has no attribute 'remap_command'
Here’s what I’ve tried so far:
1. Created a Python remap script (tool_remap.py).
2. Updated my INI file to include the Python remap.
3. Tested NGC subroutines as an alternative.
My current setup:
- LinuxCNC version: 2.9.3
- INI file configuration: [paste INI file]
- Python script: [paste Python script]
- Error logs: [paste error logs]
Could someone please help me resolve this issue? Thank you!
AttributeError: module 'linuxcnc' has no attribute 'remap_command'
Here’s what I’ve tried so far:
1. Created a Python remap script (tool_remap.py).
2. Updated my INI file to include the Python remap.
3. Tested NGC subroutines as an alternative.
My current setup:
- LinuxCNC version: 2.9.3
- INI file configuration: [paste INI file]
- Python script: [paste Python script]
- Error logs: [paste error logs]
Could someone please help me resolve this issue? Thank you!
Last edit: 31 Jan 2025 09:25 by pd_2832.
Please Log in or Create an account to join the conversation.
- Aciera
-
- Offline
- Administrator
-
Less
More
- Posts: 4264
- Thank you received: 1882
31 Jan 2025 09:56 #320218
by Aciera
Replied by Aciera on topic How to Implement T1M6 and T2M6 for Dual Z-Axis in LinuxCNC
Please attach ini file and error log.
All I can see at the moment is:
Here you were confusing python remaps with the python interface.
All I can see at the moment is:
# def tool_remap(self, **words):
# command = linuxcnc.command()
# stat = linuxcnc.stat()
# stat.poll()
Here you were confusing python remaps with the python interface.
The following user(s) said Thank You: pd_2832
Please Log in or Create an account to join the conversation.
- pd_2832
- Offline
- New Member
-
Less
More
- Posts: 8
- Thank you received: 0
31 Jan 2025 10:55 - 31 Jan 2025 11:40 #320223
by pd_2832
Replied by pd_2832 on topic How to Implement T1M6 and T2M6 for Dual Z-Axis in LinuxCNC
I am using the remap_subs feature in LinuxCNC to control the Z-axis activation for multiple Z axis. Currently, I have implemeted below things:
M428 activates the Z1 axis.
M429 activates the Z2 axis.
However, my goal is to have the activation as mentioned below:
When executing T1 M6, the Z1 axis should be active.
When executing T2 M6, the Z2 axis should be active.
How can I modify the remap logic to achieve this behavior?
Here in gcode file there is T1M6 for Z1 axis instead M428 and T2M6 for Z2 instead of M429.
If i use M428 and M429 in gcode file on the place of T1M6 and T2M6 all things work perfectly but I dont want to change my gcode file how to implement above thing?
M428 activates the Z1 axis.
M429 activates the Z2 axis.
However, my goal is to have the activation as mentioned below:
When executing T1 M6, the Z1 axis should be active.
When executing T2 M6, the Z2 axis should be active.
How can I modify the remap logic to achieve this behavior?
Here in gcode file there is T1M6 for Z1 axis instead M428 and T2M6 for Z2 instead of M429.
If i use M428 and M429 in gcode file on the place of T1M6 and T2M6 all things work perfectly but I dont want to change my gcode file how to implement above thing?
Last edit: 31 Jan 2025 11:40 by pd_2832.
Please Log in or Create an account to join the conversation.
- Aciera
-
- Offline
- Administrator
-
Less
More
- Posts: 4264
- Thank you received: 1882
31 Jan 2025 14:31 - 31 Jan 2025 14:33 #320231
by Aciera
Replied by Aciera on topic How to Implement T1M6 and T2M6 for Dual Z-Axis in LinuxCNC
You might want to try a simple ngc remap like this first:
Save this as 'm6remap.ngc' in your './remap_subs' folder
Add this to the [RS274NGC] section of your ini file:
Save this as 'm6remap.ngc' in your './remap_subs' folder
o<m6remap>sub
M66 E0 L0 ;force synch
;(debug, tool: #<_selected_tool>)
o1 if [#<_selected_tool> EQ 1]
(print, Tool 1 - Switching to Z1)
M428
o1 elseif [#<_selected_tool> EQ 2]
(print, Tool 2 - Switching to Z2)
M429
o1 else
(print,Unknown tool: #<_selected_tool>)
o1 endif
o<m6remap>endsub
Add this to the [RS274NGC] section of your ini file:
REMAP = M6 modalgroup=6 ngc=m6remap
Last edit: 31 Jan 2025 14:33 by Aciera.
The following user(s) said Thank You: pd_2832, Charlie
Please Log in or Create an account to join the conversation.
- pd_2832
- Offline
- New Member
-
Less
More
- Posts: 8
- Thank you received: 0
03 Feb 2025 05:52 #320470
by pd_2832
Replied by pd_2832 on topic How to Implement T1M6 and T2M6 for Dual Z-Axis in LinuxCNC
Hello,
Thanks for your suggestion, as its working properly, I am able to run both Z axis perfectly.
Thanks for your suggestion, as its working properly, I am able to run both Z axis perfectly.
Please Log in or Create an account to join the conversation.
Time to create page: 0.230 seconds