On 25 August 2016 at 18:29, <dan...@austin.rr.com> wrote: > Can we have a combination of HAL and .ngc be set to this: > Logic #1: > if (button & !isProbing), then set isProbing=TRUE, execute myProbe.ngc, and > set isProbing=FALSE when it returns > and Logic #2: > if(!button & isProbing), then issue a STOP (same as pressing the STOP > button), and isProbing=FALSE
That is basically what I was suggesting, but the "isProbing" input to HAL is a digital output from G-code. Which GUI are you using? With Touchy there is a pin "touchy.abort" which is ideal for what you are wanting. I have also spotted "halui.abort" which should also work to stop the running .ngc program. It should be possible to use a latch component, set by the button and cleared on completion of the probe routine (mode.is-auto goes to false?) or on halui.abort going true. And yes, one button can drive both an MDI-command and a HAL input pin. But writing the isProbing pin from inside the .ngc stops the situation where the realtime code sees the button press but the userspace code (mdi_command) doesn't. -- 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, 1916 ------------------------------------------------------------------------------ _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users