|
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.
|