LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Does anybody have sample programs of labview with a USB 6009 attached to a HC-SR04 sensor?

Solved!
Go to solution
Hi guys, As it says in the title, I'm looking to run a sample labview program with a USB 6009 attached to a HC-SR04 sensor. Do you guys happen to know where I can find such sample programs, or better yet do you have a sample program yourself?
0 Kudos
Message 1 of 6
(3,298 Views)

there is daq assistant in daqmx toolkit why you do not use that ?

0 Kudos
Message 2 of 6
(3,287 Views)
Solution
Accepted by topic author abcxyz123

Hi abc,

 

it's a bad combination to use an USB6009 with a SR04 sensor! Did you read the manuals for both devices?

 

The sensor outputs a pulse of 150µs to 38ms and you need to measure the pulse duration.

On the USB6009 you need to employ an AI to do this and you get a max sample rate of 48kHz giving you a sample resolution of ~21µs. This will result in limited accuracy of your measurement.

The next problem is to output the 10µs TTL pulse needed to trigger a measurement of the SR04: the USB6009 can only drive the outputs with software timing. You will never be able to output pulses with just 10µs duration with the USB6009 alone. Using some additional electronics (using a 555 or similar) on a PCB or breadboard may help here…

 

@Hatef: how should the DAQAssistent be helpful for this very task?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 3 of 6
(3,273 Views)
Grew
thank you for your information about a sensor it was really helpful esp for me
I just want to help to work with 6009
and honestly I did not have any information about this sensor
0 Kudos
Message 4 of 6
(3,250 Views)

@Hatef.fouladi wrote:
Grew
thank you for your information about a sensor it was really helpful esp for me
I just want to help to work with 6009
and honestly I did not have any information about this sensor

If you did not have any clue about this sensor product, why you post then? It is not a help, but just creating noise in the forum.

By the way, I would never advise to use Express VIs for DAQ, you get more trouble with it than benefit (repeated Init/close resources, dynamic data type). You can test the HW from MAX, and after create a proper DAQmx task using DAQmx functions. Of course, you can start with a DAQ Assistant, and convert it into DAQmx functions...

Message 5 of 6
(3,231 Views)
Blokk
I did not have information about sensor but it is not means that i did not have information about the 6009
I am the only person who sell 6009 in my country
by the way I use max to show customer the card is work
also I think Express is simple example but for any kind of that device mode
so newbi can use it make some setting then open front and open front panel of Express to see simple example related to his work
also you always give me Helpful advice
I Hope I could Compensate one day
0 Kudos
Message 6 of 6
(3,213 Views)