Adding a GO/RUN physical button to run the MDI command typed in the command line

More
9 months 2 days ago - 9 months 2 days ago #342205 by BertaA
Hello,
I'm new to Linuxcnc, I've been studying it for a month and I'm very happy with it. 
I'm retrofitting a Cortini mill (a very small industrial-grade italian cnc mill) and thanks to this forum I could get a Ethercat system working with Beckhoff hardware and I could add a lot of external hardware buttons to my system.
For example I can have a program run, pause physical button in auto mode.
I cannot have a physical button for the go/run mdi command line.
Please note: this has nothing to do with custom MDI macro buttons.
To be clear: I put the system in MDI mode, type  "G0X10" then I must use the mouse to have it run.
The keyboard enter button is not the same becouse if i recall a previous mdi command from the list touching it on a touchscreen (or selecting with the mouse) the Enter key doesn't work.
I could not find a halui connection to this go button.

The goal would be to connect it to the start program physical button that is already  working in auto mode but this could be a further step. It would just be great to connect it to a new physical button.
Is this in any way possible?
I hope to have been clear despite my bad english.
Many thanks
Alberto
 
Last edit: 9 months 2 days ago by BertaA.

Please Log in or Create an account to join the conversation.

More
9 months 2 days ago #342214 by zz912
I would like the same functionality.
I would like the setup page in gmoccapy to toggle the execution of MDI commands either by enter key, double click, button (like now) or by HAL signal.
But I did not have time yet.

This functionality cannot be simply implemented using the HAL pin in HALUI, because the EMC_MDIHistory widget is in Gmoccapy. So a new gmoccapy HAL pin should be created.

EMC_MDIHistory widget is here:
github.com/LinuxCNC/linuxcnc/blob/master...cp/hal_mdihistory.py

The function to confirm the command is here:
github.com/LinuxCNC/linuxcnc/blob/bf71ba...history.py#L151-L200

In gmoccapy.py:
github.com/LinuxCNC/linuxcnc/blob/bf71ba...py/gmoccapy.py#L3444

You can create new HAL pin in Gmoccapy for self.widgets.hal_mdihistory.submit()
linuxcnc.org/docs/devel/html/config/python-hal-interface.html
The following user(s) said Thank You: BertaA

Please Log in or Create an account to join the conversation.

More
8 months 1 week ago - 8 months 1 week ago #343428 by HansU
I don't know what's wrong with your enter button, but normally it should work with the enter button:
 

And so IMHO it does not really make sense to have a hardware button to send MDI commands which you need to type with the keyboard.

How is the behaviour on your machine different from that I have shown?
Last edit: 8 months 1 week ago by HansU.

Please Log in or Create an account to join the conversation.

More
8 months 1 week ago #343440 by zz912

And so IMHO it does not really make sense to have a hardware button to send MDI commands which you need to type with the keyboard.


It makes sense. But the reason is not the one described by BertaA.

My dream is to build a CNC machine, controlled by LinuxCNC, that will meet all the requirements (standards and laws) for a CNC machine that the European Union requires. I think that it is possible to compete with brands like Heidenhain, Siemens, Fanuc ... in a certain category of machines.

When I studied the safety standards for CNC machines, I found a requirement there:
MDI commands or sequence commands must be executable only with a physical button. I think that the standard even described what the button should look like. I don't remember exactly because it's been a long time since I read it.

Therefore, it would not be bad to make a configuration that would ensure the execution of MDI commands only with a HAL signal.

Please Log in or Create an account to join the conversation.

More
8 months 1 week ago - 8 months 1 week ago #343446 by newbynobi
@ZZ912
Implementing the Hal signal for the execute button ist possible like you described. But if you want to forbit the Keyboard Enter Key to submit the MDI command, you need to modify also the MDI History widget to ignore the enter signal. If you do that, I am sure many users will ask you to implement the old behavior again. As it concerns to me, I use the Enter key to submit the MDI commands.

The only possibility I see, is to leave the default as it is and implement a setting parameter to change that behavior.
I am not sure, but if I remeber well, the Heidenhain control does allow the execution of entered commands with the Enter key.

Norbert
Last edit: 8 months 1 week ago by newbynobi. Reason: typos

Please Log in or Create an account to join the conversation.

More
8 months 1 week ago #343447 by zz912
To Norbert:

I agree with you. It MUST be configurable.

Please Log in or Create an account to join the conversation.

Moderators: newbynobi, HansU
Time to create page: 0.064 seconds
Powered by Kunena Forum