Launching gladevcp panel with gmoccapy

More
6 months 1 week ago #345745 by scsmith1451
I'm struggling to launch a gladevcp panel from my gmoccapy interface. I've queried the web for examples and feel that I'm on the right track, but without success.  I'm open to any suggestions.

I've attached my .ini file along with my gladevcp.ui and custom_postgui.hal for reference.

FYI - I have a laser crosshair that I use to locate the program start for a project. The laser can be toggled by either the gladevcp panel or via a toggle switch on the machine. I've wired up the machine such that either source will set an input pin high to turn on the panel LED. If the laser is toggled via the machine toggle, I want a visual indicator to remind me to turn it off manually.
Once I get the panel to display and the led to toggle properly, I may split the input to I get a visual indicating which source toggled the LED, but for now I just want to get the panel up and working. There is no custom python handler needed at this time.

Please Log in to join the conversation.

More
6 months 1 week ago #345755 by grandixximo
EMBED_TAB_LOCATION = ntb_preview
or
EMBED_TAB_LOCATION = ntb_user_tabs

Did you try these?

---
test signature

Please Log in to join the conversation.

More
6 months 1 week ago #345757 by Aciera
Just a stab, you are loading 'custom_postgui.hal' twice, which does not make a lot of sense:

Code:
EMBED_TAB_COMMAND = gladevcp -x {XID} crosshair-panel.ui -H custom_postgui.hal


Code:
POSTGUI_HALFILE = custom_postgui.hal



Generally it would be quite helpful if you told us what actually is not working.
Start your config from the terminal and share the output you get there.

Please Log in to join the conversation.

More
6 months 1 week ago #345764 by grandixximo
Also new 2.10 will not start with your .ini configuration having names with hyphens, use underscores

---
test signature

Please Log in to join the conversation.

More
6 months 1 week ago #345810 by scsmith1451
Yes, I've tried both, neither surfaced the gvcp panel with gmoccapy.

Please Log in to join the conversation.

More
6 months 1 week ago #345811 by scsmith1451
 

Attachment not found

Please Log in to join the conversation.

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:

 

Attachment not found



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
 

Please Log in 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 to join the conversation.

More
5 months 1 week 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 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 to join the conversation.

Time to create page: 0.231 seconds
Powered by Kunena Forum