change tool commend with button
- rockcnc
- Offline
- New Member
-
- Posts: 16
- Thank you received: 0
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?
Please Log in or Create an account to join the conversation.
- Aciera
-
- Offline
- Administrator
-
- Posts: 4205
- Thank you received: 1848
forum.linuxcnc.org/qtvcp/54583-call-cust...om-gui-button#315402
Please Log in or Create an account to join the conversation.
- rockcnc
- Offline
- New Member
-
- Posts: 16
- Thank you received: 0
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
Please Log in or Create an account to join the conversation.
- Aciera
-
- Offline
- Administrator
-
- Posts: 4205
- Thank you received: 1848
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
Please Log in or Create an account to join the conversation.
- rockcnc
- Offline
- New Member
-
- Posts: 16
- Thank you received: 0
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
-
- Posts: 4205
- Thank you received: 1848
Please Log in or Create an account to join the conversation.
- rockcnc
- Offline
- New Member
-
- Posts: 16
- Thank you received: 0
net tool-change-request control. 0.tool-change => hm2_7i96.0.gpio.022.out
But suddenly out of nowhere its stuck and don't do anything
So I came up with the idea of adding
if (s. task_mode == 2):
this solution fixes my problem but I no longer can use MDI and its mean I only can do tool change when its running a G-code in auto mode.
What do you suggest?
Do you know why this happened or how to solve it? I tried to create a tab and put some button
and execute tool change commands but as you said it's impossible
Please Log in or Create an account to join the conversation.
- Aciera
-
- Offline
- Administrator
-
- Posts: 4205
- Thank you received: 1848
So my main problem is when I use "tool touch off" or "touch off" button sometimes randomly it starts tool change process
That sounds pretty crazy, I've never heard of anything like this. What GUI are you using?
I think I would want to find the reason for that before doing anything else.
Please Log in or Create an account to join the conversation.
- rockcnc
- Offline
- New Member
-
- Posts: 16
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- Aciera
-
- Offline
- Administrator
-
- Posts: 4205
- Thank you received: 1848
Attachments:
Please Log in or Create an account to join the conversation.