Launching gladevcp panel with gmoccapy

More
5 months 3 weeks ago #346243 by HansU
Several errors.

1. A typo. You wrote "EMBED_TAB_HAME = CROSSHAIR" instead of "EMBED_TAB_NAME = CROSSHAIR". Unfortunately you don't get an error because the interpreter just thinks "this value is not for me".
2. you need to define where the VCP should be shown like Aciera mentioned, e.g. 
Code:
EMBED_TAB_LOCATION = ntb_preview

Then you get a meaningful error message
Code:
gtk-builder-error-quark: crosshair-panel.ui:12:34 Invalid property: HAL_Table.n-rows (11)

This points out that you used an old glade editor. Saving it with a up-to-date Glade 3 editor (3.40 e.g.) removes this and other obsolete properties.

Then the VCP is displayed:

 

Further you have a handler "on-changed" defined in your glade (ui) file, but no python file where this handler is defined
Code:
AttributeError: Handler on-changed not found
 
The following user(s) said Thank You: besriworld

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

More
5 months 2 weeks ago #346347 by scsmith1451
Thanks for the information HansU, I'll update my glade and fix the errors.

The GMOCCAPY documentation indicates that if no EMBED_LOCATION is defined, the the glade VCP will be floating. Is that no longer valid?

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

More
5 months 2 weeks ago #346467 by HansU

The GMOCCAPY documentation indicates that if no EMBED_LOCATION is defined, the the glade VCP will be floating. Is that no longer valid?

AFAIK this was never supported. Where do you have this info from? I can't find such in the current Gmoccapy documentation.

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

More
5 months 1 week ago #346535 by scsmith1451
I misspoke. The documentation indicates that if the gladevcp is launched without specifying -x {pid} the panel would be floating. I interpreted that as EMBED_LOCATION was not required. Subsequent testing determined that even if the panel is floating, EMBED_LOCATION must still be defined for the panel to launch correctl.

Fixing the my misspelling of EMBED_TAB_NAME, fixed the launch issue. However, I am now struggling with connecting up the panel to HAL.

During the first investigation I discovered that GMOCCAPY does not toggle the motion.machine-is-on signal as with AXIS. A bit of probing with halmeter I was able to determine that halui.machine-is-on is toggled by GMOCCAPY when the machine is on. I edited my crosshair_panel.hal file to use the halui.machine-is-on, but the panel did no respond.

I've done a bit more testing and discovered that halmeter sees the glade pins as expected, however, halscope does not. Therefore, attempting to manually connect the pins via halscope results in a Pin 'xxx' does not exist error.

At this point I'm lost as to why halscope does not see the panel pins and therefore cannot connect them properly.

Any help would be appreciated.

Currently running:

LinuxCNC 2.9.4
GMOCCAPY 3.4.9
Glade 3.40.0

I've attached all relevant files.

I've attached all of the relevant

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

More
5 months 1 week ago #346538 by Aciera
As indicated in the 'Pins' list:
The correct pin name is
Code:
crosshair_panel.crosshair-toggle-led

not just
Code:
crosshair-toggle-led

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

More
5 months 1 week ago #346539 by scsmith1451
This is why we have code reviews. I frequently cannot see the forest for the trees.

Thank you!

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

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