Custom Panel's HAL file cannot load postgui?
Originally the HAL connections for the custom panel were made in custom_postgui.hal. This seems to be a problem now for some reason. Reading the Gmoccapy docs it says
Since I'm having trouble I did it that way even though it wasn't the case before. The gladevcp panel is named "spindle_control.glade". I copied out the hal connections and put them into a file "spindle_control.hal". My postgui_call_list.hal is:If you make any hal connections to you custom glade panel, you need to do that in the hal file specified in the EMBEDDED_TAB_COMMAND line
source HAL_Files/custom_postgui.hal
source HAL_Files/spindle_control.hal
I will get the error:
**** GMOCCAPY INFO : postgui halfile = HAL_Files/postgui_call_list.hal ****:
HAL_Files/spindle_control.hal:6: Pin 'spindle_control.hal_vbarSpinMspeed' does not exist
I've tried to omit the postgui_call_list.hal from the ini and load both the custom_postgui.hal and spindle_control.hal as POSTGUI_HALFILE's from the ini but it appears that you cannot load 2 postgui hal files from the ini, the 2nd just doesn't load. I've tried TWOPASS=on which does not help. Attaching the config cuz someone will probably ask but I'm fairly certain this is a loading order/timing issue. Any fix or workaround?
Attachments:
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
- Posts: 5007
- Thank you received: 1440
Please Log in or Create an account to join the conversation.
So now LinuxCNC sill start, the custom panel and hal file will crash and gmoccapy will print that the pins don't exist, however they do....halshow will show the pins and they've even connected to the signals. There is an analog pin connecting to a Vscale that I can watch dance around in halshow so the pins definately netted. I hope I'm missing something because now I'm really confused.
I checked the gvcp-panel.ui that the pncconf config generated and that is a gtk2 panel just as mine is so that shouldn't be a problem.
Please Log in or Create an account to join the conversation.
It sounds like you're "spindle_control.hal" file isn't saved in the dir that Linuxcnc is looking for it in. Is it saved in the same place as the file "custom_postgui.hal" is? Alternatively you could add the lines from the spindle_control.hal to the custom_postgui.hal and use only that one.
The error I posted in code tags is from the hal file trying to make a connection to a pin that does not exist. It does not exist because the gladevcp panel has not loaded it yet. If the hal file didn't load, there would be no error as I mentioned as a test I commented out the line to load the hal file. Obviously in that case there are no pin connections either. Also as I mentioned the original config I migrated from was just 1 file, it was all in "custom_postgui.hal". Something has changed where this is not possible anymore, I've seen it mentioned while searching.
As I mentioned in the 2nd post I made. Using the gladevcp -H option still throws console errors....and the panel crashes, but all gladevcp pins created and netted if not for the fact that.....well the panel is not visable, it would be working. Forgot to mention in the last post, this is what I'm launching the tab with now...
EMBED_TAB_NAME = spindle_control
EMBED_TAB_LOCATION = box_custom_3
EMBED_TAB_COMMAND = gladevcp -c spindle_control -H HAL_Files/gvcp_call_list.hal -x {XID} GUI_Panels/spindle_control.glade
Please Log in or Create an account to join the conversation.
EMBED_TAB_NAME = spindle_control
EMBED_TAB_LOCATION = box_custom_3
EMBED_TAB_COMMAND = gladevcp -H spindle_control.hal -x {XID} spindle_control.glade
spindle_control.glade is your file but in spindle_control.hal I only tried to connect one signal as I don't have your signals from the main HAL file.
So this file consists only of this line:
net spindle-abs => spindle_control.hal_vbarSpinCur
Prerequisite is the line
net spindle-abs abs_spindle_feedback.out => gmoccapy.spindle_feedback_bar
Please Log in or Create an account to join the conversation.
It seems that the POSTGUI_HAL files are called before the custom widgets are created. Maybe this was different in 2.7-Originally the HAL connections for the custom panel were made in custom_postgui.hal. This seems to be a problem now for some reason. Reading the Gmoccapy docs it says
Since I'm having trouble I did it that way even though it wasn't the case before.If you make any hal connections to you custom glade panel, you need to do that in the hal file specified in the EMBEDDED_TAB_COMMAND line
Please Log in or Create an account to join the conversation.
The display program's handler file (the python file) handles calling the postgui file, at least that's always been the case.
It seems that the POSTGUI_HAL files are called before the custom widgets are created. Maybe this was different in 2.7-
So I did manage to get it working by adding connections back to the spindle_control.hal file little by little. It looks like there were a couple of errors that 2.7 didn't seem to care about that 2.8.4 actually does. I can believe that because I know earlier versions of LCNC let you get away with things in postgui files that were technically illegal.
For reference,
net machine-is-on <= spindle_control.HLB_ServoFree-enable
and
net GUI-spindle-drive-enable => spindle_control.HLB_ServoFree-light
net spindle-drive-enable => spindle_control.HLB_ServoFree-light
Is an error because 2 output signals are connected to 1 input pin. So it looks like the errors it was giving me about "pin xxx does not exist" is because the panel/halfile crashed with the errors before those pins were created. So it looks like you just have to be careful messing with postgui files in 2.8.4 as it will catch the errors but the reporting is likely to be off.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Attachments:
Please Log in or Create an account to join the conversation.