Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   ultra sonic Sensor (http://www.chiefdelphi.com/forums/showthread.php?t=125290)

katsauga 26-01-2014 15:04

ultra sonic Sensor
 
I am having trouble finding sample code for a MaxBotics ultrasonic sensor. Can Someone submit a place to start, or a sample Labview code? :D

Jay1986 26-01-2014 15:15

Re: ultra sonic Sensor
 
The maxbotics ultrasonic sensor can output analog data, so you can wire it to the analog module and read it in labview as an analog source. There are other ways to read the data but this is the simplest.

katsauga 26-01-2014 15:17

Re: ultra sonic Sensor
 
Thank you for the help, I have coded it and will test it as soon as our teams electrician wires it. Thanks for all the help!

Lightfoot26 26-01-2014 15:20

Re: ultra sonic Sensor
 
1 Attachment(s)
Here is a quick example I snagged from Team 358's website! A great reference for when I was first starting out!

Alan Anderson 26-01-2014 21:32

Re: ultra sonic Sensor
 
Quote:

Originally Posted by katsauga (Post 1332760)
I am having trouble finding sample code for a MaxBotics ultrasonic sensor. Can Someone submit a place to start, or a sample Labview code? :D

If you're looking for example LabVIEW code, a good place to start is the LabVIEW Examples. On the Getting Started window, select the Support tab. Click the "Find FRC Examples..." link on the right and it will open the NI Example Finder with the FRC Robotics folder selected.

Under the Analog folder you will find "EZ1 MB1010 Sonar - Analog.lvproj", and Under the Digital folder you will find "EZ1 MB1010 Sonar - Digital.lvproj":
This example shows how to use the MaxBotix LV-MaxSonar-EZ1 Sonar Range Finder MB1010. It will display the distance from the sensor in inches.
The examples include pictures of the proper wiring for the sensor.

MrTechCenter 26-01-2014 23:04

Re: ultra sonic Sensor
 
Quote:

Originally Posted by Alan Anderson (Post 1332917)
If you're looking for example LabVIEW code, a good place to start is the LabVIEW Examples. On the Getting Started window, select the Support tab. Click the "Find FRC Examples..." link on the right and it will open the NI Example Finder with the FRC Robotics folder selected.

Under the Analog folder you will find "EZ1 MB1010 Sonar - Analog.lvproj", and Under the Digital folder you will find "EZ1 MB1010 Sonar - Digital.lvproj":
This example shows how to use the MaxBotix LV-MaxSonar-EZ1 Sonar Range Finder MB1010. It will display the distance from the sensor in inches.
The examples include pictures of the proper wiring for the sensor.

We used the Digital example and got an accurate reading from the example vi but when we tried to duplicate it in our own code, we failed to get a reading.

Alan Anderson 27-01-2014 02:25

Re: ultra sonic Sensor
 
Quote:

Originally Posted by MrTechCenter (Post 1332970)
We used the Digital example and got an accurate reading from the example vi but when we tried to duplicate it in our own code, we failed to get a reading.

You know the sensor and wiring are correct, because the example works. The problem must therefore be with how you integrated it into your code. Show us what you did and we'll take a look at it. We need to see where you opened the sensor in Begin.vi and wherever you're reading and displaying its value.


All times are GMT -5. The time now is 02:29.

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