Assign external button to run ngc file

More
14 Aug 2017 18:54 #97479 by 10K
I have a system that runs from a touch screen. I've added a MAME game controller to give me a few buttons and joystick for some commands. I've got it all working except one thing. I'd like to be able to use a button to run my tool setter. It's on a lathe, has four switches, and can be used in either the X or Z direction, and from forward or reverse.

I have a short program that has the logic to set the probe. Is there a way to tie the execution of the program to a HAL pin, so that I can hook it to a button?

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

More
17 Aug 2017 01:37 #97604 by Todd Zuercher
I would think the way to do it would be by using a HaluiMDI command.
linuxcnc.org/docs/2.7/html/config/ini-co....html#_halui_section

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

More
17 Aug 2017 13:38 #97623 by 10K
I figured that was the way to do it, but I needed the exact format. Here's what worked. My o-code is named probe_x1.ngc, the sub in the file has the same name, and it's in my SUBROUTINE_PATH directory.

In my INI file
[HALUI]
   MDI_COMMAND=o<probe_x1> CALL

And in my POSTGUI_HALFILE
net joy-probe halui.mdi-command-00 <= input.0.btn-top2

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

Time to create page: 0.081 seconds
Powered by Kunena Forum