Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

USB-6341

Hi,

 

I need to kow if this is possible. I want to test a ultrasonic sensor that has only a GND, +5V and SIG. I generate a 5us pulse on the SIG line and then I need to measure the Ping Pulse that feedback on to the SIG line.

 

No this sounds very simple but I have tried different approches but it seems I can have the USB-6341 switch from a counter out quick enough to a counter input.

 

If I read the pulse with an oscilloscope I can see that the DAQmx cannot switch the post quick enough to an input.

 

What is the fastest why of switching a Output to an Input?

 

One send a 5us pulse and you have 750us to change your port into a input else you miss the input pulse which you need to read the width to measure the distance.

 

Best Regards,

 

Gary

0 Kudos
Message 1 of 3
(3,708 Views)

This sounds like a hardware question and does not belong in the feedback forum. I have asked the moderator to move it elsewhere.

0 Kudos
Message 2 of 3
(3,704 Views)

GaryGC wrote:

 

One send a 5us pulse and you have 750us to change your port into a input else you miss the input pulse which you need to read the width to measure the distance.

 


 

Changing between input and output requires a software command on the 6341.  The added latency of sending the command to the hardware over USB essentially guarantees that you would not be able to do this in the time window you require (even on the PCIe variant of the 6341 there wouldn't be a guarantee).

 

Some NI hardware has per cycle tristate which allows the digital line to change between input and output based on a pre-determined buffer that is driven by a sample clock.  This is the feature you would need but the hardware that supports it is generally pretty expensive.

 

If I were you, I would instead consider using an external MUX to disconnect the output after the pulse has been generated.

 

 

Best Regards,

John Passiak
0 Kudos
Message 3 of 3
(3,663 Views)