View Single Post
  #10   Spotlight this post!  
Unread 01-02-2012, 12:46
MotorHead's Avatar
MotorHead MotorHead is offline
Programming Mentor
AKA: Jeff Beltramo
FRC #1922 (OZ-Ram)
Team Role: Coach
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Concord, NH
Posts: 68
MotorHead is a splendid one to beholdMotorHead is a splendid one to beholdMotorHead is a splendid one to beholdMotorHead is a splendid one to beholdMotorHead is a splendid one to beholdMotorHead is a splendid one to beholdMotorHead is a splendid one to behold
Re: Autonomous with Ultrasonic sensor doesnt work!!

We do a very similar routine, but with the vision system instead of the ultrasonic sensor. See the attached vi for an example.

The Target info would be your value coming from the ultrasonic sensor. The idea is to look at current value and compare to some setpoint. If you are above a setpoint, move one way. If you are below setpoint, move the other way and lastly if you are within some acceptable window, do nothing because you are in place. In the attached vi, the setpoint is zero, and the acceptable window is between .25 and -.25.

Reply back if more questions.
Attached Files
File Type: vi Position Control.vi (9.4 KB, 29 views)
__________________
Jeff Beltramo
Team #1922
Concord, New Hampshire

Reply With Quote