|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
|
|
#1
|
|||
|
|||
|
Re: E4P encoder
We have A and B hooked up to the digital I/O pins. As far as programming goes, I used the Open Encoder.vi that came with the FRC tools in our Begin.vi. I hooked that to the StartEncoder block, then wired to a To Digital Source. I have the GetEncoder block in my teleop code, and I have a display off the encoder rate node. However, when we run the program and spin the shaft, we get no reading. I will upload a screenshot of the program and/or a photo of our wiring later today when our programming computer is available.
|
|
#2
|
|||||
|
|||||
|
Re: E4P encoder
Did you ENABLE the robot? Your Teleop code probably doesn't run if the robot is DISABLED.
|
|
#3
|
|||
|
|||
|
Re: E4P encoder
We did enable it using the FRC driver station software. Motors were responding to joystick, everything worked except for the encoder.
|
|
#4
|
||||
|
||||
|
Re: E4P encoder
Check the encoder A and B wires with a digital multimeter. You should see them transition between 0V and 5V as you touch the encoder. It doesn't take much to get the voltage to change, since there are 360 pulses per revolution.
If you don't get any changes on either the A or B, double check that you are getting a bright red light in the encoder. Check the spacing between the disc and the red light, it can't be too close or too far. Then check if you haven't accidentally ripped the connector traces our of the encoder. The white plastic connector on the encoder PCB is fragile, and can only take so many connects and disconnects... if not done very carefully. |
|
#5
|
|||||
|
|||||
|
Re: E4P encoder
Try looking at both Rate and Distance in software. If Distance works fine (and counts correctly, up and down) but Rate returns 0, that is a known bug in the encoder library.
The only workarounds are to either write your own code based on the delta of distance and time between iterations, or allocate two encoders (since every other one works). Another modification I suggest to the default code is to open Robot Main.vi, and look to for where it calls Disabled. Place a call to Teleop after disabled, and wire it in parallel. In Disabled, stop setting the outputs to 0. This will allow you to run your code, and probe the wires and outputs, without enabling the robot. |
|
#6
|
||||
|
||||
|
Re: E4P encoder
Hey rockie team 3574 here
So how do you mount the encoders using the base that they come with |
|
#7
|
|||||
|
|||||
|
Re: E4P encoder
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|