Go to Post I am sad that the Patriots lost, and I am happy for both teams that won...but I am even more thrilled that for the next two weeks robot building in the midwest comes to a standstill. ;) - Jessica Boucher [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 22-01-2011, 18:14
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: Gear Tooth Counter for height

What you're asking for should work fine.
Reply With Quote
  #2   Spotlight this post!  
Unread 24-01-2011, 16:52
Wicked Wicked is offline
Registered User
FRC #0354 (G-House Pirates)
Team Role: Programmer
 
Join Date: Dec 2008
Rookie Year: 2008
Location: New York
Posts: 46
Wicked is an unknown quantity at this point
Re: Gear Tooth Counter for height

If this is indeed possible (and legal), how would we get the gear tooth sensor into the code, and how would we use it to control the motor?

I'm thinking it involves a PID loop, but I don't know for sure...
Reply With Quote
  #3   Spotlight this post!  
Unread 24-01-2011, 17:20
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: 7,011
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: Gear Tooth Counter for height

It is possible, legal, and should work fine. Just have the code reset the 'known' position at the start of each match.

A PID loop is used to control a setpoint. One example is a car cruise control (maintains constant speed), another is a kitchen oven (maintains constant temperature).

What you may want to use is called an "Interrupt". This is a special hardware connection (to the Digital sidecar) that signals the cRio's processor "STOP Whatever you are doing and run this piece of code. Immediately. Now". In your case, that code might add +1 (or subtract -1 if the lift motor is running backwards) to a counter that keeps track of lift position. Clearly, the code must be as brief as possible, since your processor is literally unable to do ANYthing else while the interrupt is active. (The interrupt gets activated by the sensor signal)

Do your own research on the highlighted words to understand and do it.
__________________

I am N2IRZ - What's your callsign?
Reply With Quote
  #4   Spotlight this post!  
Unread 24-01-2011, 18:05
Creator Mat Creator Mat is offline
Registered User
FRC #2338 (Gear it Forward)
Team Role: Leadership
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Aurora Illinois
Posts: 178
Creator Mat is a jewel in the roughCreator Mat is a jewel in the roughCreator Mat is a jewel in the roughCreator Mat is a jewel in the rough
Re: Gear Tooth Counter for height

I would be worried about using a gear tooth sensor as you only check for height. If there is anything that interferes with your robots elevator extension problems could arise. Some potential problems I can think off hand is if your gear slips (or more likely a belt or chain later down the line) or if your elevator gets hit and is knocked out of wack. While these scenarios are not that likely (depending on construction of said elevator) it might be worthwhile to have an additional check on elevator height.
__________________

2010 Midwest Spirit award
2010 Midwest Quarterfinalists
2010 Wisconsin Quarterfinalists
2009 Midwest Finalists
2009 Wisconsin Quarterfinalists
2008 Midwest Rookie AllStars
Reply With Quote
  #5   Spotlight this post!  
Unread 25-01-2011, 01:44
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: Gear Tooth Counter for height

Quote:
Originally Posted by DonRotolo View Post
What you may want to use is called an "Interrupt". This is a special hardware connection (to the Digital sidecar) that signals the cRio's processor "STOP Whatever you are doing and run this piece of code. Immediately. Now". In your case, that code might add +1 (or subtract -1 if the lift motor is running backwards) to a counter that keeps track of lift position. Clearly, the code must be as brief as possible, since your processor is literally unable to do ANYthing else while the interrupt is active. (The interrupt gets activated by the sensor signal)
For an application like this, an interrupt is unnecessary... the FPGA design has counter logic in it that will deal with counting up or down as you wish. It is much faster and has no impact on your robot code's execution speed. Use interrupts only as a last resort.

-Joe
Reply With Quote
  #6   Spotlight this post!  
Unread 25-01-2011, 11:53
Tom Line's Avatar
Tom Line Tom Line is offline
Raptors can't turn doorknobs.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,533
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Re: Gear Tooth Counter for height

Sean - the danger in using a gear tooth counter in this manner is that it is a 'relative' measurement system.

That means that where ever your lift happens to be when you power it on is the zero point. If the lift is set 3 inches high, then you may run the lift too high at the end of the motion. Or, worse, if you have a power fluctuation on the field, the lift will lose it's 'zero' position.

You are better off if you use something that is absolute. To that end, there are absolute encoders and multi-turn potentiometers that you could use. In 2008 we used a 10 turn pot from radio shack that worked very well. In 2010, we did as you are suggesting and used the encoder to measure how far we unwound our winch. It was a constant hassle to make sure the winch always started in the same position.
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 21:18.

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