Go to Post The moral of this story: A healthy respect for the customer, dedication to your job, and a positive outlook can make even the most trivial and monotonous job into a wonderful experience. - Molten [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #16   Spotlight this post!  
Unread 15-02-2011, 23:22
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: Encoder fixed in WPILib 2011?

Quote:
Originally Posted by Jeanne Boyarsky View Post
How did you create the first (dummy) encoder? Instantiating using the same arguments gives channel in use errors, no?
I wrote a (fairly quick) VI that takes A phase, B phase, and count scaler and outputs a working encoder. It creates the dummy using the same channels on slot 6, then creates the real one on slot 4. It assumes 1x decoding since that's what we use.

I haven't tested it heavily (still working on mechanism tuning, we haven't tuned the drivetrain yet), so I am hesitant to post it here.

Quick answer:
Create one on slot 6 and one on slot 4. Since we don't use slot 6, that solves all of our problems.
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
  #17   Spotlight this post!  
Unread 16-02-2011, 15:03
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Encoder fixed in WPILib 2011?

Quote:
Originally Posted by Jeanne Boyarsky View Post
How did you create the first (dummy) encoder? Instantiating using the same arguments gives channel in use errors, no?
If you instantiate the DigitalInputs first, then pass those into the encoder constructors, you will not get the errors. The errors happen when the encoder tries to construct DigitalInputs for the same channels more than once.

By the way, I found that it is not always the second (odd) decoder that works.

See this thread.

In 4x mode, the 2 odd ones work. In 2x or 1x mode, the first 3 even ones work and the last one (odd) works.

-Joe
  #18   Spotlight this post!  
Unread 16-02-2011, 17:40
Jeanne Boyarsky Jeanne Boyarsky is offline
Java Mentor
FRC #0694 (StuyPulse)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2010
Location: New York
Posts: 100
Jeanne Boyarsky has much to be proud ofJeanne Boyarsky has much to be proud ofJeanne Boyarsky has much to be proud ofJeanne Boyarsky has much to be proud ofJeanne Boyarsky has much to be proud ofJeanne Boyarsky has much to be proud ofJeanne Boyarsky has much to be proud ofJeanne Boyarsky has much to be proud ofJeanne Boyarsky has much to be proud of
Re: Encoder fixed in WPILib 2011?

Joe,
We got it. It was encoders #1, 3, 5 and 8 that worked. Should have checked this thread before trial and error! This is so illogical, but good it is consistent.

We did have to use different distinct channels for all four dummy encoders. But that's ok.
__________________
Team 694 mentor 2010-present, FIRST Volunteer and Co-organizer of FIRST World Maker Faire Tent
2012 NYC Woodie Flowers Finalist
2015 NYC Volunteer of the Year
  #19   Spotlight this post!  
Unread 16-02-2011, 18:16
MagiChau's Avatar
MagiChau MagiChau is offline
Registered User
AKA: Michael Chau
FRC #0085 (B.O.B. (Built on Brains))
Team Role: Alumni
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Zeeland, Michigan
Posts: 875
MagiChau is just really niceMagiChau is just really niceMagiChau is just really niceMagiChau is just really nice
Re: Encoder fixed in WPILib 2011?

Is it possible to set the dummy to a slot besides 6 or 4 that are meant for the Digital Side Car? This year my team is using 2 digital side cars so it would be nice to set it to an unused slot.
  #20   Spotlight this post!  
Unread 16-02-2011, 18:38
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Encoder fixed in WPILib 2011?

Quote:
Originally Posted by MagiChau View Post
Is it possible to set the dummy to a slot besides 6 or 4 that are meant for the Digital Side Car? This year my team is using 2 digital side cars so it would be nice to set it to an unused slot.
You don't need to use a different slot at all... read this post. Construct the DigitalInputs first.

-Joe
  #21   Spotlight this post!  
Unread 16-02-2011, 18:40
MagiChau's Avatar
MagiChau MagiChau is offline
Registered User
AKA: Michael Chau
FRC #0085 (B.O.B. (Built on Brains))
Team Role: Alumni
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Zeeland, Michigan
Posts: 875
MagiChau is just really niceMagiChau is just really niceMagiChau is just really niceMagiChau is just really nice
Re: Encoder fixed in WPILib 2011?

Quote:
Originally Posted by jhersh View Post
You don't need to use a different slot at all... read this post. Construct the DigitalInputs first.

-Joe
Sorry about that, unlike me to not notice that post.
Closed Thread


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 04:14.

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