Touchy + ngcgui

More
14 Apr 2023 10:41 - 15 Apr 2023 11:57 #269005 by scalaire
Touchy + ngcgui was created by scalaire
Hello everyone;
I configure my new CNC on a Beaglebone black with Machinekit.
Ngcgui works well on its own but I can't get it to work in Touchy, it creates a tab for me but it remains empty. 



@++ Jean-Claude
 
Last edit: 15 Apr 2023 11:57 by scalaire.

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

More
15 Apr 2023 08:22 #269069 by andypugh
Replied by andypugh on topic Touchy + ngcgui
Which Linux version / Gtk version / Python version.

I have a feeling that ngcgui might need modifications to work with Gtk3 and Python3

If you start from the command-line, do you see any clues in the output where it is going wrong?

(Command "linuxcnc" in a terminal window)

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

More
15 Apr 2023 11:36 - 15 Apr 2023 11:59 #269097 by scalaire
Replied by scalaire on topic Touchy + ngcgui
Hello,

Debian GNU/Linux 8.7 (jessie)
(bone-debian-8.7-machinekit-armhf-2017-02-12-4gb.img.xz)
Python 2.7.9
Python 3.42

How to see the version of Gtk?

scalaire00.free.fr/Install_Machinekit/Machinekit_01.jpg
Last edit: 15 Apr 2023 11:59 by scalaire.

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

More
15 Apr 2023 18:41 #269142 by andypugh
Replied by andypugh on topic Touchy + ngcgui
You seem to be using Machinekit?

Perhaps "get_linuxcnc_ini()" does not work with Machinekit?

I you want to investigate add a "print(p)" before line 209 of pyngcgui.py to see what it is trying to "split" on.

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

More
17 Apr 2023 07:51 #269281 by scalaire
Replied by scalaire on topic Touchy + ngcgui
A little better, I created a folder "linuxcn" and put my .ini file in it.
Now pyngcgui works in standalone but still doesn't want to be integrated in Touchy (Ngcgui also works in standalone).
In standalone there is no touch keyboard for Pyngcgui and Ngcgui.

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

More
22 Apr 2023 10:58 - 22 Apr 2023 11:06 #269600 by scalaire
Replied by scalaire on topic Touchy + ngcgui
I finally found it, I replaced the get_linuxcnc_ini_file() function
=======================================     
bone-debian-8.7-machinekit
=======================================
def get_linuxcnc_ini_file():
# example pgrep -lf output:
# 22224 linuxcncsvr -ini /path_to/somefile.ini
s = subprocess.Popen(['pgrep','-lf','linuxcncsvr']
,stdout=subprocess.PIPE
,stderr=subprocess.PIPE
)
p,e = s.communicate()
if s.returncode:
print(_('get_linuxcnc_ini_file: stdout= %s') % p)
print(_('get_linuxcnc_ini_file: stderr= %s') % e)

return None ans = p.split()[p.split().index('-ini')+1]

return ans .............................................................
 
Last edit: 22 Apr 2023 11:06 by scalaire.

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

More
22 Apr 2023 11:07 #269601 by scalaire
Replied by scalaire on topic Touchy + ngcgui
by the latter
[code][code]=======================================     
Linuxcnc SIM 2.7.14
=======================================
def get_linuxcnc_ini_file():
ps = subprocess.Popen('ps -C linuxcncsvr --no-header -o args'.split(),
stdout=subprocess.PIPE )

p,e = ps.communicate()

if ps.returncode:
print(_('get_linuxcnc_ini_file: stdout= %s') % p)
print(_('get_linuxcnc_ini_file: stderr= %s') % e)
return None

ans = p.split()[p.split().index('-ini')+1]

return ans

.............................................................
[/code]

[/code]
[code]If it helps anyone.

@++ Jean-Claude
 
[/code]

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

Time to create page: 0.074 seconds
Powered by Kunena Forum