During the preperations for our off season competition I encounterd a problem with our shooter encoder.
At the competition we worked with the E4P optic encoder but when I checked the data after the competition I discoverd it isn't right, the encoder was mounted directly on the miniCIM's shaft that was connected directly to the wheel that spins the shooting belt, at low RPM (to measure RPM I enterd at the BEGIN.vi 1/6 to the distance) the data was good but as we got into bigger range (3000+) the input from the encoder went crazy, sometimes there was a 1000+ differnce between two continous readings.
I decided to change the encoder because I was sure that the problem is hardware, we changed it into a AS5145B Magnetic Encoder, we connected the encoder just like the manual and WPI (
http://wpilib.screenstepslive.com/s/...control-system) said. I changed the BEGIN again to match it to the example (encoding with 4X mode) but the same problem reacured.
I placed the reading from the encoder in the Timedtasks.vi at a different loop with a 100ms delay.
Added here is the graph of the rate that I got from the encoder when I gave the motor full power.