gladeVCP Hal widgets: how to connect hal pins ?
01 Mar 2020 22:36 - 01 Mar 2020 22:38 #158918
by geertd
gladeVCP Hal widgets: how to connect hal pins ? was created by geertd
I am trying to add some radiobuttons and led indicators to Gmoccapy.
So far, I designed how they should look with glade, modified my .ini file to make them appear between the cooling and spindle boxes which looks OK:
Starting Gmoccapy shows the buttons as expected and in the correct location:
Opening halshow shows the correct component (vaccool) as well as the corresponding pins as available:
But as soon as I want to use those pins in my custom_postgui.hal file:
I get the following error when starting linuxcnc:
Am I missing something fundamental here ?
Geert
So far, I designed how they should look with glade, modified my .ini file to make them appear between the cooling and spindle boxes which looks OK:
Starting Gmoccapy shows the buttons as expected and in the correct location:
Opening halshow shows the correct component (vaccool) as well as the corresponding pins as available:
But as soon as I want to use those pins in my custom_postgui.hal file:
I get the following error when starting linuxcnc:
Am I missing something fundamental here ?
Geert
Last edit: 01 Mar 2020 22:38 by geertd.
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 5008
- Thank you received: 1441
02 Mar 2020 04:11 #158936
by Todd Zuercher
Replied by Todd Zuercher on topic gladeVCP Hal widgets: how to connect hal pins ?
I'm not sure about this, but it is possible that the underscores in your pin names are causing a problem. Can you try to rename what the hal pins your gui is creating are called to get rid of them.
The following user(s) said Thank You: geertd
Please Log in or Create an account to join the conversation.
02 Mar 2020 06:23 #158940
by cmorley
Replied by cmorley on topic gladeVCP Hal widgets: how to connect hal pins ?
You must connect HAL pins for the custom gladevcp in a separate file by using the -H option in gladevcp.
linuxcnc.org/docs/2.7/html/gui/gladevcp....command_line_options
in that file connect the widgets pins to signals only
then in any other file you can connect those signals to what ever other pins you like.
In this way the it doesn't matter on the timing of the availability of the pins.
Chris
linuxcnc.org/docs/2.7/html/gui/gladevcp....command_line_options
in that file connect the widgets pins to signals only
then in any other file you can connect those signals to what ever other pins you like.
In this way the it doesn't matter on the timing of the availability of the pins.
Chris
Please Log in or Create an account to join the conversation.
02 Mar 2020 06:25 #158941
by rodw
x 2 I think your choice of pin names with an underscore is illegal so Hal rejects them. I say this because: If you write a component and compile it with halcompile, pin names containing an underscore in the component are converted to have a hyphen in hal (which is expected behaviour)
Replied by rodw on topic gladeVCP Hal widgets: how to connect hal pins ?
I'm not sure about this, but it is possible that the underscores in your pin names are causing a problem. Can you try to rename what the hal pins your gui is creating are called to get rid of them.
x 2 I think your choice of pin names with an underscore is illegal so Hal rejects them. I say this because: If you write a component and compile it with halcompile, pin names containing an underscore in the component are converted to have a hyphen in hal (which is expected behaviour)
Please Log in or Create an account to join the conversation.
02 Mar 2020 06:26 #158943
by cmorley
Replied by cmorley on topic gladeVCP Hal widgets: how to connect hal pins ?
Pin names can have underscores - that's a limitation imposed by the comp system.
Please Log in or Create an account to join the conversation.
02 Mar 2020 06:35 #158944
by rodw
So long since I've ventured into this stuff but could there be a disconnect in the python screen handler?
Replied by rodw on topic gladeVCP Hal widgets: how to connect hal pins ?
Pin names can have underscores - that's a limitation imposed by the comp system.
So long since I've ventured into this stuff but could there be a disconnect in the python screen handler?
Please Log in or Create an account to join the conversation.
02 Mar 2020 06:45 #158945
by cmorley
The comp limitation is because of legal c names IIRC, I imagine it was easier to just add the limitation.
Geerd's problem is a race condition - caused by how gladevcp is loaded without waiting for the pins to be ready.
Chris
Replied by cmorley on topic gladeVCP Hal widgets: how to connect hal pins ?
Rod - i'm not sure if you are talking about the comp limitation or the problem he is having.
Pin names can have underscores - that's a limitation imposed by the comp system.
So long since I've ventured into this stuff but could there be a disconnect in the python screen handler?
The comp limitation is because of legal c names IIRC, I imagine it was easier to just add the limitation.
Geerd's problem is a race condition - caused by how gladevcp is loaded without waiting for the pins to be ready.
Chris
The following user(s) said Thank You: rodw
Please Log in or Create an account to join the conversation.
02 Mar 2020 06:46 #158947
by cmorley
Replied by cmorley on topic gladeVCP Hal widgets: how to connect hal pins ?
Or at least I'm 90% sure it's the problem
The following user(s) said Thank You: geertd
Please Log in or Create an account to join the conversation.
02 Mar 2020 08:40 #158952
by geertd
Replied by geertd on topic gladeVCP Hal widgets: how to connect hal pins ?
Removing the underscores did not change anything.
Cmorley's reply however seems to be the correct one. My gladevcp hal-radiobuttons now work as expected.
Thanks !
Cmorley's reply however seems to be the correct one. My gladevcp hal-radiobuttons now work as expected.
Thanks !
Please Log in or Create an account to join the conversation.
Moderators: HansU
Time to create page: 0.220 seconds