Post GUI HAL not loading and "Bad character '[' used" error on E-Stop
20 Aug 2024 23:24 #308249
by nwallace
I am having an issue with a machine using probe basic where the post gui hal files are not loading. Looking at the console output when running linuxcnc from the terminal does not show an obvious error to me. It just gets to the line where it is trying to load the first post gui hal file and stops. I have tried removing any customizations but it has no effect. Attached are my hal and ini files.
Another possibly related issue I am having is that if I ever use the e-stop, I get 2 "Bad character '[' used" errors. The error shown in the terminal is "emc/task/emctask.cc 68: interp_error: Bad character '[' used" and it happens even if I have no file loaded.
Has anyone encountered either of these problems? I am at a loss of where to look next on either and would appreciate any help.
Another possibly related issue I am having is that if I ever use the e-stop, I get 2 "Bad character '[' used" errors. The error shown in the terminal is "emc/task/emctask.cc 68: interp_error: Bad character '[' used" and it happens even if I have no file loaded.
Has anyone encountered either of these problems? I am at a loss of where to look next on either and would appreciate any help.
Please Log in or Create an account to join the conversation.
21 Aug 2024 09:11 #308270
by Aciera
Replied by Aciera on topic Post GUI HAL not loading and "Bad character '[' used" error on E-Stop
You've got a lot going on there.
Only thing I see are these MDI_COMMANDS that will cause syntax errors due to comma instead of semicolon but I have no idea if those are actually used anywhere.:
If you run this in MDI do you also get the error about the Bad character '[':
Only thing I see are these MDI_COMMANDS that will cause syntax errors due to comma instead of semicolon but I have no idea if those are actually used anywhere.:
MDI_COMMAND = o<sweep_4x8> call,Sweep\n4x8
#MDI_COMMAND = o<measure_tool> call,Measure\nCurrent\nTool
MDI_COMMAND = G53 G0 Z0;G53 G0 X63 Y5,Go To\nMTC Location
MDI_COMMAND = M64 P7,Open Tool\nMagazine
MDI_COMMAND = M65 P7,Close Tool\nMagazine
If you run this in MDI do you also get the error about the Bad character '[':
(abort, aborting)
The following user(s) said Thank You: nwallace
Please Log in or Create an account to join the conversation.
21 Aug 2024 11:00 #308278
by Aciera
Replied by Aciera on topic Post GUI HAL not loading and "Bad character '[' used" error on E-Stop
Another thing that comes to mind is that only one POSTGUI_HALFILE entry is allowed (unless that has changed):
So if you wanted to load more than one postgui_hal file you would have to create a single (eg 'postgui_call_list.hal') file like this:
Then you would replace the three POSTGUI_HALFILE entries with this single line:
Maybe that helps
POSTGUI_HALFILE = custom_postgui.hal
POSTGUI_HALFILE = vc-postgui.hal
POSTGUI_HALFILE = probe_basic_postgui.hal
So if you wanted to load more than one postgui_hal file you would have to create a single (eg 'postgui_call_list.hal') file like this:
# These files are loaded post GUI, in the order they appear
source custom_postgui.hal
source vc-postgui.hal
source probe_basic_postgui.hal
Then you would replace the three POSTGUI_HALFILE entries with this single line:
POSTGUI_HALFILE = postgui_call_list.hal
Maybe that helps
The following user(s) said Thank You: nwallace
Please Log in or Create an account to join the conversation.
21 Aug 2024 17:04 #308317
by nwallace
Replied by nwallace on topic Post GUI HAL not loading and "Bad character '[' used" error on E-Stop
Thank you very much for the help! I feel a bit lame for not realizing that you could only have one postgui_halfile. That has solved that issue.
As for the bad character issue, yes (abort, aborting) does trigger that error but only once instead of twice like an e-stop would.
As for the bad character issue, yes (abort, aborting) does trigger that error but only once instead of twice like an e-stop would.
Please Log in or Create an account to join the conversation.
21 Aug 2024 17:26 - 21 Aug 2024 17:30 #308324
by Aciera
Replied by Aciera on topic Post GUI HAL not loading and "Bad character '[' used" error on E-Stop
Not sure if you can have a mix of G- and M-commands like that for an 'ON_ABORT_COMMAND' so try commenting out this line in your ini and see if the error still occurs:
If that fixes it then you may want to use a subroutine call instead. Something like this:
and create a subroutine 'on_abort.ngc' with all the command you want to run on abort
ON_ABORT_COMMAND = G54 G17 G90 G94 M48 G40 M5 G80 M9
If that fixes it then you may want to use a subroutine call instead. Something like this:
ON_ABORT_COMMAND = o<on_abort> call
and create a subroutine 'on_abort.ngc' with all the command you want to run on abort
o<on_abort> sub
;Your Gcodes
;Your Mcodes
o<on_abort> endsub
M2
Last edit: 21 Aug 2024 17:30 by Aciera.
The following user(s) said Thank You: nwallace
Please Log in or Create an account to join the conversation.
21 Aug 2024 17:39 - 21 Aug 2024 17:42 #308325
by nwallace
Replied by nwallace on topic Post GUI HAL not loading and "Bad character '[' used" error on E-Stop
You were correct about the 'ON_ABORT_COMMAND' not working with all those commands. I will go the subroutine route.
I realized I forgot to comment on the MDI_COMMANDS section. Those are formatted that way to show up as buttons in the UI. Everything after the comma is treated as the button text. I just used an example bit of code from the pull request on github to set it up. github.com/kcjengr/probe_basic/pull/84
That example code uses the INI format from QTDragon.
I realized I forgot to comment on the MDI_COMMANDS section. Those are formatted that way to show up as buttons in the UI. Everything after the comma is treated as the button text. I just used an example bit of code from the pull request on github to set it up. github.com/kcjengr/probe_basic/pull/84
That example code uses the INI format from QTDragon.
Last edit: 21 Aug 2024 17:42 by nwallace.
Please Log in or Create an account to join the conversation.
06 Sep 2024 17:03 #309511
by nwallace
Replied by nwallace on topic Post GUI HAL not loading and "Bad character '[' used" error on E-Stop
turns out that a traditional sub call does not work in the ON_ABORT_COMMAND option either. It appears that it strips out the <> characters. It errors on a e-stop saying it can't find a subroutine called "Oon_abort". I think I will have to go the custom M code route instead.
Please Log in or Create an account to join the conversation.
06 Sep 2024 19:09 #309520
by Aciera
Replied by Aciera on topic Post GUI HAL not loading and "Bad character '[' used" error on E-Stop
Certainly works for me:
github.com/Sigma1912/LinuxCNC_Demo_Confi...ort_no_twp_reset.ngc
with this in the [RS247NGC] section of the ini:
github.com/Sigma1912/LinuxCNC_Demo_Confi...ort_no_twp_reset.ngc
with this in the [RS247NGC] section of the ini:
ON_ABORT_COMMAND = o <on_abort_no_twp_reset> call
Please Log in or Create an account to join the conversation.
11 Sep 2024 00:05 #309874
by nwallace
Replied by nwallace on topic Post GUI HAL not loading and "Bad character '[' used" error on E-Stop
Turns out the issue was no M2 or M30 at the end of the file. I was just using the % markers at the beginning and end which is the wrong way to do that.
Please Log in or Create an account to join the conversation.
Time to create page: 0.091 seconds