Spindle Load feedback in Gmoccapy

More
26 Dec 2022 13:31 - 26 Dec 2022 13:33 #260326 by andypugh

Still no success in setting up glade unfortunately.


Which version of Glade have you installed? (And which version of LinuxCNC
If you are on LinuxCNC 2.8 then you need the Glade version here: www.linuxcnc.org/dists/buster/base/binar...k2_3.8.6-1_amd64.deb
But it is probably best to get it through the package manager. Make sure that you are getting a package called glade-gtk2.

Attachments:
Last edit: 26 Dec 2022 13:33 by andypugh.

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

More
03 Mar 2023 17:27 #265786 by zz912
I am trying run spindle_load.py for LCNC 2.9 by HansU, but it types:

  File "/usr/lib/python3/dist-packages/gi/overrides/Gtk.py", line 110, in _builder_connect_callback
    handler, args = _extract_handler_and_args(obj_or_map, handler_name)
  File "/usr/lib/python3/dist-packages/gi/overrides/Gtk.py", line 90, in _extract_handler_and_args
    raise AttributeError('Handler %s not found' % handler_name)
AttributeError: Handler on_hal_status_interp_run not found
glade/spindle_load.py:3: unterminated quoted string
'halcmd -f glade/spindle_load.py' exited with 1

I  use RIP instalation.
 

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

More
03 Mar 2023 17:35 #265788 by HansU
The following user(s) said Thank You: zz912

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

More
03 Mar 2023 18:09 #265794 by zz912
I tried it now, and it works.

Thank you.

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

More
07 Mar 2023 17:57 #266048 by zz912
Hello,

once i added the "spindle_load bar" it sometimes happens that LCNC won't start and shows this error:
custom_postgui.hal:18: Pin 'spindle_load.bar_spindle_load' does not exist
/usr/lib/python3/dist-packages/gi/overrides/GObject.py:560: Warning: ../../../gobject/gsignal.c:2642: instance '0x2a45f70' has no handler with id '44040220'
  return func(*args, **kwargs)
Traceback (most recent call last):
  File "/home/jarda/linuxcnc/linuxcnc-2.9/bin/gladevcp", line 54, in <module>
    import gladevcp.makepins
  File "/home/jarda/linuxcnc/linuxcnc-2.9/lib/python/gladevcp/__init__.py", line 51, in <module>
    ,stderr=subprocess.PIPE
  File "/usr/lib/python3.7/subprocess.py", line 775, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.7/subprocess.py", line 1476, in _execute_child
    part = os.read(errpipe_read, 50000)
KeyboardInterrupt
2951
3008
Stopping realtime threads
Unloading hal components
Note: Using POSIX realtime

Just try to start LCNC again and then LCNC will start normally.

If I want to intentionally simulate this error, just close and immediately start LCNC a few times and the error is guaranteed to show up after a few tries.

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

More
07 Mar 2023 18:08 #266050 by HansU
Maybe you have to connect your pin 'spindle_load.bar_spindle_load' in a separate HAL file which you pass with -H to the gladevcp command.
Like this:
EMBED_TAB_COMMAND = gladevcp -x {XID} spindle_load.glade -H connect-pin.hal

The reason is that the VCP might be loaded after the GUI loading is done and so the pin is not yet available in the POSTGUI_HALFILE. But I am not 100% sure about this.

 

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

More
07 Mar 2023 21:47 #266074 by andypugh
Depending on the GUI you could also make the connection in the POSTGUI_HAL file.

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

More
08 Mar 2023 06:23 #266094 by newbynobi
If you are using integrated panels in gmoccapy and the panels have there own Hal pin, you have to load that panel with the -H flag naming a Hal file and all connections must be made in that file.

Otherwise you will get race conditions and the panel may work or not.

​​​​​​Hal connections are made in the following order:
- LinuxCNC Hal pin connections
- GUI relatet connections like the gmoccapy pins
- glade panels 

so you need to take care in witch file you connect pins.

Norbert

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

More
08 Mar 2023 16:17 #266122 by zz912
I moved spindle_load commands from custom_postgui.hal to gladevcp-zz.hal.

I added "-H ./gladevcp-zz.hal"
But LCNC did not read this file.

I added "POSTGUI_HALFILE = gladevcp-zz.hal"
And it works again.

Flag -H is not working probably.  I downloaded branch 2.9 now.

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

More
09 Mar 2023 09:23 #266183 by zz912
Simulation of bug:
1) download and build branche 2.9
2) add to linuxcnc-2.9_2023-03-07/configs/sim/gmoccapy/gmoccapy.ini
EMBED_TAB_NAME = Spindle_load
EMBED_TAB_LOCATION = box_custom_4
EMBED_TAB_COMMAND = gladevcp -x {XID} spindle_load.glade -H connect-pin.hal
3) copy
 

File Attachment:

File Name: spindle_load.glade
File Size:2 KB

 

File Attachment:

File Name: connect-pin.hal
File Size:0 KB

to: linuxcnc-2.9_2023-03-07/configs/sim/gmoccapy/
4) run linuxcnc gmoccapy.ini
5) signal "signal-spindle-load" from connect-pin.hal is missing, so file connect-pin.hal was not loaded probably.
 

I made this test on virtual PC in other PC.

I would like ask for help.
 
Attachments:

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

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