Go to Post Just think of the deadline as your six week deadline for FIRST, just when you think you can't do it, you are amazed by what you can do. - JackN [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 16-01-2010, 17:40
Pausert Pausert is offline
Registered User
FRC #1727 (REX)
Team Role: Leadership
 
Join Date: Jan 2009
Rookie Year: 2007
Location: Maryland
Posts: 69
Pausert is an unknown quantity at this point
Encoder problems

Today I was working on the KOP optical encoders and under no circumstances could I get them to work. I placed the Open encoder and the Set encoder function outside the teleop loop and the Get encoder function in the execute case. This setup worked for my other sensors and I know the encoder works. What am I missing? See code attached.
Attached Thumbnails
Click image for larger version

Name:	encoder.GIF
Views:	78
Size:	15.7 KB
ID:	8311  

Last edited by Pausert : 16-01-2010 at 18:28. Reason: Added code.
Reply With Quote
  #2   Spotlight this post!  
Unread 16-01-2010, 21:11
DavidGitz's Avatar
DavidGitz DavidGitz is offline
Lead Technical Advisor
FRC #1208 (MeTool Brigade)
Team Role: Coach
 
Join Date: Dec 2006
Rookie Year: 1996
Location: O'Fallon, IL
Posts: 341
DavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud of
Send a message via AIM to DavidGitz Send a message via MSN to DavidGitz Send a message via Yahoo to DavidGitz
Re: Encoder problems

You should put the initialize parts of the sensor code in the init loop. Also I would try putting the configtimerm.vi before the start.vi. also try looking at the error statements to see what that gets you.
__________________
Reply With Quote
  #3   Spotlight this post!  
Unread 17-01-2010, 21:55
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 problems

Quote:
Originally Posted by Pausert View Post
Today I was working on the KOP optical encoders and under no circumstances could I get them to work. I placed the Open encoder and the Set encoder function outside the teleop loop and the Get encoder function in the execute case. This setup worked for my other sensors and I know the encoder works. What am I missing? See code attached.
You should under no circumstances create create constants for "DevRef" inputs. You need to open the digital inputs and pass those references into the "ToDigitalSource.vi" (on the encoder pallete) and pass the reference from that into the encoder open. Look at the Encoder Example for... well... an example.
Reply With Quote
  #4   Spotlight this post!  
Unread 18-01-2010, 12:33
Doug Norman's Avatar
Doug Norman Doug Norman is offline
Registered User
no team (National Instruments)
Team Role: Engineer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Austin, TX
Posts: 137
Doug Norman will become famous soon enoughDoug Norman will become famous soon enough
Re: Encoder problems

Have you tried the Encoder Example? In LabVIEW choose View>>Getting Started Window, then click Examples and pick Encoder Example from the list. It also shows the wiring, so you can make sure that matches as well.
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
Problems with Encoder Counting bjimster1 Programming 19 07-03-2007 09:59
Encoder Counting Problems RyanW Programming 1 14-02-2007 15:17
Encoder Problems bjimster1 Programming 2 10-02-2007 08:04
Encoder Output Problems Mike Electrical 5 25-11-2005 21:43


All times are GMT -5. The time now is 22:34.

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