On Sun, 24 May 2020, John Dammeyer wrote:
Date: Sun, 24 May 2020 21:41:33 +0000 (UTC)
From: John Dammeyer <jo...@autoartisans.com>
Reply-To: "Enhanced Machine Controller (EMC)"
<emc-users@lists.sourceforge.net>
To: "'Enhanced Machine Controller (EMC)'" <emc-users@lists.sourceforge.net>
Subject: [Emc-users] Encoder HAL programming.
The
http://linuxcnc.org/docs/html/examples/spindle.html#_spindle_feedback
document lists this example code with a footnote on the use of encoder.3
"In this example, we will assume that some encoders have already been issued
to axes/joints 0, 1, and 2. So the next encoder available for us to attach to
the spindle would be number 3. Your situation may differ. "
The document isn't clear to me on this. If I do not have encoders issued for
axes/joints 0,1,2 then can the spindle use encoer.0? Or are those numbers
reserved for the existing axis anyway? Which I guess doesn't make sense
because then there would also have to be encoders for axis a,b & c and the
spindle would start at 6. I've probably answered my own question.
But if the spindle encoder is declared in the hal file first, as encoder.0,
does that make x,y & z then encoder.1, encoder.2 and encoder.3?
Or by default if encoders are used with x,y &z are they then by default 0,1 &
2? And even if declared in the hal file in a different order must be
allocated as 0, 1 & 2?
Enquiring minds need to know.
Thanks
John
Encoder numbering (like most hardware including stepgens/pwmgens etc) is
_entirely arbitrary_
When instantiated, they are often instantiated by count so you get 0 .. N-1
range.
Peter Wallace
Mesa ELectronics
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users