View Single Post
  #1   Spotlight this post!  
Unread 06-02-2015, 10:05
JackVaughn23 JackVaughn23 is offline
Registered User
FRC #5727
 
Join Date: Feb 2015
Location: North Carolina
Posts: 3
JackVaughn23 is an unknown quantity at this point
CanTalonSRX Encoder Readings

Good morning, this is my first post to this forum so please bear with me. We are using a motor with an encoder on it connected to a CanTalonSRX. I am able to set values for the motor, but I am not able to get any values from the encoder. When I read the manual (CrossTheRoads) for the CanTalonSRX all of the methods that are using in the examples are for a CanTalon and not the CanTalonSRX. I can use the CanTalon methods to "set" items but anything I try to "get" it always returns a value of 0. When I look at the WPILib documentation for Java for CanTalonSRX all of the methods require arguments to be passed to the function that I have no clue what they are. For example,

GetCurrent(SWIGTYPE_p_double param)

I'm not sure what argument the method is wanting.

But on the other hand, the methods for a CANTalon are incredibly simple and most require no arguments and I would really love to use those methods if they would work with the SRX (the CrossTheRoad manual only examples CANTalon methods for use with the SRX).

Any help would be greatly appreciated, I apologize in advance if I left out any details needed.
Reply With Quote