What are the current probing screen choices for Gmoccapy
- auto-mation-assist
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 425
- Thank you received: 81
05 Sep 2022 19:12 #251247
by auto-mation-assist
What are the current probing screen choices for Gmoccapy was created by auto-mation-assist
It been a good number of years since I configured a probing screen in Gmoccapy and wonder what is currently available to be installed with current Python version of LinuxCnc.
Please Log in or Create an account to join the conversation.
- auto-mation-assist
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 425
- Thank you received: 81
06 Sep 2022 22:19 - 06 Sep 2022 22:22 #251360
by auto-mation-assist
Replied by auto-mation-assist on topic What are the current probing screen choices for Gmoccapy
I have been working on getting to gmoccapy supplied verser_probe_screen.py working in my configuration but problems with import gtk.glade is a problem and appear not to be available anywhere.
module 'versa_probe_screen' skipped - import error: No module named 'gtk.glade'
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/gi/overrides/Gtk.py", line 85, in _builder_connect_callback
handler, args = _extract_handler_and_args(obj_or_map, handler_name)
File "/usr/lib/python3/dist-packages/gi/_gtktemplate.py", line 34, in _extract_handler_and_args
raise AttributeError('Handler %s not found' % handler_name)
AttributeError: Handler on_down_released not found
Changing the Gtk prefix gives the same result and there are many of these messages that relate to default settings not able to be handled. I have checked the internet and not found a solution and appears not to be uninstallable on mint 21 with some mention Introspection being required now.
If I comment the 'import gtk.glade' out and change 'import ConfigParser' to 'import os, configparser' and 'cp1 = ConfigParser.RawConfigParser' to 'cp1 = configparser.RawConfigParser' it will continue and seems normal but the result is that it shows the below and hangs there.
**** probe_screen GETINIINFO ****
Preference file path: cnc1_preferences
92274691
I don't know where the number is coming from.
module 'versa_probe_screen' skipped - import error: No module named 'gtk.glade'
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/gi/overrides/Gtk.py", line 85, in _builder_connect_callback
handler, args = _extract_handler_and_args(obj_or_map, handler_name)
File "/usr/lib/python3/dist-packages/gi/_gtktemplate.py", line 34, in _extract_handler_and_args
raise AttributeError('Handler %s not found' % handler_name)
AttributeError: Handler on_down_released not found
Changing the Gtk prefix gives the same result and there are many of these messages that relate to default settings not able to be handled. I have checked the internet and not found a solution and appears not to be uninstallable on mint 21 with some mention Introspection being required now.
If I comment the 'import gtk.glade' out and change 'import ConfigParser' to 'import os, configparser' and 'cp1 = ConfigParser.RawConfigParser' to 'cp1 = configparser.RawConfigParser' it will continue and seems normal but the result is that it shows the below and hangs there.
**** probe_screen GETINIINFO ****
Preference file path: cnc1_preferences
92274691
I don't know where the number is coming from.
Last edit: 06 Sep 2022 22:22 by auto-mation-assist.
Please Log in or Create an account to join the conversation.
- auto-mation-assist
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 425
- Thank you received: 81
07 Sep 2022 19:39 - 07 Sep 2022 19:42 #251432
by auto-mation-assist
Replied by auto-mation-assist on topic What are the current probing screen choices for Gmoccapy
Linux Mint 21 has some special requirements for working around old Python 2 code.
Yesterday I found the GObject project on the internet and installed it and its requirements and now the probe screen displays and executes.
Here are some examples;
Python 2.x bindings for GObject - transitional package
python3-gi 3.42.1
Python 3 bindings for gobject-introspection libraries
python3-gi-cairo 3.42.1
Python 3 Cairo bindings for the GObject library
python3-gi-dbg 3.42.1
Python 3 bindings for gobject-introspection libraries (debug extension)
My install was like this based no my notes.
sudo apt install python3-gi python3-gi-cairo gir1.2-gtk-3.0
sudo apt install libgirepository1.0-dev gcc libcairo2-dev pkg-config python3-dev gir1.2-gtk-3.0
pip3 install pycairo
pip3 install PyGObject
Ran this little test file after installation and named it hello..py as mentioned by install document.
#!/bin/bash
#.. code:: python
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk
window = Gtk.Window(title="Hello World")
window.show()
window.connect("destroy", Gtk.main_quit)
Gtk.main()
A few minor changes in the versa_probe_screen.py file
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk as gtk
from gi.repository import GObject
from gi.repository import Pango as pango
import hal # base hal class to react to hal signals
import os # needed to get the paths and directories
import hal_glib # needed to make our own hal pins
#import Gtk.glade
Yesterday I found the GObject project on the internet and installed it and its requirements and now the probe screen displays and executes.
Here are some examples;
Python 2.x bindings for GObject - transitional package
python3-gi 3.42.1
Python 3 bindings for gobject-introspection libraries
python3-gi-cairo 3.42.1
Python 3 Cairo bindings for the GObject library
python3-gi-dbg 3.42.1
Python 3 bindings for gobject-introspection libraries (debug extension)
My install was like this based no my notes.
sudo apt install python3-gi python3-gi-cairo gir1.2-gtk-3.0
sudo apt install libgirepository1.0-dev gcc libcairo2-dev pkg-config python3-dev gir1.2-gtk-3.0
pip3 install pycairo
pip3 install PyGObject
Ran this little test file after installation and named it hello..py as mentioned by install document.
#!/bin/bash
#.. code:: python
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk
window = Gtk.Window(title="Hello World")
window.show()
window.connect("destroy", Gtk.main_quit)
Gtk.main()
A few minor changes in the versa_probe_screen.py file
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk as gtk
from gi.repository import GObject
from gi.repository import Pango as pango
import hal # base hal class to react to hal signals
import os # needed to get the paths and directories
import hal_glib # needed to make our own hal pins
#import Gtk.glade
Last edit: 07 Sep 2022 19:42 by auto-mation-assist.
The following user(s) said Thank You: fletch
Please Log in or Create an account to join the conversation.
- auto-mation-assist
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 425
- Thank you received: 81
07 Sep 2022 19:54 #251434
by auto-mation-assist
Replied by auto-mation-assist on topic What are the current probing screen choices for Gmoccapy
Some additional information.
Binary Python 2 packages were not built on Mint 21 only the Python 3 versions were built by the installation process.
python-gi: Python 2.x bindings for gobject-introspection libraries
GObject is an abstraction layer that allows programming with an object
paradigm that is compatible with many languages. It is a part of Glib,
the core library used to build GTK+ and GNOME.
.
This package contains the Python 2.x binding generator for libraries that
support gobject-introspection, i. e. which ship a gir1.2-<name>-<version>
package. With these packages, the libraries can be used from Python.
python-gi-cairo: Python Cairo bindings for the GObject library
GObject is an abstraction layer that allows programming with an object
paradigm that is compatible with many languages. It is a part of Glib,
the core library used to build GTK+ and GNOME.
.
This package contains the Python Cairo bindings for GObject. It is mostly
used by other bindings to map their GObjects to Python objects.
python-gi-dbg: No summary available for python-gi-dbg in ubuntu cosmic.
No description available for python-gi-dbg in ubuntu cosmic.
python-gi-dev: development headers for GObject Python bindings
GObject is an abstraction layer that allows programming with an object
paradigm that is compatible with many languages. It is a part of Glib,
the core library used to build GTK+ and GNOME.
.
This package contains the development headers needed to build C extensions
which use pygobject.
python-gobject: Python 2.x bindings for GObject - transitional package
This package will bring the two versions of GObject Python modules: the
deprecated gobject module, and the new gobject-introspection system. It
is here for upgrade purposes only. You can remove it safely when
nothing else depends on it.
python3-gi: Python 3 bindings for gobject-introspection libraries
GObject is an abstraction layer that allows programming with an object
paradigm that is compatible with many languages. It is a part of Glib,
the core library used to build GTK+ and GNOME.
.
This package contains the Python 3 binding generator for libraries that
support gobject-introspection, i. e. which ship a gir1.2-<name>-<version>
package. With these packages, the libraries can be used from Python 3.
python3-gi-cairo: Python 3 Cairo bindings for the GObject library
GObject is an abstraction layer that allows programming with an object
paradigm that is compatible with many languages. It is a part of Glib,
the core library used to build GTK+ and GNOME.
.
This package contains the Python 3 Cairo bindings for GObject. It is mostly
used by other bindings to map their GObjects to Python objects.
python3-gi-dbg: No summary available for python3-gi-dbg in ubuntu cosmic.
No description available for python3-gi-dbg in ubuntu cosmic.
Binary Python 2 packages were not built on Mint 21 only the Python 3 versions were built by the installation process.
python-gi: Python 2.x bindings for gobject-introspection libraries
GObject is an abstraction layer that allows programming with an object
paradigm that is compatible with many languages. It is a part of Glib,
the core library used to build GTK+ and GNOME.
.
This package contains the Python 2.x binding generator for libraries that
support gobject-introspection, i. e. which ship a gir1.2-<name>-<version>
package. With these packages, the libraries can be used from Python.
python-gi-cairo: Python Cairo bindings for the GObject library
GObject is an abstraction layer that allows programming with an object
paradigm that is compatible with many languages. It is a part of Glib,
the core library used to build GTK+ and GNOME.
.
This package contains the Python Cairo bindings for GObject. It is mostly
used by other bindings to map their GObjects to Python objects.
python-gi-dbg: No summary available for python-gi-dbg in ubuntu cosmic.
No description available for python-gi-dbg in ubuntu cosmic.
python-gi-dev: development headers for GObject Python bindings
GObject is an abstraction layer that allows programming with an object
paradigm that is compatible with many languages. It is a part of Glib,
the core library used to build GTK+ and GNOME.
.
This package contains the development headers needed to build C extensions
which use pygobject.
python-gobject: Python 2.x bindings for GObject - transitional package
This package will bring the two versions of GObject Python modules: the
deprecated gobject module, and the new gobject-introspection system. It
is here for upgrade purposes only. You can remove it safely when
nothing else depends on it.
python3-gi: Python 3 bindings for gobject-introspection libraries
GObject is an abstraction layer that allows programming with an object
paradigm that is compatible with many languages. It is a part of Glib,
the core library used to build GTK+ and GNOME.
.
This package contains the Python 3 binding generator for libraries that
support gobject-introspection, i. e. which ship a gir1.2-<name>-<version>
package. With these packages, the libraries can be used from Python 3.
python3-gi-cairo: Python 3 Cairo bindings for the GObject library
GObject is an abstraction layer that allows programming with an object
paradigm that is compatible with many languages. It is a part of Glib,
the core library used to build GTK+ and GNOME.
.
This package contains the Python 3 Cairo bindings for GObject. It is mostly
used by other bindings to map their GObjects to Python objects.
python3-gi-dbg: No summary available for python3-gi-dbg in ubuntu cosmic.
No description available for python3-gi-dbg in ubuntu cosmic.
The following user(s) said Thank You: andypugh, tommylight
Please Log in or Create an account to join the conversation.
- cmorley
- Away
- Moderator
Less
More
- Posts: 7766
- Thank you received: 2055
08 Sep 2022 04:46 #251463
by cmorley
Replied by cmorley on topic What are the current probing screen choices for Gmoccapy
potentially qtvcp's veraprobe and basic probe would be possible to embed into gmoccapy.
I have not tried it and currently there is no ready made panel available.
linuxcnc.org/docs/devel/html/gui/qtvcp-w...l#_dialog_versaprobe
I have not tried it and currently there is no ready made panel available.
linuxcnc.org/docs/devel/html/gui/qtvcp-w...l#_dialog_versaprobe
Please Log in or Create an account to join the conversation.
- auto-mation-assist
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 425
- Thank you received: 81
08 Sep 2022 15:59 - 08 Sep 2022 16:10 #251498
by auto-mation-assist
Replied by auto-mation-assist on topic What are the current probing screen choices for Gmoccapy
In relation to qtvcp's probe panel. I was looking through my old files and found my past work on this and think it would be possible to use it and perhaps modify it as required. This was the probe screen I was working on and has a date of 21 Nov 2018 so it may only need some button name changes.
The actual file is attached below.
I have the required icons and the Python probe handler I was using for this development work. As I recall your version of the handler does use some different methods but this may not affect the panel use. I do not have your latest handler version.
The actual file is attached below.
I have the required icons and the Python probe handler I was using for this development work. As I recall your version of the handler does use some different methods but this may not affect the panel use. I do not have your latest handler version.
Last edit: 08 Sep 2022 16:10 by auto-mation-assist.
Please Log in or Create an account to join the conversation.
- cmorley
- Away
- Moderator
Less
More
- Posts: 7766
- Thank you received: 2055
09 Sep 2022 04:45 #251532
by cmorley
Replied by cmorley on topic What are the current probing screen choices for Gmoccapy
I made a panel and did some tests on my machine, and while in principle it does work, there are usability problems with key forwarding and aborting that I am not prepared to try and work through.
I am curious if the original versa probe aborted properly - it would seem a miracle if it did.
Sorry, I think I steered you to a dead end.
Chris
I am curious if the original versa probe aborted properly - it would seem a miracle if it did.
Sorry, I think I steered you to a dead end.
Chris
Please Log in or Create an account to join the conversation.
- cmorley
- Away
- Moderator
Less
More
- Posts: 7766
- Thank you received: 2055
09 Sep 2022 04:52 #251533
by cmorley
Replied by cmorley on topic What are the current probing screen choices for Gmoccapy
Well I tried again after deleting all other gladevcp panels (There were 3) and the entry problem seemed to go away.
If you wish to experiment, I can push the panel to master.
Chris
If you wish to experiment, I can push the panel to master.
Chris
Please Log in or Create an account to join the conversation.
- auto-mation-assist
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 425
- Thank you received: 81
11 Sep 2022 17:24 #251691
by auto-mation-assist
Replied by auto-mation-assist on topic What are the current probing screen choices for Gmoccapy
Yes I will like to see if I can it it working and make any changes that may be desired.
I had a set back in that mint 21 it would not longer boot up. Others have reported same issue with latest versions of mint that just boot to 'out of memory message'. Nothing worked to fix that so now In the process of rebuilding with separate home partition on the SSD.
I had a set back in that mint 21 it would not longer boot up. Others have reported same issue with latest versions of mint that just boot to 'out of memory message'. Nothing worked to fix that so now In the process of rebuilding with separate home partition on the SSD.
Please Log in or Create an account to join the conversation.
- cmorley
- Away
- Moderator
Less
More
- Posts: 7766
- Thank you received: 2055
12 Sep 2022 04:57 #251722
by cmorley
Replied by cmorley on topic What are the current probing screen choices for Gmoccapy
If you are compiling linuxcnc, this goes in share/qtvcp/panels/
load in gmoccapy with:
EMBED_TAB_NAME = Probe
EMBED_TAB_LOCATION = ntb_preview
EMBED_TAB_COMMAND = halcmd loadusr -Wn qtvcp_embed qtvcp -d -c qtvcp_embed -x {XID} versaprobe
load in gmoccapy with:
EMBED_TAB_NAME = Probe
EMBED_TAB_LOCATION = ntb_preview
EMBED_TAB_COMMAND = halcmd loadusr -Wn qtvcp_embed qtvcp -d -c qtvcp_embed -x {XID} versaprobe
Please Log in or Create an account to join the conversation.
Moderators: newbynobi, HansU
Time to create page: 0.113 seconds