Go to Post Remember. There is no controls team, no mechanical team, and no business team without The Team. - Tom Line [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 31-01-2012, 18:28
Fishpaste108 Fishpaste108 is offline
Registered User
FRC #3467
 
Join Date: Jan 2012
Location: Windham, New Hampshire
Posts: 8
Fishpaste108 is an unknown quantity at this point
Exclamation 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!
Reply With Quote
  #2   Spotlight this post!  
Unread 31-01-2012, 23:00
enrique's Avatar
enrique enrique is offline
Registered User
FRC #1251 (Tech Tigers)
Team Role: Electrical
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Florida
Posts: 87
enrique will become famous soon enough
Send a message via Yahoo to enrique
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?
Reply With Quote
  #3   Spotlight this post!  
Unread 01-02-2012, 06:58
Fishpaste108 Fishpaste108 is offline
Registered User
FRC #3467
 
Join Date: Jan 2012
Location: Windham, New Hampshire
Posts: 8
Fishpaste108 is an unknown quantity at this point
Re: EP4 Encoder

We have tried multiple of the same types of encoders all to no avail
Reply With Quote
  #4   Spotlight this post!  
Unread 01-02-2012, 08:34
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: EP4 Encoder

Quote:
Originally Posted by Fishpaste108 View Post
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.
Reply With Quote
  #5   Spotlight this post!  
Unread 01-02-2012, 13:45
Fishpaste108 Fishpaste108 is offline
Registered User
FRC #3467
 
Join Date: Jan 2012
Location: Windham, New Hampshire
Posts: 8
Fishpaste108 is an unknown quantity at this point
Re: EP4 Encoder

I will try that thanks
Reply With Quote
  #6   Spotlight this post!  
Unread 02-02-2012, 15:36
Fishpaste108 Fishpaste108 is offline
Registered User
FRC #3467
 
Join Date: Jan 2012
Location: Windham, New Hampshire
Posts: 8
Fishpaste108 is an unknown quantity at this point
Re: EP4 Encoder

I got rid of the reset but i am still having problems :/
Reply With Quote
  #7   Spotlight this post!  
Unread 02-02-2012, 15:38
Fishpaste108 Fishpaste108 is offline
Registered User
FRC #3467
 
Join Date: Jan 2012
Location: Windham, New Hampshire
Posts: 8
Fishpaste108 is an unknown quantity at this point
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
Reply With Quote
  #8   Spotlight this post!  
Unread 02-02-2012, 16:00
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
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. :-)
Reply With Quote
  #9   Spotlight this post!  
Unread 02-02-2012, 16:19
Fishpaste108 Fishpaste108 is offline
Registered User
FRC #3467
 
Join Date: Jan 2012
Location: Windham, New Hampshire
Posts: 8
Fishpaste108 is an unknown quantity at this point
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
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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