Spindle Load feedback in Gmoccapy

More
3 years 7 months ago #266048 by zz912
Hello,

once i added the "spindle_load bar" it sometimes happens that LCNC won't start and shows this error:
Code:
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
3 years 7 months ago #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:
Code:
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
3 years 7 months ago #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
3 years 7 months ago #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
3 years 7 months ago #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
3 years 7 months ago #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
Code:
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.33 KB

 

File Attachment:

File Name: connect-pin.hal
File Size:54 B

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.
 

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

Moderators: newbynobi, HansU
Time to create page: 0.197 seconds
Powered by Kunena Forum