HAL trigger M code

More
02 Oct 2016 01:15 #81134 by pmcstoneinc
HAL trigger M code was created by pmcstoneinc
Is there a way to have a HAL input pin to run a M code?

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

More
02 Oct 2016 02:01 #81135 by BigJohnT
Replied by BigJohnT on topic HAL trigger M code
Sure just connect your pin to a halui pin.
linuxcnc.org/docs/2.7/html/config/ini-co....html#_halui_section

JT

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

More
02 Oct 2016 02:04 - 02 Oct 2016 02:11 #81136 by Todd Zuercher
Replied by Todd Zuercher on topic HAL trigger M code
Yes depending on exactly what you want to do. As long as you don't need your hal input to trigger the M-code while in auto mode (while g-code is running) you can use a Halui MDI command.
linuxcnc.org/docs/2.7/html/config/ini-co....html#_halui_section
In your ini file under [HALUI] you add
MDI_COMMAND = xxxxx
where xxxxx is the MDI command you want to execute when the hal pin "halui.mdi-command-<nn>" turns true (nn is the number of the command 00-63). You just list your MDI commands in the ini and the order they are listed is their number.

If you do need to be able to activate it while a program is running there are other ways to skin this cat. (most involve doing what ever your M-code does directly without using the M-code.)
Last edit: 02 Oct 2016 02:11 by Todd Zuercher.

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

More
02 Oct 2016 02:06 #81137 by pmcstoneinc
Replied by pmcstoneinc on topic HAL trigger M code
Thanks guys!

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

Time to create page: 0.060 seconds
Powered by Kunena Forum