11-20-2017 02:51 PM
I am working on a project for my DAQ class that tasks me to create a VI to measure distance with a HC-SR04 rangefinder. The VI itself runs without errors (or at least doesn't return an error until I abort) but no matter what channels I use for the trigger/echo I get no value in my output.
This is what I'm currently using as my VI. I've downloaded examples set up by others here but they all don't return an output either. I want to say it's a problem between the Elvis board and LabView but I cannot say for certain.
Solved! Go to Solution.
11-21-2017 08:47 AM
Hey JAddison! Just a few questions here to clarify where the issue might be.
Can you tell us a little bit more about how you have your system wired up?
Is your rangefinder providing output--e.g., if tested with a multimeter, do you see voltages?
Is your numeric indicator outputting a zero value or does it stay uninitialized?
11-22-2017 08:38 AM
Can you tell us a little bit more about how you have your system wired up?
I have the input/output to the rangefinder connected to the A0 port on the Elvis board. LabVIEW recognizes the board and the connection options are there they just don't show.
Is your rangefinder providing output--e.g., if tested with a multimeter, do you see voltages?
I tested with a multimeter but the voltage stays the same no matter what's in front of it. I had to wire it up to a function generator and oscilloscope just to get ANY form of change in reading.
Is your numeric indicator outputting a zero value or does it stay uninitialized?
The indicator stays at zero the whole time.
11-27-2017 01:16 PM
If you wire a known signal to the Elvis board (i.e. function generator), do you get any reading? If not, you may want to reinstall the driver. If that does not work, this may be an issue with your Elvis board.
11-27-2017 01:59 PM
I said earlier that I did hook the trigger to a function generator and the echo to an oscilloscope in hopes of getting any reading, I was able to get different frequencies when I moved an object within the rangefinder's range. I don't think this is a problem with the Elvis board because I have used this same board in earlier projects this semester, unless another student's board got swapped with mine.
11-28-2017 03:58 PM
I am not too familiar with the HC-SR04, but this forum discussed it: https://forums.ni.com/t5/Academic-Hardware-Products-ELVIS/How-to-use-Labview-to-calculate-the-distan.... It seems like you may want to use the Digital I/O.
12-04-2017 12:44 PM
Brian,
While you didn't give me the exact solution I needed, your link did direct me to why I was not getting any output (I had to connect to the counters on the Elvis board, not the analog or digital I/Os). With that out of the way I can now work on making my own code for the rangefinder.