|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#16
|
||||
|
||||
|
Re: Encoders on Drive Train DON'T WORK.
Quote:
This is from WPILib Encoder class: Code:
/** * Common initialization code for Encoders. * This code allocates resources for Encoders and is common to all constructors. * @param reverseDirection If true, counts down instead of up (this is all relative) * @param encodingType either k1X, k2X, or k4X to indicate 1X, 2X or 4X decoding. If 4X is * selected, then an encoder FPGA object is used and the returned counts will be 4x the encoder * spec'd value since all rising and falling edges are counted. If 1X or 2X are selected then * a counter object will be used and the returned value will either exactly match the spec'd count * or be double (2x) the spec'd count. */ |
|
#17
|
||||
|
||||
|
Re: Encoders on Drive Train DON'T WORK.
Ah ok, good to know... In the RateDump1.txt attachment I posted earlier even the slower 10rps speeds were exhibiting the symptom using GetRate()... And using the GetDistance() technique any rps showed the symptom (e.g. turning by hand).
|
|
#18
|
||||
|
||||
|
Re: Encoders on Drive Train DON'T WORK.
|
|
#19
|
|||
|
|||
|
Re: Encoders on Drive Train DON'T WORK.
Have you ensured you have wired it correctly? Can you get your two robots together and plug the known good encoders into your new robot, and vice versa, to test where the difference lies?
|
|
#20
|
|||||
|
|||||
|
Re: Encoders on Drive Train DON'T WORK.
Quote:
Quote:
Quote:
Quote:
Quote:
The encoder wires we are using for the drive train are soldered together the same way the encoder wire for our shooter is, which works. (1 PWM white-yellow, the other PWM black-brown, red-orange, and blue-white) We have even replaced one of the encoder wires that we believed was faulty with no results. |
|
#21
|
||||
|
||||
|
Re: Encoders on Drive Train DON'T WORK.
We solved quite a few mysteries tonight, and I figure I should share here in case anyone else happens to find yourself in a similar situation.
We were able to work with the shooter encoder and work out the following: 1. The shooter encoder itself worked, but was damaged and impacted its reading (I'll address this in more detail in thread 103631)... we fixed the damage and with this good connection determined several points of failure: 2. Determined all 3 wires (2 drive, one shooter) all valid 3. The encoder on the right driver side does not work period (defected) 4. Slots 1-4 and 9-12 all do not work on the digital side car I left at the moment we swapped the dsc, so hopefully tomorrow we'll be able to work this out. Thanks everyone for your help and be sure to go over to 103631 for the shooter as I believe this will impact more people if their shooter vibrates a lot like ours. |
|
#22
|
|||||
|
|||||
|
Re: Encoders on Drive Train DON'T WORK.
That sounds like you might have a faulty cable between the cRIO's DIO module and the Digital Sidecar. Is it a Kit of Parts ribbon cable that you reworked? It's not hard to put it back together with some of the pins not quite connected.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|