Quantcast
Channel: Digital I/O topics
Viewing all articles
Browse latest Browse all 2167

How to set a fixed latency / dealy to NI 6535b card for digital output

$
0
0

Hello!

 

I am using NI 6535b card to output digital waveform at tens of kHz sample rate. However, I suffer from a unknown delay between my sample clock and the first output of the waveform. For example, my card will output a series of waveform to do beam scanning and at the same time a camera will be triggered by the sample clock to capture the beam position simultaneously. Ideally, the first beam position (or the first sample of the waveform) corresponds to the first frame of the camera. However, I notice sometimes the first beam appears in the 3nd frame and sometimes in the 5th frame. According to my test, under 1kHz the latency is not an issue. Otherwise, the latency of the card is not fixed and is related to the sample rate. 

 

My question is how I can set a fixed delay to the card so that the first beam position (corresponding to the first output of the waveform) is always synchronized to the first frame of the camera. Any help will be appreciated!!!

 

 

For your information, I am using the "continuous pipelined digital generation" sample code as attached below to output the waveform. The waveform is already generated before I run the code.

 

unfixed latency problem.png  


Viewing all articles
Browse latest Browse all 2167

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>