change tool commend with button

More
1 year 9 months ago #319815 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?

Please Log in to join the conversation.

More
1 year 9 months ago #319834 by Aciera
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

Please Log in to join the conversation.

More
1 year 9 months ago #319879 by rockcnc
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

Please Log in to join the conversation.

More
1 year 9 months ago #319894 by Aciera
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.

Unfortunately, I remapped M6, and in my Python code due to certain reasons, I cannot use mdi mode.

Not sure what that means but in a remap you can add command to the queue like this:

Code:
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 to join the conversation.

More
1 year 9 months ago #319929 by rockcnc
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

Please Log in to join the conversation.

More
1 year 9 months ago #319930 by Aciera
The python interface cannot use self.execute() that has to be done in the remap.

Please Log in to join the conversation.

More
1 year 9 months ago #320061 by rockcnc
So my main problem is when I use "tool touch off" or "touch off" button sometimes randomly it starts tool change process and
Code:
net tool-change-request control. 0.tool-change => hm2_7i96.0.gpio.022.out
this pin supposed to become output when we are doing tool change
But suddenly out of nowhere its stuck and don't do anything
So I came up with the idea of adding
Code:
if (s. task_mode == 2):
At my Tool change remap
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 to join the conversation.

More
1 year 9 months ago #320063 by Aciera

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 to join the conversation.

More
1 year 9 months ago #320070 by rockcnc
i'm using axis

Please Log in to join the conversation.

More
1 year 9 months ago #320083 by Aciera
The 'Touch Off' and 'Tool Touch Off' buttons create an MDI call with an G10 L... command through the python interface. I'm afraid I have no idea how that could randomly start a tool change process in your config. 


 

Attachment not found

Please Log in to join the conversation.

Time to create page: 2.676 seconds
Powered by Kunena Forum