XHC-HB04, zero current axis from "=0" button, and axis selector

More
16 Apr 2019 18:41 #130997 by travis036
while i was browsing around the HAL configuration utility, i discovered that the following signals are available:
xhc-hb04.button-zero-x
xhc-hb04.button-zero-y
xhc-hb04.button-zero-z

when i plugged them into the watch window, and selected, say, the X axis on the jog selector, and pressed the "=0" button, it activated the xhc-hbo4.button-zero-x signal. now, how do i connect these HAL signals to zero the selected axis to the work piece when pressed? it would definitely save me some time.

BTW, running LinuxCNC 2.7.? (disk distro)
if it helps, i have uploaded my most recent configuration files (my my-mill folder contents, minus images), to my GitHub: github.com/travisfarmer/my-linuxcnc-conf

~Travis

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

More
16 Apr 2019 20:41 #131002 by Todd Zuercher
I think I would connect that to a series of halui MDI commands, that issue the appropriate G10L20 command.

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

More
16 Apr 2019 20:57 #131005 by travis036
thanks for the response.
please forgive my ignorance, but i am still learning the workings of HAL.
i will give that a try and see if it responds as i intend.

~Travis

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

More
16 Apr 2019 22:11 #131010 by travis036
from my my-mill.ini.
[HALUI]
# add halui MDI commands here (max 64)
MDI_COMMAND = "G10 L20 P0"
MDI_COMMAND = "G10 L20 P1"
MDI_COMMAND = "G10 L20 P2"

[XHC_HB04_BUTTONS]
...
zero-x = "halui.mdi-command-00"
zero-y = "halui.mdi-command-01"
zero-z = "halui.mdi-command-02"

my full config files are on the GitHub previously mentioned.
but what i have does not seem to work. for that matter, just entering "G10 L20 P0" into the MDI panel has no effect. something i am doing is wrong. HAL does read the pin associated with the button, as i have tested it with the HAL watch.

~Travis

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

More
16 Apr 2019 22:24 #131011 by travis036
did a little research on Gcode. pardon me while i remove my head from my... rear.
[HALUI]
# add halui MDI commands here (max 64)
MDI_COMMAND = "G10 L20 P1 X0"
MDI_COMMAND = "G10 L20 P1 Y0"
MDI_COMMAND = "G10 L20 P1 Z0"

are these correct?

i will have to try them tomorrow after work.

~Travis

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

More
17 Apr 2019 02:38 #131031 by Todd Zuercher

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

More
19 Apr 2019 18:56 #131256 by travis036
due to the flu, i was just able to test the changes. after some syntax error corrections, i was able to get everything working.

Many thanks to all who helped! :woohoo:

~Travis

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

More
20 Apr 2019 06:23 #131278 by pl7i92
i got the same
MDI_COMMAND=G10 L20 P1 X0
MDI_COMMAND=G10 L20 P1 Y0
MDI_COMMAND=G10 L20 P1 Z0

Attachments:

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

More
20 Apr 2019 13:47 #131301 by Todd Zuercher
If you use G10L10P0 instead of P1 it will affect the current active G5x coordinates instead of just G54.

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

More
20 Apr 2019 13:59 #131302 by travis036
G10L10P0?
linuxcnc.org/docs/2.7/html/gcode/g-code.html#gcode:g10-l10
"Set Tool Table"?

or did you mean "G10L20P0"? ;)
i thought the work offsets had to be on P1, and up. wouldn't zeroing P0 be like reseting the whole machine origin? then my "goto zero" button would no longer go to the same spot, or am i wrong?

~Travis

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

Time to create page: 0.098 seconds
Powered by Kunena Forum