Re: External interfacing/freqmod.o problems





John Murphy wrote:

> 2)Is there an easy way to enable/disable encoder feedback?  I'd like to
> initially
> just run "open loop stepper" and watch the encoder counts, without EMC
> complaining about the encoder not following, since initially the
> mechanical
> system does not have the two coupled.  Turning the encoders off would be
> OK.

If you are using software based on freqmod, I think the encoders are an
option, and it can use the real encoder data or simulate it from the
generated steps.  I don't know how to do this, whether it is an option
in the .ini file or in the compile defines.

> 3) Exactly how should the encoder functions be reporting position?  My
> encoder counter hardware counts 800 counts/rev, but will wrap at 16
> bits.
> Do I need to implement software to catch and hide this wrap assuming
> periodic execution at high enough rate to see the wrap, or does EMC have
> some way of handling this.

Ahh.  Look in the servo codes associated with the servo to go card.
It has 24-bit encoder counters, and overflows of this counter are
detected and used to maintain a full 32-bit signed count.  (Not that
many systems will exceed 24-bits of precision.)  You could use
the same technique to expand 16 to 32 bits.  they watch the two
most significant bits for change.  that way, they can tell the difference
between over/under-flows and rollover between negative and
positive numbers.  If only the next to most significant bit changes, that is

an overflow of the 23-bit count range they use.  If both MSBs
change, that is a rollover of the sign.

Jon




Date Index | Thread Index | Back to archive index | Back to Mailing List Page

Problems or questions? Contact