NGCGUI and Gmoccapy

More
13 Apr 2016 21:17 #73255 by 10K
NGCGUI and Gmoccapy was created by 10K
I'd like to use NGCGUI on tabs inside of Gmoccapy.

I've got the tabs working, but I can't get anything to display. The NGCGUI manual mentions that it works with tabs in Gmoccapy, but never gives an example of how to do it. It also says that there's an example file in LinuxCNC. I found examples for other interfaces, but none under Gmoccapy for NGCGUI.

It may be that all I need is the correct syntax for the EMBED_TAB_COMMAND to make it work. Or maybe I need a pyngcgui_gmoccapy.ui file. Does someone know how to do this?

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

More
14 Apr 2016 14:40 #73305 by dgarrett
Replied by dgarrett on topic NGCGUI and Gmoccapy
(py)ngcgui examples exist for axis, touchy, and gscreen but
they have removed from gmoccapy sim examples.

I could still make pyngcgui work (2.7) -- pyngcgui is just a gladevcp application.
So you could try:
1) study the touchy or gscreen examples,
2) copy the .ui file from a working sim config that uses gladevcp
3) edit a new inifile based on gmoccapy_with_user_tabs.ini
to create the required [DISPLAY]EMBED* items and
the needed [RS274NGC]SUBROUTINE_PATH

It is best to start the new inifile in a terminal to see error messages (but there are number
of confusing warning messages too)

Transcript:
$ cd a_gmoccapy_example_config_directory
$ cp a_touchy_example_config/pyngcgui.ui     ./pyngcgui.ui
$ cp gmoccapy_with_user_tabs.ini    ./test.ini
$ # EDIT test.ini
$ diff gmoccapy_with_user_tabs.ini test.ini ;# here are the edits i made:
13a14,29
> EMBED_TAB_NAME = Pyngcgui
> EMBED_TAB_COMMAND = gladevcp -x {XID} ./pyngcgui.ui
> EMBED_TAB_LOCATION = ntb_user_tabs
> NGCGUI_PREAMBLE   = in_std.ngc
> NGCGUI_SUBFILE    = simp.ngc
> NGCGUI_SUBFILE    = db25.ngc
> NGCGUI_SUBFILE    = gosper.ngc
> NGCGUI_SUBFILE    = xyz.ngc
> NGCGUI_SUBFILE    = ihex.ngc
> NGCGUI_SUBFILE    = slot.ngc
> NGCGUI_SUBFILE    = rectangle_probe.ngc
> NGCGUI_SUBFILE    = arc2.ngc
> NGCGUI_SUBFILE    = iquad.ngc
> NGCGUI_SUBFILE    = qpocket.ngc
> NGCGUI_SUBFILE    = ""
> 
88c104
< SUBROUTINE_PATH = macros
---
> SUBROUTINE_PATH = macros:../../nc_files/ngcgui_lib:../../nc_files/ngcgui_lib/utilitysubs

$ linuxcnc test.ini
The following user(s) said Thank You: 10K

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

More
14 Apr 2016 16:40 #73313 by newbynobi
Replied by newbynobi on topic NGCGUI and Gmoccapy

It may be that all I need is the correct syntax for the EMBED_TAB_COMMAND to make it work. Or maybe I need a pyngcgui_gmoccapy.ui file. Does someone know how to do this?


It is documentated how to integrate tabs.

Whal does not work?
What about your config files?

Norbert

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

More
14 Apr 2016 22:27 #73326 by 10K
Replied by 10K on topic NGCGUI and Gmoccapy
Thanks, dgarrett. The code as you suggested worked!

The thing I was lacking was knowing to use pyngcgui.ui with Gmoccapy, and then copying it to my config directory.

Also, I had run linuxcnc and used it to install an axis version using ngcgui in my home directory, which set up all the symbolic links in my nc_files directory.

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

Moderators: newbynobiHansU
Time to create page: 0.069 seconds
Powered by Kunena Forum