Go to Post Baker, you're making my head hurt and it's only August!!!! - Rich Kressly [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Spotlight this post!  
Unread 08-03-2013, 11:27
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,043
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Encoder getRate question

Quote:
Originally Posted by JefferMC View Post
On encoders for shooting wheels, you may wish to watch out for the maximum RPM the encoder can handle. There are both electrical and physical issues there.
For US Digital E4P encoders, the limit is 60,000 rpm or 3,600,000/CPR, whichever is less.

Quote:
You can also approach the granularity of the VxWorks timer, which I believe has a resolution of 6 us.
The FPGA handles encoders. Vxworks is not involved.


Quote:
Since GetRate() gives you the inverse of the time between the last two ticks, with a resolution of about 6 us, this caused us some issues with oscillation between two substantially different returned values for RPS.
For a high-speed one-direction application like a shooter wheel, do not use getRate(). Use getPeriod() from the Counter class. Make sure you physically connect only Channel A. Leave Channel B disconnected. Create an up/down counter counting rising edges only.

See the attached example calculation of a 250 CPR encoder set up this way and spinning at 5000 rpm, showing the effect of the 6us polling period of the FPGA when the ring buffer is set to 125 samples (1/2 of a revolution).

Quote:
Using the FPGA with the ring buffer may help with this, but we opted for the x1 resolution.
1X decoding of an encoder still requires detecting the rising edges of both channels, which limits your speed.


Attached Thumbnails
Click image for larger version

Name:	5000rpm 250CPR 125N.png
Views:	41
Size:	9.7 KB
ID:	14294  
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 11:11.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi