I want to preface this post by stating that I am not a programmer, I am just posting for my team’s programmer. I was told that he could not find any ‘libraries’ or code to receive encoder values. We want to use the versaplanetary integrated encoders with talon SRXs and 775pros. He said that he could not even retrieve the encoder values, so there was no point of him trying to create code for the encoders. The purpose of the encoders would be to make sure that two independent arms are synced in their movement when we climb the HAB. Any prefabricated public PID loops for this would be greatly beneficial, as we are competing this weekend. Thanks in advance for any who can help.
CTRE conveniently has examples for encoders as well as anything else with talons. You can also set one of the talons to follow the other so they will do the same thing. I would recommend going with the motion magic for your arm if you choose to go that route.
If you want to feed the encoder values directly to the motor controllers that’s fine. You also have the option of wiring encoder wires to the roboRIO’s DIO ports and reading the encoder values in your program.
There are examples showing how to code the encoders this way installed with LabVIEW which you can get to by: Any LabVIEW window -> Help -> Find Examples -> FRC Robotics -> roboRIO -> Digital -> Encoder.lvproj or Motor with Encoder.lvproj.
You can get to the encoder functions pallet by right clicking on the block diagram -> WPI Robotics Library -> Sensors -> Encoder.