Go to Post Sleep is for the weak - TEntwistle [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 06-02-2010, 15:39
Kahn! Kahn! is offline
Registered User
FRC #1379
 
Join Date: Sep 2008
Location: Norcross, GA
Posts: 22
Kahn! is an unknown quantity at this point
Encoder Trouble

I'm working with this year's Digital Quad. Encoders.

I've openned two Digital Inputs for the A and B sources of Encoder Open. After openning it I run ConfigTimer, Start, and Reference Export in that order. I'm getting CounterIndex set as Invalid. When is that set and what can I do to fix this?

Thanks.
Reply With Quote
  #2   Spotlight this post!  
Unread 06-02-2010, 22:12
Ziaholic's Avatar
Ziaholic Ziaholic is offline
Elec/SW Mentor
AKA: Marc
FRC #1164 (Project NEO)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2002
Location: Las Cruces, NM
Posts: 194
Ziaholic is a jewel in the roughZiaholic is a jewel in the roughZiaholic is a jewel in the roughZiaholic is a jewel in the rough
Re: Encoder Trouble

I can't answer your specific question, but the last time I had an Encoder question, it was answered for me when I looked at the Encoder example in the LabView examples. Have you looked at it?
__________________
----
There are 10 types of people. Those who understand binary, and those that do not.
Team #1164 - Project NEO Robotics
Reply With Quote
  #3   Spotlight this post!  
Unread 07-02-2010, 00:02
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 Trouble

Quote:
Originally Posted by Kahn! View Post
I'm getting CounterIndex set as Invalid. When is that set and what can I do to fix this?
It's set in the 1x or 2x Decoding Type case of the Encoder Open vi. It remains unset (i.e. Invalid) in the 4x case, because a Counter is used in the implementation only for 1x or 2x decoding.

Why do you think it needs to be fixed?
Reply With Quote
  #4   Spotlight this post!  
Unread 07-02-2010, 11:44
Kahn! Kahn! is offline
Registered User
FRC #1379
 
Join Date: Sep 2008
Location: Norcross, GA
Posts: 22
Kahn! is an unknown quantity at this point
Re: Encoder Trouble

I have looked at the example.

Thanks for that explanation. It seemed to me that anything set to invalid was a problem, but it's possible that the issue is elsewhere. I'll have to do some more debugging when I get back to school.
Reply With Quote
  #5   Spotlight this post!  
Unread 11-02-2010, 17:18
Kahn! Kahn! is offline
Registered User
FRC #1379
 
Join Date: Sep 2008
Location: Norcross, GA
Posts: 22
Kahn! is an unknown quantity at this point
Re: Encoder Trouble

I am now running the example with no luck. Unless I short the connection the count does not change. I've wired it as it says. The channels correspond. I've assembled the encoder as the US Digital site says.

What are all of the aspects of a working encoder? Could I have skipped something?
Reply With Quote
  #6   Spotlight this post!  
Unread 11-02-2010, 22:04
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 Trouble

An encoder requires power (make sure there is +5 on the +5 connection, and ground on the ground connection). It will provide a pair of digital signals on the A and B connections (look at them with a voltmeter or oscilloscope).

The US Digital E4P has an optical sensor pair pointing at a disk with a reflective pattern on it. If you take the cover off the encoder, you will see the non-pattern side of the disk. If the disk is at an appropriate distance from the sensor, as it rotates it will cause the digital outputs to change in phase quadrature (first one output goes high, then the other, then the first goes low, then the other).


If power is not present, it will not work.

If the signal lines are not connected to digital inputs, it will not work.

If the disk is upside down or too far away, it will not work.

If the disk is too close, the pattern surface will probably touch the body of the encoder, get scratched, and soon be damaged to the point where it will not work.
Reply With Quote
  #7   Spotlight this post!  
Unread 14-02-2010, 19:10
Kahn! Kahn! is offline
Registered User
FRC #1379
 
Join Date: Sep 2008
Location: Norcross, GA
Posts: 22
Kahn! is an unknown quantity at this point
Re: Encoder Trouble

I never did get one of our encoders working. I had several of our mentors check the wiring and setup and no one could explain it.

Current is passing through the wires, says the voltmeter. It has power, says the red light on the encoder. The disk and base are an appropriate distance away from each other, because the cap is on (though one of the disks was noticeably scratched the other was still unsuccessful).

I've accepted that I can't expect to have them working by the end of build season. Is my next step to see if a brand new set have the same issues?
Reply With Quote
  #8   Spotlight this post!  
Unread 15-02-2010, 01:12
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 Trouble

Quote:
Originally Posted by Kahn! View Post
I never did get one of our encoders working. I had several of our mentors check the wiring and setup and no one could explain it.
Maybe it's working fine but the programming has a problem. Can you show us how you're opening them and how you're reading them?
Reply With Quote
  #9   Spotlight this post!  
Unread 15-02-2010, 17:02
Omar's Avatar
Omar Omar is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Huntsville, AL
Posts: 121
Omar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of light
Re: Encoder Trouble

Check to make sure each of the Digital In are working.

Open the Simple Digital Input Example.vi
Change the IP address in the project window to your cRIO's ip address.
Select the correct DIO Module and DIO Channel for encoder Channel A.
Run the VI
By hand turn the wheel connected to the encoder VERY SLOWLY.
You should see the Digital Input Value blink on and off.

Do the same for encoder Channel B.

If one does not work you know which line needs to be checked.
If the Digital Input lines do not work, the encoder VI will not work.
__________________
Omar
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
Lab View Update 3.0 encoder trouble Funnyman2003 Programming 2 03-02-2009 08:52
Screwing Encoder into Encoder Mount? Adrien Electrical 3 25-01-2009 18:14
KOP Gear Tooth Encoder Trouble Sykan Programming 11 16-02-2008 20:53
Inventor software trouble/ FIRST Base trouble nasa-senpai General Forum 2 24-01-2007 09:15
encoder.c Gary Bonner Programming 2 14-01-2005 13:41


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

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