Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   EP4 Encoder (http://www.chiefdelphi.com/forums/showthread.php?t=101646)

Fishpaste108 31-01-2012 18:28

EP4 Encoder
 
The encoders i am trying are:
  • E4P-360-236-D-H-T-3
  • E4P-250-250-D-D-D-B

I seem to be having a software issue when it comes to encoders listed above. I have a series of problems that occur when debugging.

1. The values from the encoder are increasing or decreasing based on whether the robot is enabled or not
2. The values from the encoder are all 0
3. The values of the encoder continuously decrease but stop decreasing when the motors are spinning

My team has ruled out any wiring issues.

We are programming in C++ via Windriver. All software is up to date. We are using the encoder class the the WPILib. I start the encoder in the robot init. Reset it upon entering tel-op. I retrieve the values via GetRaw(), Get(), GetDistance(), and GetDirection

Please let me know if anyone has had this problem and/or knows of a solution. Thanks!

enrique 31-01-2012 23:00

Re: EP4 Encoder
 
A run away encoder. hmmm thats a new one.
Could there be something wrong with the way it is attached and maybe its continuing to spin with what ever momentum it picked up?

Fishpaste108 01-02-2012 06:58

Re: EP4 Encoder
 
We have tried multiple of the same types of encoders all to no avail

Alan Anderson 01-02-2012 08:34

Re: EP4 Encoder
 
Quote:

Originally Posted by Fishpaste108 (Post 1117315)
We are using the encoder class the the WPILib. I start the encoder in the robot init. Reset it upon entering tel-op.

Don't reset it. You'll always read zero if you don't let it count.

Fishpaste108 01-02-2012 13:45

Re: EP4 Encoder
 
I will try that thanks

Fishpaste108 02-02-2012 15:36

Re: EP4 Encoder
 
I got rid of the reset but i am still having problems :/

Fishpaste108 02-02-2012 15:38

Re: EP4 Encoder
 
Does it matter where on the digital sidecar it is plugged into? I have been using ports 5 and 6. Experimented with 1 and 2 with the same results

Alan Anderson 02-02-2012 16:00

Re: EP4 Encoder
 
When you put the code wheel on the shaft, make sure you install it correctly. The side with the pattern goes toward the sensors on the encoder circuit board. It should fit the shaft very tightly so it's not going to slip. And you need to put it at the proper height off the board. Too far and it won't be read properly. Too close and you risk damaging the code wheel as it scrapes on the mounting screws.

If you were programming in LabVIEW, you could try the Motor With Encoder example to verify the proper wiring. Since you're using C++, that's not an easy option. Can you tell us exactly how the encoder is connected? Where does each wire go? You say the team has ruled out wiring issues, but that doesn't mean the team is correct. :-)

Fishpaste108 02-02-2012 16:19

Re: EP4 Encoder
 
I'm pretty sure the encoder is installed correctly. As for wiring the first wring plugging into the encoder is orange and plugged into a PWM cable for the Digital sidecar. The second wire is blue hooked up to the signal wire of the PWM cable. The third wire is brown and connected to the ground part of the PWM. The fourth wire is yellow and hooked up to a standalone wire connected to the signal port of another slot on the digital sidecar. The PWM is connected to slot 5. The standalone signal wire is slot 7. I have made sure the code matches up with the port numbers they are plugged into


All times are GMT -5. The time now is 13:26.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi