Quite many pulses need to be counted and servo thread is run quite often. For eight bit resolution which is rather low 256 pulses must be counted in the time delta there speed is measured.
Nicklas Karlsson On Thu, 26 Mar 2015 13:23:29 -0700 (PDT) "Peter C. Wallace" <p...@mesanet.com> wrote: > On Thu, 26 Mar 2015, Les Newell wrote: > > > Date: Thu, 26 Mar 2015 14:00:10 +0000 > > From: Les Newell <les.new...@fastmail.co.uk> > > 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] Velocity closed loop + Position losed loop on an > > axis > > > > Recently I used an encoder for both velocity and position on a > > specialist application (not using LinuxCNC) and it worked very well. > > Velocity is calculated by measuring the time between successive encoder > > counts. This application uses a very coarse encoder (144 counts/rev) and > > it only runs at low speed (<200RPM). I'm not sure how well that would > > translate into a LinuxCNC application. For higher resolution encoders at > > higher speeds you need a very fast timer. > > > > Les > > > The LinuxCNC software encoder counter and at least the Mesa and Pico Systems > hardware encoder counters have DeltaCounts/DeltaTime velocity estimation. > > This calculates the velocity based on the number of counts per servo period > divided by the time between counts (time is measured with a high speed timer > built into the encoder counter) > > You dont need a terribly fast timer because at higher speeds, you are not > measuring the time between single counts but rather between the first and > last > of many counts > > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming The Go Parallel Website, sponsored > by Intel and developed in partnership with Slashdot Media, is your hub for all > things parallel software development, from weekly thought leadership blogs to > news, videos, case studies, tutorials and more. Take a look and join the > conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > Emc-users mailing list > Emc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/emc-users ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users