OK, now I think I'm starting to wrap my head around why it is not working.
 Even with my software encoder sampling on the base-thread, with this line:

addf hm2_5i23.0.read servo-thread

updated I/O values were only being read from the 5i23 on the servo-thread.
 A bit counter intuitive to me, but clear in hindsight.  I presume I could
remedy this by running the  hm2_5i23.0.read function on the base-thread.

Peter: I know you have advised against this approach as inefficient use of
the PC's CPU, but presuming it is workable performance-wise, is there any
functional reason I should not do this? Would I also want to do it for
hm2_5i23.0.write
or is there no need?

Thanks much,

Scott

On Sat, Mar 17, 2012 at 10:55 AM, Peter C. Wallace <p...@mesanet.com> wrote:

> On Sat, 17 Mar 2012, Scott Hasse wrote:
>
> > Date: Sat, 17 Mar 2012 10:43:56 -0500
> > From: Scott Hasse <scott.ha...@gmail.com>
> > Reply-To: "Enhanced Machine Controller (EMC)"
> >     <emc-users@lists.sourceforge.net>
> > To: "Enhanced Machine Controller (EMC)" <emc-users@lists.sourceforge.net
> >
> > Subject: Re: [Emc-users] Voltage to frequency for analog input
> >
> >> But this is really really wasteful
> >
> > Presuming my PC can handle a reasonable base-thread rate, is it really
> > wasteful of a scarce resource?
>
> Depending on the thread rate, you may use 20% or more of your PCs
> horsepower
> doing I/O. Also the hardware encoder counter will do a better job of
> frequency
> counting, even high res counting of low frequencies (it uses a 1MHz
> timestamp
> for inverse time frequency calculation) than the software encoder counter
> (which uses the jittery basethread for timestamping).
>
>
> >
> > It seems if I want to use a "real" encoder counter given my configuration
> > I'll need a custom 5i23 firmware?
>
> Possible but since you only need one more encoder counter, theres possibly
> a
> bitfile that will do (depending on what other functions you have)
>
> >
> > Thanks!
> >
> > Scott
> >
> > On Sat, Mar 17, 2012 at 10:01 AM, Peter C. Wallace <p...@mesanet.com>
> wrote:
> >
> >> On Sat, 17 Mar 2012, Scott Hasse wrote:
> >>
> snip----------------------------------------------------------------------
> >>>
> >>> It acts like it is sampling the encoder at the servo-thread frequency,
> >>> despite the update-counters function being bound to the base-thread.
> >>  When
> >>> I view the configuration from axis, the base-thread does show the
> >>> encoder.update-counters
> >>> function bound to it.
> >>
> >>
> >> You probably are sampling at the servo thread, to avoid this you would
> >> have to
> >> do the the hm2_read at the base thread.
> >>
> >> But this is really really wasteful, much better to use a real encoder
> >> counter
> >> (and dump the base thread sucking computer resources altogether)
> >>
> >> Peter Wallace
> >>
> >>
> >>
> >>
> ------------------------------------------------------------------------------
> >> This SF email is sponsosred by:
> >> Try Windows Azure free for 90 days Click Here
> >> http://p.sf.net/sfu/sfd2d-msazure
> >> _______________________________________________
> >> Emc-users mailing list
> >> Emc-users@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/emc-users
> >>
> >
> ------------------------------------------------------------------------------
> > This SF email is sponsosred by:
> > Try Windows Azure free for 90 days Click Here
> > http://p.sf.net/sfu/sfd2d-msazure
> > _______________________________________________
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users
> >
>
> Peter Wallace
> Mesa Electronics
>
> (\__/)
> (='.'=) This is Bunny. Copy and paste bunny into your
> (")_(") signature to help him gain world domination.
>
>
>
> ------------------------------------------------------------------------------
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here
> http://p.sf.net/sfu/sfd2d-msazure
> _______________________________________________
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to