![]() |
US Digital Encoders - How many CPR?
Forgive me, I'm not a programmer and my students won't be here until this afternoon. This is a rather simple question but I couldn't find the answer. Can we use any number of count US Digital Encoders with Java? The students asked me to purchase 250 count, but I'm wondering if some lesser count would be better for high speed things. Is Java set up to use any number of count encoders? We may need to read three simultaneously if that makes any difference.
|
Re: US Digital Encoders - How many CPR?
The FPGA can decode approximately 153k edges per second and can handle 8 single channel counters and 4 two channel encoders simultaneously (each at 153k). If you're using a quaderature encoder (with four edges per count, the max is approximately 38k). This is the same across all languages. Neither the FPGA or the code care how many counts the encoder is, as long as it doesn't exceed 153k/38k limit. If you're running a shooter that only runs in one direction, you only need to use a single channel of the encoder with a counter object.
There is good discussion in the following thread about how the FPGA's clock rate affects the noise in measuring periods at high speed. http://www.chiefdelphi.com/forums/sh...d.php?t=112193. I recommend playing with the spreadsheet that Ether posted in that thread. The averaging feature used in that spreadsheet isn't user-accessible in Java, without recompiling WPILib. It wouldn't be hard to add, however. Without using averaging, it is better to use a lower count encoder. |
Re: US Digital Encoders - How many CPR?
Thanks for the help Joe. You posted just in time before I had to put the order in.
|
Re: US Digital Encoders - How many CPR?
Quote:
So shouldn't the max be 153K/2 instead of 38K? Or do the two FPGA channels get tied together somehow when you configure them for quadrature decoding, so that each channel is no longer capable of 153K? |
Re: US Digital Encoders - How many CPR?
Quote:
|
Re: US Digital Encoders - How many CPR?
Quote:
|
Re: US Digital Encoders - How many CPR?
Quote:
|
Re: US Digital Encoders - How many CPR?
Quote:
But the encoder will not work if the elapsed time between rising edge on channel A and rising edge on channel B (or vice versa) exceeds 1/153KHz seconds, because the FPGA won't be able to tell which came first. That's where the 38K limit comes from. |
| All times are GMT -5. The time now is 10:03. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi