View unanswered posts | View active topics It is currently Wed Jul 23, 2014 10:55 pm






Reply to topic  [ 3 posts ] 
Program to display RPMs 
Author Message
Senior Roboticist
User avatar

Joined: Wed Sep 28, 2011 10:13 pm
Posts: 630
Location: If I told you, I'd have to kill you.
Post Program to display RPMs
Ha ha, one of the now few questions I have....

I'm trying to make a program to display the motor RPMs. This is what I have:

Code:
task main()
{
  while(true)
  {
    time1[T1] = 0;
   
    nMotorEncoder[motorA] = 0;
   
    while(nMotorEncoder[motorA] < 360);
   
    nxtDisplayCenteredBigTextLine(2, "%d", 60000 / time1[T1]);
  }
}


It seems to work, but I think the values are high. ex: Using the MindSensors GlideWheel with a PF-XL motor, it reads an average of 200 RPMs, while Philo states that it is nowhere near 200 RPMs when powered by 9V (I'm using the PF battery box). Am I doing this incorrectly?

_________________
A.K.A. inxt-generation
Self-proclaimed genius, and future world dominator.
My Brickshelf Folder
"Don't they teach recreational mathematics anymore?" - The Tenth Doctor
Bow down to Nikola Tesla, King of the Geek Gods.


Tue Jun 26, 2012 5:33 pm
Profile WWW
Guru
User avatar

Joined: Sun Nov 15, 2009 5:46 am
Posts: 1347
Post Re: Program to display RPMs
I don't know anything about PF-XL motors but 200 RPM isn't really that high. It is only about a little over 3 revolutions a second.


Tue Jun 26, 2012 7:25 pm
Profile
Senior Roboticist
User avatar

Joined: Wed Sep 28, 2011 10:13 pm
Posts: 630
Location: If I told you, I'd have to kill you.
Post Re: Program to display RPMs
MHTS wrote:
I don't know anything about PF-XL motors but 200 RPM isn't really that high. It is only about a little over 3 revolutions a second.


Looking more closely, I now see that I was at the wrong part of the page. I mistook the load characteristics for the free-spinning data. So, my program is fine. It is displaying the RPMs correctly.

_________________
A.K.A. inxt-generation
Self-proclaimed genius, and future world dominator.
My Brickshelf Folder
"Don't they teach recreational mathematics anymore?" - The Tenth Doctor
Bow down to Nikola Tesla, King of the Geek Gods.


Tue Jun 26, 2012 7:40 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.