Encoder keeps stopping?

Hey. Today I wired our encoder to the sidecar with two PWMs:

+5 (orange) = PWR of #1
A (blue) = SIG of #1
Gnd (brown) = GND of #1
B (yellow) = SIG of #2

and after wiring it I intergrated the Encoder Example to the default robot project. When I ran the code, I went to teleop to check the indicators, and they were all zero, plus it said that the Encoder Stopped. So I tried adding a joystick button that when pressed called the Start VI of the Encoder. What happened is that every time I hit the button to start the Encoder, the distance went down by 0.25. I tried changing the Decoding Type from 4x to 1x and then the distance went down by 1, so I believe it goes down by 1/Decoding Type.

What can cause this problem? Is the wiring okay?

Thanks.

Did you actually run the Encoder example and make sure it worked? That would verify your wiring.

I ran the Encoder example a few minutes ago and got the same results. (The “Alarm Status” says “Encoder Stopped” and the values don’t change)

Is the wiring mentioned in the original post okay?

Assuming you’re connecting to DIO pins (and not Relay or PWM pins), the wiring described in the first post should work.

Is there actually 5V on the center DIO pin? Check the 5V LED on the Digital Sidecar. While you’re at it, check the 6V and BAT LEDs too. Are they all lit? How about the Robot Signal Light?

i know it sounds stupid, but try unplugging and replugging the encoder wires from the encoder itself. We had a similar problem, and for whatever reason that worked. Also, if this doesn’t work, try reading the digital outs on the front panel. Both should be flashing when you run the motors.