Touch off having a hard time with HAL side
I'm using LinuxCNC/AXIS version 2.8.4-76 etc.
In Stepconf, there is a page for custom HAL commands, where I have entered (as the first and only MDI command):
MDI_COMMAND = o<z_touch>call
1. How does HAL know where to find the subroutine, i.e. the path to the gcode z_touch?
Here is the xml corresponding to the touch off button:
<button>
<font>("Helvetica",14)</font>
<width>3</width>
<halpin>"z-zero"</halpin>
<text>"Z"</text>
</button>
I need to connect the 'z-zero' button to my touch off subroutine. I think I need a line like this:
net do-z-touchoff halui.mdi-command-00 <= pyvcp.z-zero
2. Does this go in custom_postgui.hal ?
3. Is that all I need?
I also want to use a spinbox to input the touch plate thickness, but I'll leave that question for the next round.
Thank you,
Steve
Please Log in or Create an account to join the conversation.
in the [RS274NGC] section of your ini file add the location of your subroutines to the entry 'SUBROUTINE_PATH ='1. How does HAL know where to find the subroutine, i.e. the path to the gcode z_touch?
linuxcnc.org/docs/html/config/ini-config.html
Since the hal pins related to the button are created with the gui you need to add the corresponding HAL lines to the 'POSTGUI_HALFILE'2. Does this go in custom_postgui.hal ?
That should be all.
Please Log in or Create an account to join the conversation.
Unknown word where unary operation could be. Position: Relative Actual
Searching took me to a page that said this certainly came from gcode interpretation. I have reduced my sub to just start and end statements:
o<z_touch> sub
o<z_touch> endsub
and still get the same error.
Nowhere in the various config files is the subroutine file name used, only the directory. Is this correct?
Thanks
Please Log in or Create an account to join the conversation.
That is correct, the interpreter will search for the subroutine in the paths declared.Nowhere in the various config files is the subroutine file name used, only the directory. Is this correct?
If you change this:
MDI_COMMAND = o<z_touch>call
to
MDI_COMMAND = (debug,MDI button pressed)
And you press the button, do you get a message like this:
Attachments:
Please Log in or Create an account to join the conversation.
If the interpreter was unable to find the subroutine then you would get error like
'seeking o-word: o<z_touch> from line .. '.
So there is something else going on.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
.ini file
[RS274NGC]
PARAMETER_FILE = linuxcnc.var
SUBROUTINE_PATH = ncsubroutines:/home/steve/linuxcnc/subroutines
HAL
HALUI = halui
[HALUI]
# add halui MDI commands here (max 64)
MDI_COMMAND = MDI_COMMAND = (debug,MDI button pressed)
postgui_call_list.hal
# touch off Z
net ztouchoff halui.mdi-command-00 <= pyvcp.z-zero
custompanel.xml
<button>
<font>("Helvetica",14)</font>
<width>3</width>
<halpin>"z-zero"</halpin>
<text>"Z"</text>
</button>
There are other mods, the jog button pyvcp example. They work fine until I try my added touchoff Z button, when I get the error and the jog buttons no longer work. So I think it's the Z button section in error, rather than some other part.
Please Log in or Create an account to join the conversation.
Well this would explain the error you got. This line should be:MDI_COMMAND = MDI_COMMAND = (debug,MDI button pressed)
MDI_COMMAND = (debug,MDI button pressed)
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.