Looking at: https://linuxcnc.org/docs/html/gcode/m-code.html#mcode:m66
Should there not be a Q in front of the 10 in your line below for a timeout of 10 seconds? M66 P0 L2 10 If I were to do this then I have this in my hal filev which shows which pin is encoder index: #IO Connections for P1 #DBn.m_PMDX_Jn.m I/O Pri. func Sec. func Chan Pin func Pin Dir # P2.13_J11.7 33 IOPort QCount 1 Quad-IDX (In) Encoder-Index Then in the hal file I add: net spindle-index-in motion.digital-in-00 <= hm2_7i92.0.gpio.033.in Finally the G-Code would look like this? S10 M3 M66 P0 L2 Q10 M5 T__ tool change... Or have I missed something? Thanks John > -----Original Message----- > From: andrew beck [mailto:andrewbeck0...@gmail.com] > Sent: November-08-22 2:20 AM > To: Enhanced Machine Controller (EMC) > Subject: Re: [Emc-users] triggering the mesa card encoder index pulse > > Hey andy. > > I was just having a play and I can actually just sense the input-index pin > directly. With > M66 P0 L2 10 > I rotate spindle at 5rpm and wait until sensor changes state > > Then stop. > > > In my case this is a proxy switch. Not a encoder so I don't have to worry > about missing it. > > Anyway I tried that and it's orientating fine at the moment. > > And very simple compared to m19 stuff. > > I'll finish it tomorrow and might make a video to show you guys. > > On Tue, 8 Nov 2022, 23:15 andy pugh, <bodge...@gmail.com> wrote: > > > On Tue, 8 Nov 2022 at 04:50, andrew beck <andrewbeck0...@gmail.com> wrote: > > > > > > > > i am using the tristate bit but getting a bit confused on how it works > > > > > > > It only drives the output to the input when enable is true. > > > > You want to set the indes-enable pin high, and then stop writing to it so > > that the rest of the system can do its thing. > > > > So set input permanently high. > > Then toggle enable on and off. > > Then rotate the spindle until index-enable is driven false. > > > > -- > > 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 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