Go to Post CD is a forum provided by a group of people. You use it with their permission. Don't like it? Don't use it. - Andrew Schreiber [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 19-02-2011, 14:14
mbone206 mbone206 is offline
Registered User
FRC #0223
 
Join Date: Jan 2009
Location: New Jersey
Posts: 59
mbone206 is an unknown quantity at this point
Keeping track of Encoder Shaft Location using WPI Counter VI

My team is using a Light Sensor with tape on shaft as Encoder to keep track of the extension arm position. We are using Lab View. To keep track of Count (every revolution reflective tape passes light sensor) I am using the WPI Counter VI. After testing, it is not as accurate as I would hope... may have to live with it since this is what I was given and they can not change it now. I believe it is the mechanical binding that is the problem, not sensor bandwidth.
The counter will only increment in either direction. When one button pressed extension arm extends, other button, reverse motor and retracts. I am not sure why, but I can not keep proper count in reverse direction. I am using a shift register, add count in forward (check if forward button pressed), subtract count in reverse (check if reverse button pressed). I set while loop stop to True, so executes once, having shift register return previous count and compare new count. I am not sure why it is not working, timing issue with counter & while loop/shift register? If no button pressed, I pass shift register previous straight thru. I tried other ways than shift register, appears to be similar problem. This seems like a simple thing to do, but is not working. I would appreciate any support or new ideals. I can only attach retract (subtract counter) portion of code do to file size. Thanx... Appreciate help, in theory code should be simple, something else must be wrong
Attached Thumbnails
Click image for larger version

Name:	counter retract.jpg
Views:	33
Size:	67.1 KB
ID:	10216  
Reply With Quote
 


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:17.

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