View Single Post
  #2   Spotlight this post!  
Unread 21-01-2013, 13:02
propionate's Avatar
propionate propionate is offline
Team co-lead and LabVIEW programmer
AKA: Stephen
FRC #1732 (Hilltopper Robotics)
 
Join Date: Jan 2012
Rookie Year: 2009
Location: Milwaukee
Posts: 93
propionate is on a distinguished road
Re: Scaling motor speed in LabVIEW

I have attached code that should do what you want. The while loop is obviously unnecessary if you have this in Teleop or Period Tasks. This code will save the elapsed time of the program to a local variable while a button (the Boolean input) is not pressed. When the button is pressed, it will find the difference between the time at the moment the button was pressed and the current time. This is then divided by a constant to give an output your motor can use.

Let me know if you have any questions.
Attached Files
File Type: vi Incremental Motor Speed.vi (8.3 KB, 34 views)
Reply With Quote