Go to Post I have never before seen the words "smaller" and "Saturn V" used in the same sentence. Wow. :yikes: - DonRotolo [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
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 16-02-2013, 10:32
chriz4gx chriz4gx is offline
Registered User
AKA: Christopher Villar
FRC #2871 (Beantown Botz)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Boston,MA
Posts: 45
chriz4gx is an unknown quantity at this point
Using VEX Ultrasonic Sensor

So I'm trying to use a VEX Ultrasonic Sensor(276-2155) But I'm having a difficult time trying to find the correct Labview Example that works with the VEX Ultrasonic Model. Where can I find an example? Also, when we program the Ultrasonic Sensor how would I get it that it sends information(about Distance) to the "User Messages" Text Box in the Driver Station and continuously updates it? Thanks
Reply With Quote
  #2   Spotlight this post!  
Unread 17-02-2013, 00:45
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Using VEX Ultrasonic Sensor

Quote:
Originally Posted by chriz4gx View Post
So I'm trying to use a VEX Ultrasonic Sensor(276-2155) But I'm having a difficult time trying to find the correct Labview Example that works with the VEX Ultrasonic Model. Where can I find an example?
I don't think there's an example for that type of sensor. The way it works is not something that is supported directly by the WPI library. I'm not even sure anyone has figured out the proper wiring and counter configuration to get useful information from it. Hopefully someone will answer with advice you can use.

Quote:
Also, when we program the Ultrasonic Sensor how would I get it that it sends information(about Distance) to the "User Messages" Text Box in the Driver Station and continuously updates it? Thanks
Use the "Write User Message" function in the WPI Driver Station function palette.
Reply With Quote
  #3   Spotlight this post!  
Unread 17-02-2013, 01:29
josneville's Avatar
josneville josneville is offline
The Chosen One
FRC #0540 (Talon 540)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2010
Location: GHS Talon 540 Team
Posts: 15
josneville is on a distinguished road
Talking Re: Using VEX Ultrasonic Sensor

Most ultrasonic sensors are connected via the analog module of the CRIO. If that is true in your case, read the voltage from the analog channel and multiply it by 100 to get the distance from the sensor.
__________________
-Success is the Key to Life. I have no life. Hmmm......
Reply With Quote
  #4   Spotlight this post!  
Unread 18-02-2013, 10:02
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: Using VEX Ultrasonic Sensor

There used to be a set of (horribly written) vis in WPIlib to support an ultrasonic encoder with two digital ping/response lines. I believe they still exist, but I'm not sure.

It used the DIO Pulse feature and DIO Interrupt features to generate and listen to a pulse. Unfortunately, it was written to Wait On Interrupt, causing the thread that called the ultrasonic sensor to hang until either a pulse was returned, or the timeout (60ms) was reached.

Unfortunately, the majority of the library is written synchronously with blocking calls like this, which is IMHO really really bad embedded code design.

The FPGA has a lot of rarely or never used features which I have never seen used, including these DIO pulse and interrupt features, and a lot of DMA capabilities.
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
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 22:52.

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