LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I create a TTL signal with a NI USB-6008 so that I can measure the pulse width with a counter? I am using Labview 8.6 and a Parallax Ping))).

I need to create a 5E-6s high and 5E-6s low TTL signal to send to a Parallax Ping.  I then need to be able to measure the pulse width of the return signal.  I am trying to do this in order to measure distance with sonar.  Any suggestions?

0 Kudos
Message 1 of 5
(3,579 Views)

Sorry.  The USB-6008 has software timed digital I/O.  You cannot run it fast enough to create the 5 us pulses you want.  You will need a faster DAQ device or some external circuitry that you trigger from the 6008.

 

Lynn

0 Kudos
Message 2 of 5
(3,570 Views)

Would it be possible with a NI USB-6501?

0 Kudos
Message 3 of 5
(3,564 Views)

On page 13 of the User Guide and Specifications it says that the DIO is software timed, so that device will not work.

 

Lynn

0 Kudos
Message 4 of 5
(3,556 Views)

Well since you seem familiar with Parallax you might want to use one of their microcontrollers as the trigger generating device. Or you could use a $2.00 controller like the ATMEL ATTINY13 (8 pin 20Mhz). Use your USB-6008 to create a pin change on the external micro via a DIO on the  6008. Then listen for the ping return from the Parallax Ultrasonic  on the USB-6008 counter input.  Remember to divide the width of the return pulse by 2 (ping time down and back) to get the correct distance.

 

You could have a simple push button on the LV FP to start the ping and an Indicator to display the result. On the Block Diagram you could probably getaway with an Express VI for DAQAssist, since the timing will be sloppy any way.

 

Alan

0 Kudos
Message 5 of 5
(3,542 Views)