On Tuesday 17 November 2020 04:22:01 andy pugh wrote: > On Mon, 16 Nov 2020 at 20:59, Alan Condit <condit.a...@gmail.com> wrote: > > However, when I read the instructions on G38.2 it talks about the > > switch opening. Can I invert the probe signal and use it for switch > > closing? > > Where are you reading? The G38 docs don't talk about opening or > closing, they talk about contact and loss of contact: > http://linuxcnc.org/docs/2.8/html/gcode/g-code.html#gcode:g38 > > The HAL pin probe-in should go high on contact. How that is achieved > electrically and HALogically is implementation dependent.
Which is why I suggested using the in_not pin if its available. The spindle is generally grounded and using the bit of pcb for a contact results in a logic 0 on contact. Feed that into the in_not pin. If using a std bob input the not module MUST be above anything in the addf order hat uses it else the approach velocity error gets out of hand, and you may damage the pcb with the first approach from the resultant servo-thread timed overshoot. I also invert that when hole finding where I have a 3/4" teflon rod holding a length of 12 gauge copper wire with the probe wire separated into half the strands on either side of the probing wire and twisted back together. I run the spindle backwards at 500 or so revs, and probe all 4 quadrants then center it both ways and touch off. And I regularly can rerun the holefinder code with no more than .0002" of error either way the 2nd time. There, because the probe is spinning, I have a capacitor on the probe input that is discharged by a microsecond contact, and still has not recharged the capacitor by the time the servo-thread read rolls around at the next random millisecond. But because my spindles aren't fixed, I use the pcb method for setting TLO's. Cheers, Gene Heskett -- "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) If we desire respect for the law, we must first make the law respectable. - Louis D. Brandeis Genes Web page <http://geneslinuxbox.net:6309/gene> _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users