Hey Andy your on to it.

I want to run a explicit homing cycle every tool change

Currently the tool change spindle zero point gets set the first time the
index gets set.  Which happens when I turn spindle on


So it's a good effort from linuxcnc really to work at all I guess.

As it keeps track in spindle orientation at 10000rpm for hrs on end.

Just sometimes something happens and then it tries to spindle orientate 40
degrees out.  So I really need to home every tool change.

I'll post my gcode toolchange file and make a diagram of my set up.

I'm getting some funny behaviour with reading inputs with gcode to.

It's like they are not actually waiting for the input to read true.


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.

On Fri, 4 Nov 2022, 01:33 andy pugh, <bodge...@gmail.com> 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)
>
> --
> 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

Reply via email to