----- Original Message ----- From: "andy pugh" <[email protected]> To: "Enhanced Machine Controller (EMC)" <[email protected]> Sent: Wednesday, December 28, 2016 4:54:02 AM Subject: Re: [Emc-users] Calling MDI from HAL
>On 28 December 2016 at 07:33, Danny Miller <[email protected]> wrote: >> Say I want to use a button to call a one-time G-code op via MDI. >> Literally once. Repeat calls will break things. > >Is it possible to have the G-code subroutine refuse to run twice? >Perhaps through use of a parameter that is not saved through restart? > >This is probably more reliable than single-shotting in HAL, as there >is some chance that halui might miss a single-cycle pulse (it runs in >user-space not realtime) This might be a little bit of a roundabout way to get there but it might work for you. create a custom M1xx code to setp the hal pin to call your halui-mdi command that you only want ever called once. Then setup another halui-mdi command to call that M1xx code and connect that to your button. Pressing the button multiple times should have no effect because the once the setp for the first command is set true, it will stay that way and multiple presses should have no effect. And if you should have a need to reset it, you could set up another way to setp it back. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
