I’ve worked with an encoder last year without any troubles, but I can’t seem to figure out what’s wrong this year.
I have the 8-slot cRio reconfigured and modules swapped (from last years positions) to what they should be as noted by FIRST. I tested with the new ribbon cable and the old thick cable (from cRio to digital sidecar).
Our robot is near-fully functional. All the PWM signals work great. Analog works, etc. The trouble is the digital inputs and it’s not just the specific one on the bot because I tried with a couple. I wired up an encoder (two of them actually and I’m 101% sure the wiring was correct (I checked multiple times and then with the help of a mentor used an oscilloscope to make sure the encoders were functional as well). Even tried hooking up our old robots encoders to the sidecar and still no luck-
Our code gave no feedback from the encoders. They were initialized properly and started properly so I’m sure nothing is wrong with code. Then I tried the FRC LabVIEW Motor with encoder example and ran it. Motor outputs are fine but the encoder gave feedback this time. However, what happened is that it went from 0 to 0.003 something and back to 0, continually oscillating between the two whenever there was an output to the motor (and the shaft was actually spinning). At the bottom of the example the encoder alarm is always: “stopped” rather than moving.
Does anyone have any clue to what may be wrong or what I’m doing wrong? The digital sidecar is plugged into module 2 of the cRio, recognized as Digital Module 1 in LabVIEW. Any help is greatly appreciated
I really have a feeling it might be the cRio / digital sidecar or some other wiring problem between the cRio and sidecar. I tried it on different channels and made the code adjustments and no luck with that either and again I’m sure its not the wiring of the encoder to the channels.
Before leaving, I tried a limit switch and did not see any response to pushing it, in the FRC PC Dashboard for GPIO state with the robot enabled.
Congratulations on going that far with your troubleshooting.
Then I tried the FRC LabVIEW Motor with encoder example and ran it. Motor outputs are fine but the encoder gave feedback this time. However, what happened is that it went from 0 to 0.003 something and back to 0, continually oscillating between the two whenever there was an output to the motor (and the shaft was actually spinning). At the bottom of the example the encoder alarm is always: “stopped” rather than moving.
Can you tell us exactly how your encoder is wired? It sounds like at least one of the phases isn’t getting through to the Digital Sidecar.
Just curious – have you tried running with one single encoder (A and B inputs) plugged in at a time, and no other digital inputs? How are you attempting to read the output data – in an Indicator within Periodic Task VI, or maybe on the Dashboard?