I have written some simple hal components that set the index and then wait
for the index to be seen before continuing.. (like shape turning/boring)

probably not the greatest code....  Seems to work though..


Code snippet  (indexenable is hooked to index enable of encoder)

// only set index enable once
    if (enable && !isindex) {
        isindex = true;
        indexenable = true;
        return;
    }

// wait for spindle index before actually enabling
    if (enable && isindex && indexenable){
        return;
    }




On Thu, Nov 3, 2022 at 9:14 AM gene heskett <ghesk...@shentel.net> wrote:

> On 11/3/22 08:30, andy pugh wrote:
> > On Thu, 3 Nov 2022 at 09:23, andrew beck <andrewbeck0...@gmail.com>
> wrote:
> >
> >> looking for a way to set the index pulse high on the mesa card input
> before
> >> triggering a m19 for tool change as a safety check
> >>
> > The mesa index is a physical pin, so you would need to route out via a
> GPIO
> >
> > But I don't understand your analysis of the problem, or the proposed fix.
> >
> > If you just want to zero the encoder at a random point (which is what
> > toggling the index at a random point would do, if it did anything) then
> you
> > can do that via HAL.
> >
> > Is it possible that the problem is that the spindle is simply not "homed"
> > sometimes? ie it has not yet passed through index with the index-enable
> > set, so the encoder counts are not aligned to the index mark?
> >
> > In that case your tool change could run an explicit homing cycle prior to
> > toolchange.
> >
> > M64 P04  ; set index-enable
> > G4 P0.1
> > M65 P04 ; toggle the tristate back
> > M3 S100 ; spin the spindle briefly
> > G4 P1 ; wait for at least one full rev
> > M19 P0 ; carry on.
> >
> > As the index-enable is a bidirectional pin a bit of HAL is needed, using
> > the tristate-bit component.
> > That should be set up with the in-pin permanently high and the enable
> > connected to motion.digital-out-NN (NN = 04 in the example above)
> >
> An interesting thread Andy.
>
> I've considered doing something to aid in tool changing on my go704
> which has an R8 spindle.
> But the spindle locking consists of a home made clamp ring carrying a
> spring loaded pin  I clamp
> to the outside of the spindle housings bearing barrel when I want to do
> a lot of it. It engages a
> 6mm hole in the spindle nose to immobilize the spindle while cranking on
> the drawbolt.
> It also carries the camera I'd like to use for edge finding, but the fix
> that made the camera
> work a couple months back, apparently never made it into master, so the
> camview tab is once again a
> blank white screen. Insert frustrated Sigh here.
>
> Is there an unwritten rule that says it's never going to work in linuxcnc?
>
> Not mounted ATM because it can get in the way.
>
> And, using an an 8 point 10mm socket in an impact screw driver, the
> impact is good enough to get an
> R8 tight just by grabbing the spindle by hand. If I could find a pin
> driver small enough to push the
> locking pin in, and use something like the above to engage the pin, then
> cause the spindle to move
> until the pin drops in then turn it backwards to assure full penetration
> of the pin, then I'd be tempted
> make a motorized suspension to disengage the socket when the tool has
> been changed, or to drop
> the socket onto the drawbolt to be used in a semi-auto mode.
>
> Sawing the handle off the tool, and rigging a pair of  dc to dc SSR's in
> place of the tools
> trigger and direction switches, would allow me to actually change a tool
> with only 2 hands.
> Normally it needs at least 3...
>
> And by activating the spindle with a zero speed, would hold it
> stationary enough for the
> ratchet screwdriver to do the job. I do not do that now as a stopped
> spindle is free.
>
> Sawing  up the tool itself is a minor problem. Picking a tool to saw up
> presents a long term
> problem because the batteries fail and replacement batteries can't be
> found 5 years later.
> Either that, or add yet another psu big enough to sub for the battery.
>
> A 20 volt tool head should run on a 24 volt supply scavenged from a 3d
> printer, so those
> are cheap enough. So are motors, belts, and linear bearings from failed
> 3d printers, which
> I have a house full of. So driving the tools vertical transport is only
> a problem if I can't print it.
> The Z drive from a dead printer could supply all of that. And that stuff
> I have underfoot.
>
> Progress reports as it happens. ATM I'm rebuilding bigger 3d printers,
> waiting on parts.
>
> And fix my camview, again. Please...
>
> 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, 1940)
> If we desire respect for the law, we must first make the law respectable.
>   - Louis D. Brandeis
> Genes Web page <http://geneslinuxbox.net:6309/>
>
>
>
> _______________________________________________
> 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