Go to Post What makes a man is not the mistakes, but the actions that follow. Andy B. - Andy Baker [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
  #1   Spotlight this post!  
Unread 09-02-2012, 00:37
seg9585's Avatar
seg9585 seg9585 is offline
Registered User
AKA: Eric
FRC #4276 (Surf City Vikings)
Team Role: Engineer
 
Join Date: Feb 2006
Rookie Year: 2001
Location: Boeing (Seal Beach, CA)
Posts: 520
seg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond repute
Encoder Glitchy Issue, Help Needed

Hi all, we are using LabView to run 2 encoders (currently) for our drive system, and we are having issues with glitchy incrementing values returned from the digital inputs or the code (the encoder distance counters increment when the encoder is stationary). Info below:

Configuration:
DIO 1 -- Ground, Power, Signal A for Encoder 1
DIO 2 -- Signal B for Encoder 1
DIO 3 -- Ground, Power, Signal A for Encoder 2
DIO 4 -- Signal B for Encoder 2

Observation:
When one single encoder is plugged into the above digital inputs (DIO1+DIO2 in use, with DIO3+DIO4 unplugged), the encoder works nominally. This is indicated by a healthy distance and direction indicator on our Dashboard and accurate readings when driving the robot.

HPlugging in either single encoder works correctly, however when we plug in the second encoder to our Digital Inputs, both encoders start outputting glitchy data.
Each encoder distance indicator quickly increments as if the robot is moving forward, and the direction indicator blinks erratically. We noticed that only one encoder will glitch at a time -- when the robot is stationary, Encoder 1 will quickly increment distance, and a few seconds later Encoder 2 will issue the same symptom.

I have attached the applicable code -- Begin.vi initates and resets the encoder. Teleop.vi does a GET then processes the output.

Has anyone run into this problem? I don't want to automatically suspect there's a problem with our Digital Sidecar, but we can't find an issue in code that would cause this problem since simply unplugging one of the encoders allows the other to run perfectly with the same code.

Note: Changing the "decoding type" does not resolve the issue.

Thanks for any help!
Attached Thumbnails
Click image for larger version

Name:	encoderbegin.jpg
Views:	51
Size:	63.2 KB
ID:	11805  Click image for larger version

Name:	teleop.jpg
Views:	42
Size:	37.5 KB
ID:	11806  
Attached Files
File Type: vi Begin.vi (55.2 KB, 4 views)
File Type: vi Teleop.vi (57.5 KB, 3 views)
__________________
My FIRST legacy:

Team 204 Student 2001, 2002 (Voorhees, NJ)
Team 1493 College Mentor 2006 - 2008 (Troy, NY)
Team 2150 Intern/Professional Mentor 2007, 2009 (Palos Verdes)
Team 4123 Lead Engineering Mentor 2012 (Bellflower, CA)
Team 4276 Engineering Mentor 2012-2016 (Huntington Beach, CA)
Reply With Quote
  #2   Spotlight this post!  
Unread 09-02-2012, 07:57
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: Encoder Glitchy Issue, Help Needed

I imagine that could happen if connecting two encoders is causing issues with the 5 volt supply. Is the Digital Sidecar correctly powered, with the BAT, 6V, and 5V LEDs all lit brightly? What is the Robot Signal Light doing while you are having these issues?
Reply With Quote
  #3   Spotlight this post!  
Unread 09-02-2012, 18:20
seg9585's Avatar
seg9585 seg9585 is offline
Registered User
AKA: Eric
FRC #4276 (Surf City Vikings)
Team Role: Engineer
 
Join Date: Feb 2006
Rookie Year: 2001
Location: Boeing (Seal Beach, CA)
Posts: 520
seg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond repute
Re: Encoder Glitchy Issue, Help Needed

Will check tonight. Meanwhile --

If the LEDs are not brightly lit, does this indicate a problem with the digital sidecar? The sidecar is wired properly and outputs PWMs (and a single encoder) fine.

If the LED's are brightly lit, what do you recommend as follow-on troubleshooting steps?

Thanks.
__________________
My FIRST legacy:

Team 204 Student 2001, 2002 (Voorhees, NJ)
Team 1493 College Mentor 2006 - 2008 (Troy, NY)
Team 2150 Intern/Professional Mentor 2007, 2009 (Palos Verdes)
Team 4123 Lead Engineering Mentor 2012 (Bellflower, CA)
Team 4276 Engineering Mentor 2012-2016 (Huntington Beach, CA)
Reply With Quote
  #4   Spotlight this post!  
Unread 10-02-2012, 15:31
seg9585's Avatar
seg9585 seg9585 is offline
Registered User
AKA: Eric
FRC #4276 (Surf City Vikings)
Team Role: Engineer
 
Join Date: Feb 2006
Rookie Year: 2001
Location: Boeing (Seal Beach, CA)
Posts: 520
seg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond repute
Re: Encoder Glitchy Issue, Help Needed

Update on this issue:
When both encoders are plugged in, the sidecar LEDs remain brightly lit, so the sidecar must be healthy. When I plug the second encoder into unused digital IO ports, the correctly mapped encoder works fine. So, electrical interference on the DS is not the issue. When I map the second encoder to the new IO ports in code (previously unused) the problem with the incrementing encoder count returns.

What else can I try???? Any more tips?
__________________
My FIRST legacy:

Team 204 Student 2001, 2002 (Voorhees, NJ)
Team 1493 College Mentor 2006 - 2008 (Troy, NY)
Team 2150 Intern/Professional Mentor 2007, 2009 (Palos Verdes)
Team 4123 Lead Engineering Mentor 2012 (Bellflower, CA)
Team 4276 Engineering Mentor 2012-2016 (Huntington Beach, CA)
Reply With Quote
  #5   Spotlight this post!  
Unread 11-02-2012, 20:32
seg9585's Avatar
seg9585 seg9585 is offline
Registered User
AKA: Eric
FRC #4276 (Surf City Vikings)
Team Role: Engineer
 
Join Date: Feb 2006
Rookie Year: 2001
Location: Boeing (Seal Beach, CA)
Posts: 520
seg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond reputeseg9585 has a reputation beyond repute
Re: Encoder Glitchy Issue, Help Needed

FYI, Issue resolved by moving the encoder processing code from Teleop.vi to Routine Task VI, where it should have been all along. I suppose lag associated with receiving DS packets knocked the timing off the encoder's calculations.

Why a single encoder always seemed to work okay, that will remain a mystery (maybe the amount of code processed pushed the Teleop VI beyond the Watchdog timer limit?)
__________________
My FIRST legacy:

Team 204 Student 2001, 2002 (Voorhees, NJ)
Team 1493 College Mentor 2006 - 2008 (Troy, NY)
Team 2150 Intern/Professional Mentor 2007, 2009 (Palos Verdes)
Team 4123 Lead Engineering Mentor 2012 (Bellflower, CA)
Team 4276 Engineering Mentor 2012-2016 (Huntington Beach, CA)
Reply With Quote
  #6   Spotlight this post!  
Unread 11-02-2012, 20:51
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,100
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Encoder Glitchy Issue, Help Needed

Quote:
Originally Posted by seg9585 View Post
FYI, Issue resolved by moving the encoder processing code from Teleop.vi to Routine Task VI, where it should have been all along. I suppose lag associated with receiving DS packets knocked the timing off the encoder's calculations.
Did you try reading the encoder count in TeleOP, and computing

(change in encoder count)/(elapsed time since previous encoder count was read) ?

That should be reasonably insensitive to variations in the timing of receipt of DS packets, no?

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 22: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