|
Encoder Glitchy Issue, Help Needed
Hi all, we are using LabView to run 2 encoders (currently) for our drive system, and we are having issues with glitchy incrementing values returned from the digital inputs or the code (the encoder distance counters increment when the encoder is stationary). Info below:
Configuration:
DIO 1 -- Ground, Power, Signal A for Encoder 1
DIO 2 -- Signal B for Encoder 1
DIO 3 -- Ground, Power, Signal A for Encoder 2
DIO 4 -- Signal B for Encoder 2
Observation:
When one single encoder is plugged into the above digital inputs (DIO1+DIO2 in use, with DIO3+DIO4 unplugged), the encoder works nominally. This is indicated by a healthy distance and direction indicator on our Dashboard and accurate readings when driving the robot.
HPlugging in either single encoder works correctly, however when we plug in the second encoder to our Digital Inputs, both encoders start outputting glitchy data.
Each encoder distance indicator quickly increments as if the robot is moving forward, and the direction indicator blinks erratically. We noticed that only one encoder will glitch at a time -- when the robot is stationary, Encoder 1 will quickly increment distance, and a few seconds later Encoder 2 will issue the same symptom.
I have attached the applicable code -- Begin.vi initates and resets the encoder. Teleop.vi does a GET then processes the output.
Has anyone run into this problem? I don't want to automatically suspect there's a problem with our Digital Sidecar, but we can't find an issue in code that would cause this problem since simply unplugging one of the encoders allows the other to run perfectly with the same code.
Note: Changing the "decoding type" does not resolve the issue.
Thanks for any help!
__________________
My FIRST legacy:
Team 204 Student 2001, 2002 (Voorhees, NJ)
Team 1493 College Mentor 2006 - 2008 (Troy, NY)
Team 2150 Intern/Professional Mentor 2007, 2009 (Palos Verdes)
Team 4123 Lead Engineering Mentor 2012 (Bellflower, CA)
Team 4276 Engineering Mentor 2012-2016 (Huntington Beach, CA)
|