Go to Post Finally, a Team Update that we can all agree to! - artdutra04 [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #31   Spotlight this post!  
Unread 07-02-2011, 02:08
Ryan Gordon Ryan Gordon is offline
Registered User
FRC #2854 (EVHS Robotics)
Team Role: Mentor
 
Join Date: Feb 2009
Rookie Year: 2009
Location: San Jose, CA
Posts: 40
Ryan Gordon is an unknown quantity at this point
Re: LabVIEW Encoder not reliably returning Rate

NI really doesn't believe that this isn't important enough to fix?
Reply With Quote
  #32   Spotlight this post!  
Unread 07-02-2011, 06:40
scooperman's Avatar
scooperman scooperman is offline
Registered User
FRC #1523
 
Join Date: Feb 2011
Location: Florida
Posts: 9
scooperman is an unknown quantity at this point
Re: LabVIEW Encoder not reliably returning Rate

A look inside any industrial control encoder interface shows that typically there is quite a lot of digital filtering done on the A,B,I signals before introduction to the count tracking logic. Take a look at the old HP HCTL-20xx data sheet as an example. They employed multiple stages of demetastabilizing flip-flops, these are necessary because any input signal is asynchronous to the processor clock, meaning that sooner or later you will get a clock edge which is coincident with a signal edge, causing flip-flops to make wrong decisions. After the inputs are synchronized, then more flip-flops are needed to verify that the A,B signals are not in illegal states, because real encoders do not produce signals which are in strict quadrature. After the signals are verified good, then the up/down logic may increment or decrement the encoder tracking count. I suspect there is none of this within the NI device and we can't do much to fix it. On the electrical side, we can filter the power connections to the encoder, shield the wires, shorten the wires, and provide the correct pullup load (US Digital calls for 2.7K ohm pullups) that's about it.
Reply With Quote
  #33   Spotlight this post!  
Unread 07-02-2011, 07:57
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: LabVIEW Encoder not reliably returning Rate

Quote:
NI really doesn't believe that this isn't important enough to fix?
During the beta period and the FRC season, FIRST engineers and NI engineers discuss the risk and impact of all bugs that are found. Some bugs are worth fixing, but others are difficult or risky to fix. Sometimes, as long as the customer is aware of it and they have a good workaround, the best course of action is to leave things alone.

This bug was deferred, meaning it will be fixed after the season is over, and when side-effects from the fix can be discovered somewhere other than your robot on Thursday before an event.

Greg McKaskle
Reply With Quote
  #34   Spotlight this post!  
Unread 07-02-2011, 21:19
Ryan Gordon Ryan Gordon is offline
Registered User
FRC #2854 (EVHS Robotics)
Team Role: Mentor
 
Join Date: Feb 2009
Rookie Year: 2009
Location: San Jose, CA
Posts: 40
Ryan Gordon is an unknown quantity at this point
Re: LabVIEW Encoder not reliably returning Rate

Quote:
Originally Posted by Greg McKaskle View Post
During the beta period and the FRC season, FIRST engineers and NI engineers discuss the risk and impact of all bugs that are found. Some bugs are worth fixing, but others are difficult or risky to fix. Sometimes, as long as the customer is aware of it and they have a good workaround, the best course of action is to leave things alone.

This bug was deferred, meaning it will be fixed after the season is over, and when side-effects from the fix can be discovered somewhere other than your robot on Thursday before an event.

Greg McKaskle
This year encoders will almost certainly be used on most robots so I find it interesting that this was deferred so quickly. I understand NI's point of view (I know how you feel, I've worked in development for 6 years and SQA for 3 and I know how it's like when there are deadlines to meet) but as the end user this seems kind of like an easy fix to do. The hardware is the same as last year so it must be on the code side of things. It worked last year so there was working code before but this year it's broken so it must be a regression. Usually when I have to deal with regressions (unless code was refactored?) it's easy enough for me to do comparisons of code from when it did work to when it didn't and see what caused the issue.

Can an official help document, or something to that effect, be provided to teams? I've read through this thread and I think most of us are still at a loss on the best way to workaround this issue.

Best Regards
Reply With Quote
  #35   Spotlight this post!  
Unread 07-02-2011, 22:52
cabbagekid2 cabbagekid2 is offline
Registered User
#0368 (Kika Mana)
 
Join Date: Jun 2001
Rookie Year: 2000
Location: Honolulu, HI
Posts: 85
cabbagekid2 has a spectacular aura aboutcabbagekid2 has a spectacular aura aboutcabbagekid2 has a spectacular aura about
Re: LabVIEW Encoder not reliably returning Rate

I agree. Some type of how to should be provided to teams for this "workaround". I have opened up the encoder VIs and I don't even know where to start changing things. It doesn't at all look like how we use to do it in C with the IFI controller.

For our noise issue, we are at 1x and still have 50% being noise. Not sure what to do about this now. Is it possible that there's dirt or something in the encoder when we put it together that could cause this? What kind of noise is everyone else getting? I would post a screen capture but our robot is being worked on and not operational at the moment.
Reply With Quote
  #36   Spotlight this post!  
Unread 07-02-2011, 23:02
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: LabVIEW Encoder not reliably returning Rate

The workaround is to recreate the "rate" from the "distance".
You subtract the previous distance from the latest distance, and divide by the seconds in between the two measurements.

Or use CAN.
__________________
-- Marshal Horn
Reply With Quote
  #37   Spotlight this post!  
Unread 07-02-2011, 23:12
cabbagekid2 cabbagekid2 is offline
Registered User
#0368 (Kika Mana)
 
Join Date: Jun 2001
Rookie Year: 2000
Location: Honolulu, HI
Posts: 85
cabbagekid2 has a spectacular aura aboutcabbagekid2 has a spectacular aura aboutcabbagekid2 has a spectacular aura about
Re: LabVIEW Encoder not reliably returning Rate

Quote:
Originally Posted by kamocat View Post
The workaround is to recreate the "rate" from the "distance".
You subtract the previous distance from the latest distance, and divide by the seconds in between the two measurements.

Or use CAN.
We tried this and our rate for left and right are not close. For some reason the encoder that doesn't read rate also doesn't read distance accurately. It reads, but it just thinks it's moving a lot more than it actually does.
Reply With Quote
  #38   Spotlight this post!  
Unread 07-02-2011, 23:31
Ryan Gordon Ryan Gordon is offline
Registered User
FRC #2854 (EVHS Robotics)
Team Role: Mentor
 
Join Date: Feb 2009
Rookie Year: 2009
Location: San Jose, CA
Posts: 40
Ryan Gordon is an unknown quantity at this point
Re: LabVIEW Encoder not reliably returning Rate

Quote:
Originally Posted by kamocat View Post
The workaround is to recreate the "rate" from the "distance".
You subtract the previous distance from the latest distance, and divide by the seconds in between the two measurements.

Or use CAN.
Distance is just an integration of rate; If distance works then rate must work too, right? Or more clearly written, if rate doesn't work then distance won't work either.
Reply With Quote
  #39   Spotlight this post!  
Unread 07-02-2011, 23:38
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: LabVIEW Encoder not reliably returning Rate

Quote:
Originally Posted by Ryan Gordon View Post
Distance is just an integration of rate; If distance works then rate must work too, right? Or more clearly written, if rate doesn't work then distance won't work either.
If you look back at the first post, the issue with calculating rate is that the encoder returns an elapsed time of inf.
It appears that rate is calculated from differentiating distance, not the other way around.
__________________
-- Marshal Horn
Reply With Quote
  #40   Spotlight this post!  
Unread 08-02-2011, 00:34
Ryan Gordon Ryan Gordon is offline
Registered User
FRC #2854 (EVHS Robotics)
Team Role: Mentor
 
Join Date: Feb 2009
Rookie Year: 2009
Location: San Jose, CA
Posts: 40
Ryan Gordon is an unknown quantity at this point
Re: LabVIEW Encoder not reliably returning Rate

Quote:
Originally Posted by kamocat View Post
If you look back at the first post, the issue with calculating rate is that the encoder returns an elapsed time of inf.
It appears that rate is calculated from differentiating distance, not the other way around.
Looks like your right. However it seems like the issue stems even further then that based on cabbagekid2's tests... hmmm
Reply With Quote
  #41   Spotlight this post!  
Unread 08-02-2011, 00:43
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: LabVIEW Encoder not reliably returning Rate

Quote:
Originally Posted by cabbagekid2 View Post
For our noise issue, we are at 1x and still have 50% being noise. Not sure what to do about this now. Is it possible that there's dirt or something in the encoder when we put it together that could cause this? What kind of noise is everyone else getting? I would post a screen capture but our robot is being worked on and not operational at the moment.
It's possible that you have damaged the encoder and the signal coming from one of them is missing part of the signal. It could also be that the encoder is to far from he sensor and only partially reading it. This assumes that you are using an encoder that you build, not an enclosed unit.

If it really is digital switching noise on the wires, there are digital filters available to you in the hardware, but they are not enabled by default (since we have no idea what the frequency of your input signal should be). You can configure them with VIs in the Advanced Digital Input palette.

-Joe
Reply With Quote
  #42   Spotlight this post!  
Unread 08-02-2011, 00:44
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: LabVIEW Encoder not reliably returning Rate

Quote:
Originally Posted by kamocat View Post
If you look back at the first post, the issue with calculating rate is that the encoder returns an elapsed time of inf.
It appears that rate is calculated from differentiating distance, not the other way around.
That is correct. The rate is calculated based on detecting when the position changes.
Reply With Quote
  #43   Spotlight this post!  
Unread 08-02-2011, 00:47
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: LabVIEW Encoder not reliably returning Rate

Quote:
Originally Posted by kamocat View Post
The workaround is to recreate the "rate" from the "distance".
You subtract the previous distance from the latest distance, and divide by the seconds in between the two measurements.
I believe there may be another workaround, and that is to only use the "even" encoders. I'd have to test it out myself to say for sure, though. I'll look into it.

Quote:
Originally Posted by kamocat View Post
Or use CAN.
At the very least, that would be a great way to validate your encoder hardware vs. the decoding.

-Joe
Reply With Quote
  #44   Spotlight this post!  
Unread 08-02-2011, 09:03
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: LabVIEW Encoder not reliably returning Rate

It worked two years ago.

It worked last year.

It does not work this year.

What changed? Why did you decide to re-write code that worked well? How did none of the beta test teams find this?

We consider encoders and potentiometers to be extremely valuable sensors. The inability to trust the WPIlib to handle encoders correctly is extremely annoying, as is the black-box nature of the FPGA image which prevents us from fixing the root cause.

Could you revert to last years encoder code? It is known to work, and I know of no differences between this years and last years (or the year before that).
__________________
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
Reply With Quote
  #45   Spotlight this post!  
Unread 08-02-2011, 10:16
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,113
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: LabVIEW Encoder not reliably returning Rate

Quote:
Originally Posted by apalrd View Post
What changed?
The FPGA image changed. That's where the rate calculation is performed.
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 09:46.

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