Go to Post Chief Delphi's Greatest Hits vol. 47: Overreactions to Q&A responses - Lil' Lavery [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 23-02-2010, 21:09
Lucario231's Avatar
Lucario231 Lucario231 is offline
Registered User
FRC #0033 (Killer Bees)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2007
Location: United States
Posts: 29
Lucario231 is an unknown quantity at this point
Encoder Problems after update???

I have wheel encoders on our bot and they worked before the update (2.1) but now they don't work.

Electrical checked them and they are working
The encoder open do not display when double clicked the values of the constants
and they all say disabled not DIO 1 for example.

I noticed the devref says for Counter index says invalid

I have 5 NEW encoder and none of them have worked.

Last edited by Lucario231 : 23-02-2010 at 21:32.
Reply With Quote
  #2   Spotlight this post!  
Unread 23-02-2010, 21:37
DonRotolo's Avatar
DonRotolo DonRotolo is offline
Back to humble
FRC #0832
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Atlanta GA
Posts: 6,979
DonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond repute
Re: Encoder Problems after update???

Quote:
Originally Posted by Lucario231 View Post
Electrical checked them and they are working
Being an electrical mentor, I have my doubts here. How did they check them? Did you SEE with your own eyes that they generated an AC signal on the A and B channels? We use an oscilloscope to verify signal.

If that's OK, use the encoder VI all by itself, none of your own code, and see if you can read them then. If yes, your code is broken.
__________________

I am N2IRZ - What's your callsign?
Reply With Quote
  #3   Spotlight this post!  
Unread 23-02-2010, 23:11
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 Problems after update???

Opening a SubVI like Encoder Open will show you the defaults, not the actual values being fed to it. Don't worry about the "disabled" and "invalid" things you see there.

It's possible that your DevRefs aren't doing what you think they are. If the names aren't exactly the same on the Set and the Get, it won't work. If you try to do a Get inside Robot Main before the Begin vi has done the Set, it won't work. When you get a chance, run Robot Main, open the block diagram where you're trying to read the encoders, and probe the DevRef going into the Encoder Get to see if it looks reasonable.

Oh, and make sure you're doing an Encoder Start immediately after the Encoder Open.
Reply With Quote
  #4   Spotlight this post!  
Unread 24-02-2010, 12:38
Lucario231's Avatar
Lucario231 Lucario231 is offline
Registered User
FRC #0033 (Killer Bees)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2007
Location: United States
Posts: 29
Lucario231 is an unknown quantity at this point
Re: Encoder Problems after update???

I have tried putting a start right after the open vi in begin.vi

That didn't work. The rest of my code is working. It seems like the encoder library could be bad. idk

Would start vi be needed in telop? I tried that and no success

When looking at the devref in the probe everything is fine except for the counter index which is invalid.

I am guessing that is the problem.
Reply With Quote
  #5   Spotlight this post!  
Unread 24-02-2010, 12:39
Vikesrock's Avatar
Vikesrock Vikesrock is offline
Team 2175 Founder
AKA: Kevin O'Connor
no team
Team Role: Engineer
 
Join Date: Mar 2006
Rookie Year: 2007
Location: Manchester, NH
Posts: 3,305
Vikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond repute
Send a message via AIM to Vikesrock Send a message via MSN to Vikesrock Send a message via Yahoo to Vikesrock
Re: Encoder Problems after update???

Quote:
Originally Posted by Lucario231 View Post
I have tried putting a start right after the open vi in begin.vi

That didn't work. The rest of my code is working. It seems like the encoder library could be bad. idk

Would start vi be needed in telop? I tried that and no success

When looking at the devref in the probe everything is fine except for the counter index which is invalid.

I am guessing that is the problem.
The counter index is not used for 4x decoding so Invalid is fine.
__________________


2007 Wisconsin Regional Highest Rookie Seed & Regional Finalists (Thanks 930 & 2039)
2008 MN Regional Semifinalists (Thanks 2472 & 1756)
2009 Northstar Regional Semifinalists (Thanks 171 & 525)
Reply With Quote
  #6   Spotlight this post!  
Unread 24-02-2010, 12:52
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 Problems after update???

Quote:
Originally Posted by Lucario231 View Post
I have tried putting a start right after the open vi in begin.vi

That didn't work. The rest of my code is working.
It would help to see the code that you say isn't working. Please post the relevant parts of Begin and Teleop. Include Robot Main too if you've modified it.

And please tell us exactly where you have each wire from the encoder connected to, so we can match the hardware to the software as we look at the code.

Quote:
When looking at the devref in the probe everything is fine except for the counter index which is invalid.

I am guessing that is the problem.
No, an invalid counter index is expected if you are doing 4x decoding, which is the default. Only 1x and 2x decoding use FPGA counter resources.
Reply With Quote
  #7   Spotlight this post!  
Unread 24-02-2010, 13:34
R2D2DOC's Avatar
R2D2DOC R2D2DOC is offline
Registered User
AKA: Laszlo Hideg
no team (Judge & Volunteer)
 
Join Date: Oct 2007
Rookie Year: 2006
Location: Michigan
Posts: 79
R2D2DOC will become famous soon enoughR2D2DOC will become famous soon enough
Re: Encoder Problems after update???

Thanks all for the hints. Lucario231 must have been in a computer lab at school. And, I'm doing this during lunch. We will post code as soon as feasible. I'll take a shot at describing when we have:

Before the recent update, and it worked fine:
OPEN ENCODER feeds into DevRefOut in BEGIN
DevRefIn into GET in TELEOP

After the recent update, we have done everything suggested by Mr. Rotolo to verify that the encoders and wires are fine. To test the encoder signals, we manually turned them until we read 5V or 0V. More primitive than the scope but effective.

We have done most of Mr. Anderson's suggestions, but we apparently do not understand the GET & SET requirements. We tried to mimic where the Gyro's are placed, but since these are WPI libraries, the protocol is different. Please correct me on location of OPEN, SET, DevRefs and GET in the code. We tried unsuccessfully:

OPEN, SET, DevRefOut in Begin
DevRefIn, GET in TELEOP.

I cannot recall the order of the code booting up. For example, last year NI had said, for example that Teleop launched Auton which looked counter to what was in the code. Mr. Anderson's suggestion seem consistent with what we tried above.

Long story short, we will post code later this afternoon.

Thanks
Reply With Quote
  #8   Spotlight this post!  
Unread 24-02-2010, 18:13
Lucario231's Avatar
Lucario231 Lucario231 is offline
Registered User
FRC #0033 (Killer Bees)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2007
Location: United States
Posts: 29
Lucario231 is an unknown quantity at this point
Re: Encoder Problems after update???

Here is the code I labeled the sides of the .jpg with begin and telop.
When running the code and spinning the encoders the distance value in telop is 0 all the time.
yes the encoders do work.
I have no idea what is wrong

Click image for larger version

Name:	Encoder Code.jpg
Views:	35
Size:	49.8 KB
ID:	8801
Reply With Quote
  #9   Spotlight this post!  
Unread 24-02-2010, 18:34
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,731
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Encoder Problems after update???

Um, isn't your encoder Start a tiny fraction of a second before you do your Get?

There won't be anything to count in the time it takes to get from your Start to your Get...

Move the Start into Begin.vi
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 24-02-2010 at 18:40.
Reply With Quote
  #10   Spotlight this post!  
Unread 24-02-2010, 18:42
Lucario231's Avatar
Lucario231 Lucario231 is offline
Registered User
FRC #0033 (Killer Bees)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2007
Location: United States
Posts: 29
Lucario231 is an unknown quantity at this point
Re: Encoder Problems after update???

I have tried moving it in to begin.vi and had the same problem.
Reply With Quote
  #11   Spotlight this post!  
Unread 24-02-2010, 18:54
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,731
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Encoder Problems after update???

Where do you Open the DIO's?

Where do you Configure the Timer?

P.S. Take a look at the LabVIEW Encoder Example accessible from the Getting Started window.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 24-02-2010 at 19:11.
Reply With Quote
  #12   Spotlight this post!  
Unread 24-02-2010, 19:11
Lucario231's Avatar
Lucario231 Lucario231 is offline
Registered User
FRC #0033 (Killer Bees)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2007
Location: United States
Posts: 29
Lucario231 is an unknown quantity at this point
Re: Encoder Problems after update???

Ok i am looking at the example and I am still lost.
So I need to do these DIO opens?? and the timer config??

In past versions aka 8.5.1 and before update 2.1, I never needed to do DIO and timer before.
Reply With Quote
  #13   Spotlight this post!  
Unread 24-02-2010, 19:14
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,731
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Encoder Problems after update???

That Encoder example is from 2009.
It isn't new.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #14   Spotlight this post!  
Unread 24-02-2010, 19:28
R2D2DOC's Avatar
R2D2DOC R2D2DOC is offline
Registered User
AKA: Laszlo Hideg
no team (Judge & Volunteer)
 
Join Date: Oct 2007
Rookie Year: 2006
Location: Michigan
Posts: 79
R2D2DOC will become famous soon enoughR2D2DOC will become famous soon enough
Re: Encoder Problems after update???

Hello,

If this is 2009 code in the example, is it still valid for 2010? We have the next version of Labview, 8.6 and update 2.1. We never did anything this elaborate in 2009 to have the encoders operate.

So from the far left through Start Encoder is in BEGIN.
Use the DevRef to go from BEGIN to TELEOP and BEGIN to AUTON.

We'll give it a try. . .
Reply With Quote
  #15   Spotlight this post!  
Unread 24-02-2010, 19:36
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,731
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Encoder Problems after update???

Quote:
Originally Posted by R2D2DOC View Post
So from the far left through Start Encoder is in BEGIN.
Use the DevRef to go from BEGIN to TELEOP and BEGIN to AUTON.

We'll give it a try. . .
That's a correct division into the vi's.
I can't comment on what you may have done in the past. Sometimes, system defaults get you through, and sometimes they don't.

We can always try
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Encoder Problems BBHSrobotics Java 2 22-02-2010 11:18
Encoder problems Pausert NI LabVIEW 3 18-01-2010 12:33
Problems after the update?? Straberrie Programming 2 17-02-2009 07:11
Problems after 3rd update applied pheisinger FRC Control System 3 13-02-2009 22:47
Encoder Problems bjimster1 Programming 2 10-02-2007 08:04


All times are GMT -5. The time now is 04:36.

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