Spindle Load feedback in Gmoccapy

More
31 Aug 2022 10:54 #250851 by zz912

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

More
31 Aug 2022 12:06 #250853 by CNC_Tux
i can see the pins in the hal show, if i make a link,
i get a fault message " pin or Signal doesnt exist"
I took a look into the sim examples ... noting in the hal, but the pins are linked.
Postgui.hal, i think is an idea to take a look inside

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

More
31 Aug 2022 13:16 #250855 by zz912
I see it:
 
I tested it, and it works.

Could you send your config?
Attachments:

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

More
31 Aug 2022 15:10 #250864 by CNC_Tux
Dear ZZ,
thank you so much, with the postgui.hal was the right idea!
It is working!!
Now i understand why this message "pin or signal doesnt exist"
Gmoccapy is not loaded and the pins exist after loading the GUI.

Cheers
Reinhard

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

More
06 Dec 2022 14:20 #258701 by piflixe
Hello! Could you maybe point out what changes neet to be made to run the spindle_load within LinuxCNC 2.8? on my simulation computer uname puts out the following: 4.19.0-21-rt-amd64 #1 SMP PREEMPT RT Debian 4.19.249-2

I also tried to install glade using apt-get install glade glade-gtk2. But when trying to open spindle_load.glade within the glade GUI I get en error message that the gladevcp catalog is missing.

Thanks for your help!

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

More
06 Dec 2022 14:25 #258702 by zz912
I have same problem.

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

More
06 Dec 2022 16:19 #258716 by HansU
For making it Python2 compatible the glade file doesn't need to be changed afaik. Only the Python script needs adaption. I can post a Python2 version tomorrow.

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

More
06 Dec 2022 20:56 - 06 Dec 2022 21:04 #258741 by HansU
Apparently I was wrong, sorry. The Glade file needs a change. The line 
<requires lib="gtk+" version="3.0"/>
has to be changed to
<requires lib="gtk+" version="2.0"/>
to work with Gtk2.
Moreover, there is no Python file needed at all for that simple use case. Sorry again for that complication.
So the attached Glade file should work for both LinuxCNC 2.8 and 2.9 with this configuration:
EMBED_TAB_NAME = Spindle_load
EMBED_TAB_LOCATION = box_custom_4
EMBED_TAB_COMMAND = gladevcp -x {XID} spindle_load.glade

You will see a float pin named spindle_load.bar_spindle_load.
The scale is 1, so setting this pin to 100 will display 100.
Attachments:
Last edit: 06 Dec 2022 21:04 by HansU.

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

More
06 Dec 2022 21:53 #258756 by HansU
For getting the Glade catalog for Gtk2 (LinuxCNC 2.8) working, following needs to be done:

First check with
pkg-config --variable=catalogdir gladeui-1.0
the directory of the glade catalog.
For me it was
/usr/local/share/glade3/catalogs

Then get the "lib/python/gladevcp" directory from the source code repository (github.com/LinuxCNC/linuxcnc/tree/2.8/lib/python/gladevcp)
and copy all files from that directory to the above mentioned directory.
For example
git clone -b 2.8 https://github.com/LinuxCNC/linuxcnc.git --depth 1
cd linuxcnc/lib/python/gladevcp
sudo cp -r * /usr/local/share/glade3/catalogs

This worked at least for me for glade-gtk2.
The following user(s) said Thank You: blazini36

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

More
22 Dec 2022 20:31 #260105 by piflixe
The new spindle_load bar posted above works for me. Thank you!

Still no success in setting up glade unfortunately.

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

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