Button on Linuxcnc interface that switches an output on Mesa 7i76e on and off

More
10 Oct 2025 15:05 - 10 Oct 2025 15:06 #336197 by DerKlotz
Hello,
I would like to have a header on my Linuxcnc interface that switches Pin17=hm2_7i76e.0.7i76.0.0.output-00 on and off on my Mesa7i76e. So far, I have created an LED and a button in Glade. This already appears on the Linuxcnc interface, but no control content is stored. How do I proceed? I tried to do some preliminary work on the Glade page, but failed. What do I need to do and where?
Thank you
Attachments:
Last edit: 10 Oct 2025 15:06 by DerKlotz.

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

More
10 Oct 2025 15:12 - 10 Oct 2025 15:15 #336198 by Aciera
You'll need to make the hal connections in the postgui_hal file. Have a look at the millturn sim confi, (uses an xml instead of a glade file but the setup is the same.
github.com/LinuxCNC/linuxcnc/tree/master...xis/vismach/millturn
Last edit: 10 Oct 2025 15:15 by Aciera.

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

More
10 Oct 2025 16:58 #336200 by DerKlotz
I only became a Glade user today... so I don't have any experience yet. Please take a look at the attachments. I have the following questions:
Do I have to enter something in Glade -> Light Button -> Signals -> Handler? Do I enter this handler in postgui?
I entered the command in postgui. This does not start linuxcnc. Do I have the correct command from Halshow for postgui.hal?
Attachments:

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

More
10 Oct 2025 17:25 #336203 by Aciera
That does not work because you have forgotten to give a signal name after the 'net' command.

I entered the command in postgui. This does not start linuxcnc. Do I have the correct command from Halshow for postgui.hal?

Not sure I understand this correctly but halshow does not make any distinction between postgui and regular hal files.
The regular hal files are read before the gui has loaded so if any gui related halpins are used in these files you will get a startup error because those pins are missing. The postgui halfile is read after the GUi and the custom panels have loaded.

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

More
10 Oct 2025 17:26 #336204 by Aciera
Note that you can use either a handler or the postgui halfile to make the connections.

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

More
10 Oct 2025 18:50 #336211 by DerKlotz
Can you help me understand how Glade and Handler work? I've already created the switch and the LED. How do I now connect them so that pin 17 switches on and off? I'm completly stuck.

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

  • andypugh
  • andypugh's Avatar
  • Away
  • Moderator
  • Moderator
More
10 Oct 2025 20:03 #336221 by andypugh
If your Glade UI element is of type "Hal button" then the HAL pin will be created automatically and no handler file is needed.

(This is stated with 93% confidence, I don't have easy access to a LinuxCNC machine at the moment to test this assertion)

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

Moderators: HansU
Time to create page: 0.072 seconds
Powered by Kunena Forum