|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: Consistent Encoder RPM Issues
Quote:
This link might help: http://firstforge.wpi.edu/sf/go/artf...v=1&_pagenum=1 |
|
#2
|
|||
|
|||
|
Re: Consistent Encoder RPM Issues
Quote:
|
|
#3
|
|||
|
|||
|
Re: Consistent Encoder RPM Issues
Without recompiling, just setting everything up I am getting a spread of 1100 rpm at max speed. Between 5200 and 6300 rpm so the same issue as the encoder class with pretty much the same spread. I am unsure of how to handle the FPGA but I will keep digging around. Thanks to everyone who has helped out so far. You guys showed up quick!
|
|
#4
|
||||
|
||||
|
Re: Consistent Encoder RPM Issues
Quote:
|
|
#5
|
||||
|
||||
|
Re: Consistent Encoder RPM Issues
You have to recompile the parts you change, I guess. I've not done this with C++. Do you have a guru you could ask?
|
|
#6
|
|||
|
|||
|
Re: Consistent Encoder RPM Issues
I do not at this moment but yes if I am to change the C++ I will have to recompile. Lets see how difficult this is. I'll post back as soon as I figure something out. I'm sure there's at least a semblance of a guide on compiling it. The link you posted is immensely helpful. The changes will be simple.
|
|
#7
|
|||
|
|||
|
Re: Consistent Encoder RPM Issues
Quote:
|
|
#8
|
||||
|
||||
|
Re: Consistent Encoder RPM Issues
Quote:
|
|
#9
|
|||||
|
|||||
|
Re: Consistent Encoder RPM Issues
If you're having issues recompiling WPILib, you can do this more simply by grabbing copies of Counter.cpp and Counter.h and renaming the files and class from "Counter" to something like "AvgCounter". Then add them to your workspace and make a code change similar to the java one in the FirstForge link. In fact, I'd recommend doing it this way since it's a lot simpler than recompiling WPILib. It's what I did when I wanted a modified version of the PIDController and the PIDSubsystem classes.
|
|
#10
|
||||
|
||||
|
Re: Consistent Encoder RPM Issues
Quote:
The one thing to watch out for is the size of your flag (the tape or what have you). Too small and you might not see it as it flashes past. We had good results with about 30 degrees of coverage. |
|
#11
|
||||
|
||||
|
Re: Consistent Encoder RPM Issues
I see what you mean about the wiring.
Encoder mounting looks better than I imagined. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|