FIRST Robotics Competition Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with using encoders

We are using the 2009 LabVIEW Encoder Example program to test our encoders.

We are having a strange problem with getting an encoder to work.

We have two Bourns encoders labeled:

“ENA1J-B28”

“L00100L”

“0828M MEX”

There are 5 pins on the back of the encoder.
The first three pins are wired with a PWM plug attached and are providing the power and the signal for the first DI channel.
One pin is skipped and the 5th pin is providing the signal for the second DI channel.  There are no wires attached to the PWR and the (-) pins on the second DI channel.

I connected an encoder to the Digital Inputs 1 & 2 as defined in the example program.

I ran the program from my laptop and it downloaded to the cRIO and when I turned the shaft on the encoder the display showed it going forward and reverse properly.

I went on to many other things for the next week or more.

We wanted to demonstrate some hardware interactions with the students.

The encoder did not work.  I was afraid that I had damaged the encoder somehow.

We wired up the second encoder.  It did not work using DI 1 & 2.

Just out of curiosity I changed the program and the encoder to DI 3 & 4.  It worked.

I tried the first encoder on DI 3 & 4.  It did not work.  And, the second encoder would not work either.  Even though it had at first.

I tried the “working” encoder on DI 5 & 6 and it did not work.

Does anyone have any suggestions?

Thanks

0 Kudos
Message 1 of 3
(4,242 Views)

Robot215,

          I'm sorry that you're having so much trouble using the Encoders. I'm trying to figure out if this is a software or a hardware issue right now. Have you changed the Encoder Example in any way other than changing the input parameters for the DI Channel? If not, then it could be an issue with the Digital Sidecar. What are the status lights on the sidecar doing (lower left corner BAT 5V 6V)? Are they lit? It sounds like you had the encoder hooked up correctly but could you just double check that the proper wires were used on the DI connector. Also, battery levels could affect hardware issues. Check to make sure that the battery is fully charged. Just let me know some of these answers and I will continue to work on this issue on my end. Thanks!!

Grant Heimbach

Applications Engineer

0 Kudos
Message 2 of 3
(2,875 Views)

Sorry that it took so long to get back to you but I did a lot of detailed checking and found that each of the two encoders had a wiring problem.  NOT the same problem for each.

The encoders work now with the encoder example program.

Thanks for the offer to follow up.

Mike

0 Kudos
Message 3 of 3
(2,875 Views)