The other half of the pins that Sebastian mentioned is that the commands
must be defined in the .ini file.

This
<https://linuxcnc.org/docs/2.6/html/config/ini_config.html#sub:HALUI-section>
will
tell you that you can put things like:

   -

   *MDI_COMMAND = G53 G0 X0 Y0 Z0* - An MDI command can be executed by
   using halui.mdi-command-00. Increment the number for each command listed in
   the [HALUI] section.

The first such entry will be executed when halui.mdi-command-00 is
asserted. The second corresponds to -01, etc.

You might then write subroutines to do such things as jog in +X, -X, +Y,
-Y, etc. Those subroutines might save the direction of the last jog. You
could also have a subroutine to use your touch probe. It could be "smart
enough" to probe in the direction of the last jog.

Ken


Kenneth Lerman
55 Main Street
Newtown, CT 06470



On Sat, Feb 5, 2022 at 5:56 PM Sebastian Kuzminsky <s...@highlab.com> wrote:

> On 2/5/22 1:13 PM, Nicklas SB Karlsson wrote:
> > Anybody know about a method to execute a MDI command with g-code then on
> > a hal pin flank?
>
> I'm not entirely sure what you're asking for, but one of my machines has
> a hardware button coming in to HAL through a gpio, connected to a halui
> input which triggers an MDI command.  Check out halui.mdi-command-XX:
>
> http://linuxcnc.org/docs/devel/html/man/man1/halui.1.html#PINS
>
>
> --
> Sebastian Kuzminsky
>
>
> _______________________________________________
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>

_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to