Re: [Emc-users] Execute MDI command, from hal pin

2022-02-05 Thread Kenneth Lerman
I've implemented some safe probing routines here
.
They are examples of subroutines that might be called by external switches
-- or in my case from buttons on a pendant.

Ken
Kenneth Lerman
55 Main Street
Newtown, CT 06470



On Sat, Feb 5, 2022 at 6:54 PM Kenneth Lerman  wrote:

> The other half of the pins that Sebastian mentioned is that the commands
> must be defined in the .ini file.
>
> This
>  
> 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 
> 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


Re: [Emc-users] Execute MDI command, from hal pin

2022-02-05 Thread Kenneth Lerman
The other half of the pins that Sebastian mentioned is that the commands
must be defined in the .ini file.

This

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  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


Re: [Emc-users] Execute MDI command, from hal pin

2022-02-05 Thread Sebastian Kuzminsky

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


Re: [Emc-users] Execute MDI command, from hal pin

2022-02-05 Thread andy pugh
On Sat, 5 Feb 2022 at 20:24, Nicklas SB Karlsson  wrote:
>
> Anybody know about a method to execute a MDI command with g-code then on
> a hal pin flank?

What is the MDI_COMMAND?

I think that if it is pure G-code then it can be an OCALL
and you can use that same format in your G-code.

Alternatively, perhaps configure it as a use M-code or a remapped G-code.

-- 
atp
"A motorcycle is a bicycle with a pandemonium attachment and is
designed for the especial use of mechanical geniuses, daredevils and
lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1912


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


[Emc-users] Execute MDI command, from hal pin

2022-02-05 Thread Nicklas SB Karlsson
Anybody know about a method to execute a MDI command with g-code then on 
a hal pin flank?



Nicklas Karlsson



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