LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I synchronize an analog voltage output and analog voltage input on the NI USB 6251?

All,

 

I am trying to use the NI USB 6251 to create what is, effectively, a low-frequency ultrasonic pulser/receiver. I want to be able to output a toneburst voltage pulse to an ultrasonic transmitter at a specified pulse repetition frequency on one of the analog output channels. Then, I would like to read the received waveform from a receiving transducer on one of the analog input channels. Most importantly, I would like the input and output channels to be synchronized, such that the analog input channel begins receiving at the same exact time that the analog output channel transmits the waveform.

 

Thanks,

Owen

0 Kudos
Message 1 of 8
(3,289 Views)

Take a look at the Trigger property node in the DAQmx palette.  There are plenty of settings to go with.  My gut feel is you will need to setup a digital edge trigger and run from a digital output to one of your PFIs, using the PFI as the trigger source.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 8
(3,285 Views)

Because the pulsing and receiving are both done on the 6251, isn't there a way to synchronize them internally without having to connect a physical wire and use digital I/O?

0 Kudos
Message 3 of 8
(3,281 Views)

Hi Owen2424,

 

There is a shipping example that should accomplish this task. It is called Multi-Function-Synch AI-AO.vi. You can find this example by navigating in the Example Finder (Help>>Find Examples in LabVIEW) to Hardware Input and Output >> DAQmx >> Synchronization >> Multi-Function.

 

I hope this helps.

 

Regards, 

James D.
Applications Engineer
National Instruments
0 Kudos
Message 4 of 8
(3,259 Views)

James,

 

Thank you for your response. I have tried this example and was unable to get it to work. The only way that I've been able to successfully get a signal is with some code that I threw together with two DAQ Assistants; one for transmitting the pulse and one for receiving it. However, these transmission and reception are not synchronized. The pulse will have different arrival times each time I start and stop the program and performing other operations, say, maximizing/minimizing the front panel cause the received pulse to shift in time. Are you able to provide any further assistance?

 

Thanks,

Owen

0 Kudos
Message 5 of 8
(3,169 Views)

Hi Owen2424

 

What kind of error do you get when you run that example? Could you upload some screenshoots or the error code?

 

Regards

Esteban R.

0 Kudos
Message 6 of 8
(3,154 Views)

Esteban,

 

I've attached FP and BD screenshots of the "Multi-Function-Synch-AI-Ao.vi", which I've modified. Here is what I'm trying to do:

 

AO: Send a toneburst pulse of approximately 10 to 50 cycles at ultrasonic frequencies (around 40 kHz) to an ultrasonic transmitter.

 

AI: Receive the toneburst ultrasonic waveform.

 

SYNCH: I am trying to synch the AI and AO so that the AI begins receiving at the exact (or nearly exact) time that the pulse is sent to the transmitter on the AO line.

 

I would like to do this at an adjustable repetition rate so that the display would be similar to an oscilloscope.

 

Thanks in advance,

Owen

Download All
0 Kudos
Message 7 of 8
(3,138 Views)

Hi Owen2424

 

The code looks fine, but I have not understood what exactly is what you mean. The data on the graph indicator will depend on the amount of data that you have acquired. Nevertheless you can change the scale and use the zoom tools with the graph palette.  

 

Regards

Esteban R.

0 Kudos
Message 8 of 8
(3,120 Views)