Thanks for the reply.

here's my current setup:

7i76e input 4 -> X mechanical switch
7i76e input 30 -> X proximity sensor
7i76e input 5 -> Z mechanical switch
7i76e input 31 -> Z proximity sensor

INI file set up for home_use_index = yes

hal file additions:
loadrt encoder
addf encoder.capture-position servo-thread
addf encoder.update-counters servo-thread

net x-home-prox hm2_7i76e.0.7i76.0.0.input-30 encoder.0.phase-Z
net x-home-index-enables joint.0.index-enable encoder.0.index-enable

net z-home-prox hm2_7i76e.0.7i76.0.0.input-31 encoder.1.phase-Z
net z-home-index-enables joint.1.index-enable encoder.1.index-enable

I got it to work with this setup, but it seems like LCNC is catching the
first index pulse it sees, touching the mechanical switches, fine feeding
until it finds the prox pulse but then rapids back to the very first pulse
it found, which doesn't make any sense to me.

If I manually jog the machine close to where the home switches are, restart
LCNC then initialize a home sequence, it'll do what I expect it to do, but
if it's (as an example) 100mm from the home switch, it will search for the
switch, touch, back away, fine feed until it finds the closest proximity
pulse, then rapid back 100mm, so it's not very robust at this point.

I may just go back to using the mechanical switches and not worry about the
proximity. I'm running this machine on a raspberry pi and ever since I
connected the proximity sensors, LCNC has been crashing. Not sure if
there's a correlation, but that's been my experience. I'm going to
disconnect them and see if it's still crashing. I just wanted to try and
use the proximity sensors because they were installed on the machine
originally and I thought they would be beneficial.

Thanks again!

Phil T.
The Feral Engineer

Check out my LinuxCNC tutorials, machine builds and other antics at
www.youtube.com/c/theferalengineer


On Mon, Mar 1, 2021 at 12:51 AM Gene Heskett <ghesk...@shentel.net> wrote:

> On Sunday 28 February 2021 23:21:12 Feral Engineer wrote:
>
> > Hello Hive mind,
> >
> > Question for the group. I have an emco pc turn 55. I've successfully
> > gotten everything working 100% on LCNC with the exception of one
> > thing, the x and z axis utilize a mechanical limit switch to latch
> > home position, but then each axis has a pnp proximity sensor that
> > triggers the actual home position on a 1 ppr encoder of sorts. I've
> > just been using the mechanical switches, but I'd like to try and get
> > the proximity sensors working during the home sequence.
> >
> > Any suggestions on where to start getting this to work?
>
> Depending on your preference I would wire separately if you've the inputs
> to spare. But combine them in a mux2 module such that the both have to
> be true (or go true in sequence) for your version of true so that when
> the switch closes, it backs up, slowly to find the proximity closure.
>
> You can search for the switch fairly fast, but if the proximity is a
> rotating shaft, you might go by it and miss it if you do not have a base
> thread. I'd have two signal wires from each axis, rigged so the
> normal "home" is that axis's switch, until it closes, and use the dir
> signal to switch a mux2, so it is then looking for the proximity switch
> on the "home" signal line back to motion.
>
> I have found normal far eastern micro switches are actually pretty
> consistent, fraction of a thou repeatable. In one case I used a micro
> sized pushbutton mounted of a leaf of hard alu about 3/4" long for the y
> home on my 6040, using the springiness of the alu as its lifted from
> solid contact with the frame as the edge of the gantry slams into it at
> around 60 ipm. Thinking I might trap debris under the "spring" but that
> has not occurred in 2 years. Checked with a .0001 dial, home is
> within .0002" every time. But without a base thread, the second search
> speed is set quite low since you only get a chance to sense it at
> millisecond intervals in the servo thread.
>
> If using such logic, be sure the addf's are in fall thru in the same
> invocation order.
>
> > Thanks in advance
> >
> > Phil
> > The Feral Engineer
> >
> > Check out my LinuxCNC tutorials, machine builds and other antics at
> > www.youtube.com/c/theferalengineer
> >
> > _______________________________________________
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users
>
>
> 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
>

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

Reply via email to