Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Using VEX Ultrasonic Sensor (http://www.chiefdelphi.com/forums/showthread.php?t=113634)

chriz4gx 16-02-2013 10:32

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

Alan Anderson 17-02-2013 00:45

Re: Using VEX Ultrasonic Sensor
 
Quote:

Originally Posted by chriz4gx (Post 1234280)
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.

josneville 17-02-2013 01:29

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.

apalrd 18-02-2013 10:02

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.


All times are GMT -5. The time now is 12:07.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi