On 11/3/22 14:50, andrew beck wrote:
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.
Which leads me to suspect that your list of addf's in the .hal file might
be out of order.
You want an order that gets the hardware state first, then what you do to
it next and finally if something is waiting on this signal to do
something else,
it is all in a 1,2,3,4 order, top to bottom so the the final result fed
to whatever depends on
it, is developed on the same 1 millisecond the chain reaction started with.
Strange things can and often will happen when a signal has to jump back
up this list to get to the next module. Everytime it has to jump backwards
up the list to get to the target adds another millisecond to the
response time
because the correct state has to wait for the next pass thru the thread.
Do that 3 or so times thru a timing critical path will lead to fun and
games,
for a millisecond or more before the final desired output is actually
established.
Ghosts that bite you .1% can be exasperating to find, but printout your
hal, follow
the signal path in hal, and put the position # beside that modules addf.
You have it right
when a given signal ends up in the order its used. Check 'em all.
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
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