On Mon, Dec 20, 2010 at 01:34:43PM -0800, Kirk Wallace wrote:
> On Mon, 2010-12-20 at 15:11 -0600, Jeff Epler wrote:
> > My first impression is that there is no "an index occurred" output, so I
> > don't see how you would make it work with emc's index-enable model for
> > threading and home-to-index.
> >
> > Jeff
>
> A brief look doesn't indicate (to me) what it uses the index for (reset
> the internal counter?). My first guess is that I would leave it
> unconnected and route the index to EMC2 on another path. The index
> question seems to be the only deal breaker.
Index handling has to be done in the same place as the counting, so if
the counting is taking place in some chip, the index handling has to be
in there too.
the hal interface to encoders with index is (there may be a better
explanation somewhere in the docs):
when index-enable is high, and a rising edge of index is
encountered, (and the optional index mask is false), the count is
reset to 0 and index-enable is set to false
In terms of our smart hardware interfaces, there are a number of ways to
do it, but they all boil down to the requirement that you can tell
inside the PC that in a particular servo cycle. This is:
* an index occurred since the last servo cycle
* EITHER the number of counts since index
* OR the total number of counts since power-on AND the number of counts
latched when the index was seen (from which you calculate
counts-since-index by subtraction)
Without an "index happened" indicator, you can't even be sure from the
counts alone that index happened. If you just went through index in the
positive-going direction and reset, then you go through it in the
negative direction, the second reset will happen just when the counts
would naturally have been 0 anyway!
Without an "index happened" indicator that is latched exactly the same
as the counts, you can't be sure whether the counts you read now were
affected by the "index happened" register that you read just a moment
later (because the index could have arrived between the reads).
It's important that index handling be exact to the encoder edge instead
of exact to the servo cycle so that it is actually effective at giving a
high resolution snapshot of position or angle. For example if you are
only checking index at a 1ms (servo cycle) resolution, that makes
1600rpm threading vary its start angle by 9.6 degrees. If you use
homing with index, your encoder is turning at 3600rpm, and your
leadscrew is 5mm/revolution it introduces .3mm of uncertainty in your
homing.
Jeff
------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users