Go to Post I think we're doing pretty well . . . but I will never, ever say that "we are ahead of schedule." It's a curse. :D - Éowyn [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 18-02-2012, 01:15
Lawlhwut Lawlhwut is offline
Registered User
None #2853
 
Join Date: Jan 2011
Location: Hawaii
Posts: 17
Lawlhwut is an unknown quantity at this point
Encoder not working

The E4P encoder is not working on our robot right now. We plugged it into the digital side card digital I/O, 3 wire connection in 3, 1 wire (middle only) connection to 4. And in the code we declared it encoder(3,4), encoder.Start(); encoder.SetDistancePerPulse(####); and DriverStationLCD *screen = DriverStationLCD::GetInstance(); screen->PrintfLine(DriverStationLCD::kUser_Line1,"RPM: %f",encoder.GetRate());

Why isn't it working?
Reply With Quote
  #2   Spotlight this post!  
Unread 18-02-2012, 01:17
Lawlhwut Lawlhwut is offline
Registered User
None #2853
 
Join Date: Jan 2011
Location: Hawaii
Posts: 17
Lawlhwut is an unknown quantity at this point
Re: Encoder not working

Channel A = channel 1 signal, Channel B = channel 2 power, Grnd is -, power is power. I'm certain that the wiring is correct.
Reply With Quote
  #3   Spotlight this post!  
Unread 18-02-2012, 02:55
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: Encoder not working

Quote:
Originally Posted by Lawlhwut View Post
Channel A = channel 1 signal, Channel B = channel 2 power, Grnd is -, power is power. I'm certain that the wiring is correct.
I hope you meant Channel B = channel 2 signal.
__________________
Reply With Quote
  #4   Spotlight this post!  
Unread 19-02-2012, 09:01
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: Encoder not working

Quote:
Originally Posted by Lawlhwut View Post
...3 wire connection in 3, 1 wire (middle only) connection to 4...
Why isn't it working?
It isn't working because you have the B channel connected to a 5 volt power pin, not to digital input signal pin. Move it from the middle pin to the pin farthest from the edge of the Digital Sidecar.
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:22.

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