Go to Post We had an autonomous bug last year . . . Funnily enough, this worked real well and other teams were asking us for this "feature." - dragoonex [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
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 17-03-2012, 18:38
twiggzee twiggzee is offline
Registered User
FRC #3502 (Octo-(PI)-Rates)
Team Role: Mentor
 
Join Date: Mar 2011
Rookie Year: 2011
Location: Tallahassee, FL
Posts: 55
twiggzee is an unknown quantity at this point
Re: Tachometer Interrupt Help

Quote:
Originally Posted by loafdog View Post
twiggzee, have you tried different speeds when running your device/tach? We found that until our shooter reached a certain speed getPeriod returned infinity. We also used setMaxPeriod to adjust the period so that we could measure shooter revolutions at the lowest speed we would ever use.
I didn't see a way to find out what the original max period value was, either by calling a function or looking at wpilib src code.

-Maciej

that was it. tried it again, turns out that the getPeriod method only consistently gives a reading when our wheel is spinning more than 1200 rpm. anything below that we get either an "infinity" reading or an occasional reading when approaching 1200 rpm. thanks!
__________________
Wendy
Team 3502
Reply With Quote
  #2   Spotlight this post!  
Unread 17-03-2012, 19:02
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,042
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Tachometer Interrupt Help

Quote:
Originally Posted by twiggzee View Post
that was it. tried it again, turns out that the getPeriod method only consistently gives a reading when our wheel is spinning more than 1200 rpm. anything below that we get either an "infinity" reading or an occasional reading when approaching 1200 rpm. thanks!
Maybe Java has a "SetMaxPeriod" like C++ does:

Quote:
/**
* Set the maximum period where the device is still considered "moving".
* Sets the maximum period where the device is considered moving. This value is used to determine
* the "stopped" state of the counter using the GetStopped method.
* @param maxPeriod The maximum period where the counted device is considered moving in
* seconds.
*/
void Counter::SetMaxPeriod(double maxPeriod)
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 09:48.

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