change tool commend with button
- rockcnc
- Offline
- New Member
Less
More
- Posts: 13
- Thank you received: 0
25 Jan 2025 13:00 - 25 Jan 2025 13:01 #319815
by rockcnc
change tool commend with button was created by rockcnc
Hi everyone
I need some help with ATC.
I used remap m6 Python and need some button to change the tool (M6 TX).
I can't use MDI for some reason
Do you have any thoughts on this?
I need some help with ATC.
I used remap m6 Python and need some button to change the tool (M6 TX).
I can't use MDI for some reason
Do you have any thoughts on this?
Last edit: 25 Jan 2025 13:01 by rockcnc.
Please Log in or Create an account to join the conversation.
- Aciera
- Offline
- Administrator
Less
More
- Posts: 4052
- Thank you received: 1749
25 Jan 2025 18:05 #319834
by Aciera
Replied by Aciera on topic change tool commend with button
Have a look at mdi_command as in this example (instead of 'net coolant-flood => halui.mdi-command-00' you would connect it to the button hal pin):
forum.linuxcnc.org/qtvcp/54583-call-cust...om-gui-button#315402
forum.linuxcnc.org/qtvcp/54583-call-cust...om-gui-button#315402
The following user(s) said Thank You: Unlogic
Please Log in or Create an account to join the conversation.
- rockcnc
- Offline
- New Member
Less
More
- Posts: 13
- Thank you received: 0
26 Jan 2025 11:28 - 26 Jan 2025 11:31 #319879
by rockcnc
Replied by rockcnc on topic change tool commend with button
Unfortunately, I remapped M6, and in my Python code due to certain reasons, I cannot use mdi mode.
I mean this code you suggest is good for giving mdi code. I need to do it in auto mode.
When I open and run a G code, it works perfectly fine, so I need this button to execute a line of G code in auto mode
I mean this code you suggest is good for giving mdi code. I need to do it in auto mode.
When I open and run a G code, it works perfectly fine, so I need this button to execute a line of G code in auto mode
Last edit: 26 Jan 2025 11:31 by rockcnc.
Please Log in or Create an account to join the conversation.
- Aciera
- Offline
- Administrator
Less
More
- Posts: 4052
- Thank you received: 1749
26 Jan 2025 16:32 - 26 Jan 2025 16:41 #319894
by Aciera
Replied by Aciera on topic change tool commend with button
I'm sorry but I don't understand why and when you would need to push a button during a programmed tool change.
Usually a tool change in gcode defines the T word (eg T3 M6) and your python remap would then handle the ATC tool change.
[edit]
Are you maybe confusing python remaps with the python interface?
linuxcnc.org/docs/html/remap/remap.html
linuxcnc.org/docs/html/config/python-interface.html
Usually a tool change in gcode defines the T word (eg T3 M6) and your python remap would then handle the ATC tool change.
Not sure what that means but in a remap you can add command to the queue like this:Unfortunately, I remapped M6, and in my Python code due to certain reasons, I cannot use mdi mode.
self.execute( 'your command here')
[edit]
Are you maybe confusing python remaps with the python interface?
linuxcnc.org/docs/html/remap/remap.html
linuxcnc.org/docs/html/config/python-interface.html
Last edit: 26 Jan 2025 16:41 by Aciera.
Please Log in or Create an account to join the conversation.
- rockcnc
- Offline
- New Member
Less
More
- Posts: 13
- Thank you received: 0
27 Jan 2025 05:35 #319929
by rockcnc
Replied by rockcnc on topic change tool commend with button
I have used self-execute command in my Python remap.
now I need to use it in my python interface ui
but it seems to be incorrect
now I need to use it in my python interface ui
but it seems to be incorrect
Please Log in or Create an account to join the conversation.
- Aciera
- Offline
- Administrator
Less
More
- Posts: 4052
- Thank you received: 1749
27 Jan 2025 06:26 #319930
by Aciera
Replied by Aciera on topic change tool commend with button
The python interface cannot use self.execute() that has to be done in the remap.
Please Log in or Create an account to join the conversation.
Time to create page: 0.071 seconds