- User Interfaces
- GladeVCP
- Button on Linuxcnc interface that switches an output on Mesa 7i76e on and off
Button on Linuxcnc interface that switches an output on Mesa 7i76e on and off
- DerKlotz
- Away
- Junior Member
-
Less
More
- Posts: 29
- Thank you received: 2
10 Oct 2025 15:05 - 10 Oct 2025 15:06 #336197
by DerKlotz
Button on Linuxcnc interface that switches an output on Mesa 7i76e on and off was created 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
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
Last edit: 10 Oct 2025 15:06 by DerKlotz.
Please Log in or Create an account to join the conversation.
- Aciera
-
- Offline
- Administrator
-
Less
More
- Posts: 4523
- Thank you received: 2014
10 Oct 2025 15:12 - 10 Oct 2025 15:15 #336198
by Aciera
Replied by Aciera on topic Button on Linuxcnc interface that switches an output on Mesa 7i76e on and off
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
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.
- DerKlotz
- Away
- Junior Member
-
Less
More
- Posts: 29
- Thank you received: 2
10 Oct 2025 16:58 #336200
by DerKlotz
Replied by DerKlotz on topic Button on Linuxcnc interface that switches an output on Mesa 7i76e on and off
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?
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?
Please Log in or Create an account to join the conversation.
- Aciera
-
- Offline
- Administrator
-
Less
More
- Posts: 4523
- Thank you received: 2014
10 Oct 2025 17:25 #336203
by Aciera
Replied by Aciera on topic Button on Linuxcnc interface that switches an output on Mesa 7i76e on and off
That does not work because you have forgotten to give a signal name after the 'net' command.
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.
Not sure I understand this correctly but halshow does not make any distinction between postgui and regular hal files.I entered the command in postgui. This does not start linuxcnc. Do I have the correct command from Halshow for postgui.hal?
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.
- Aciera
-
- Offline
- Administrator
-
Less
More
- Posts: 4523
- Thank you received: 2014
10 Oct 2025 17:26 #336204
by Aciera
Replied by Aciera on topic Button on Linuxcnc interface that switches an output on Mesa 7i76e on and off
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.
- DerKlotz
- Away
- Junior Member
-
Less
More
- Posts: 29
- Thank you received: 2
10 Oct 2025 18:50 #336211
by DerKlotz
Replied by DerKlotz on topic Button on Linuxcnc interface that switches an output on Mesa 7i76e on and off
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
-
- Offline
- Moderator
-
Less
More
- Posts: 19619
- Thank you received: 4526
10 Oct 2025 20:03 #336221
by andypugh
Replied by andypugh on topic Button on Linuxcnc interface that switches an output on Mesa 7i76e on and off
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)
(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.
- Aciera
-
- Offline
- Administrator
-
Less
More
- Posts: 4523
- Thank you received: 2014
11 Oct 2025 07:29 #336265
by Aciera
Replied by Aciera on topic Button on Linuxcnc interface that switches an output on Mesa 7i76e on and off
You don't need a handler for what you want.
Here is an example that creates a led connected to 'halui.machine.is-on' and a button connected to 'halui.machine.on'
Here is an example that creates a led connected to 'halui.machine.is-on' and a button connected to 'halui.machine.on'
Attachments:
Please Log in or Create an account to join the conversation.
- DerKlotz
- Away
- Junior Member
-
Less
More
- Posts: 29
- Thank you received: 2
11 Oct 2025 14:15 - 11 Oct 2025 14:59 #336279
by DerKlotz
Replied by DerKlotz on topic Button on Linuxcnc interface that switches an output on Mesa 7i76e on and off
When i start linuxcnc with just setp gladevcp.table1" in the postgui i receive this error message
Any ideas how to fix it?
I found this github.com/LinuxCNC/linuxcnc/blob/2.9/configs/sim/hitcounter.py
I created a file hitcounter.py in /home/cnc/linuxcnc/configs/Fräse/ with the contend from the link
A little different error
Starting DISPLAY program: axis
module 'hitcounter' skipped - import error: No module named 'hitcounter'
71303171
['halcmd', 'loadusr', '-Wn', 'gladevcp', 'gladevcp', '-c', 'gladevcp', '-d', '-x', '79691919', '-u', './hitcounter.py', '/home/cnc/linuxcnc/configs/Fräse/test.glade']
Shutting down and cleaning up LinuxCNC...
Running HAL shutdown script
Any ideas how to fix it?
I found this github.com/LinuxCNC/linuxcnc/blob/2.9/configs/sim/hitcounter.py
I created a file hitcounter.py in /home/cnc/linuxcnc/configs/Fräse/ with the contend from the link
A little different error
Starting DISPLAY program: axis
77594627
['halcmd', 'loadusr', '-Wn', 'gladevcp', 'gladevcp', '-c', 'gladevcp', '-d', '-x', '75497615', '-u', './hitcounter.py', '/home/cnc/linuxcnc/configs/Fräse/test.glade']
Shutting down and cleaning up LinuxCNC...
Last edit: 11 Oct 2025 14:59 by DerKlotz.
Please Log in or Create an account to join the conversation.
- Aciera
-
- Offline
- Administrator
-
Less
More
- Posts: 4523
- Thank you received: 2014
12 Oct 2025 01:30 #336306
by Aciera
Replied by Aciera on topic Button on Linuxcnc interface that switches an output on Mesa 7i76e on and off
I'm sorry, I forgot the ini file part:
[DISPLAY] section:
[HAL]
[DISPLAY] section:
GLADEVCP = example.ui
[HAL]
POSTGUI_HALFILE = example_postgui.hal
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
Moderators: HansU
- User Interfaces
- GladeVCP
- Button on Linuxcnc interface that switches an output on Mesa 7i76e on and off
Time to create page: 0.134 seconds