View Single Post
  #1   Spotlight this post!  
Unread 27-01-2009, 10:19
Pausert Pausert is offline
Registered User
FRC #1727 (REX)
Team Role: Leadership
 
Join Date: Jan 2009
Rookie Year: 2007
Location: Maryland
Posts: 69
Pausert is an unknown quantity at this point
VEX Ultrasonic Sensor

So, I've been trying to get the the VEX ultrasonic sensor to work with the cRIO. I've created a while loop in which I have a "wait", the Ping VI, and the Get Distance VI. Outside of the loop I have the respective Open and Close VIs for Ultrasonic sensors.

It /partially/ works. If I run it normally, I receive the distance to whatever object was in front of the sensor when I hit run. This also happens if I tell it to run continuously. Also, I attached a display to the loop timer. This timer stops updating after a period of time.

BUT: If I ask it to highlight execution it will update the distance as fast as the highlights move.

Essentially, I get a distance out of it, but it won't update the distance.

I think the problem may lie in the respective lengths of the ping time and the loop wait time. Also, I am using the second update of Labview.

Any pointers? Tips? Attached is my code with some comments detailing the situation.
Attached Files
File Type: zip Ultrasonic_Senor_Robot.zip (130.0 KB, 93 views)
Reply With Quote