Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

synchronized retriggerable analog output

Hi Dan,

 

The FIFO output buffer size is 8191 samples shared among the channels. The 6341 has 2 analog outputs. I used 5k and 10k sample rate at 70 fps. At 5k everything seems to be fine, at 10k the illumination misses every 2nd frame. The same happens at 500fps with 100k sample rate. At 100fps it doen't work with any sample rate.

 

Unfortunately I don't have an oscilloscope good enough to pause both signals on the screen.

 

Best regards,

Kostas

0 Kudos
Message 11 of 15
(803 Views)

Hi Kostas,

 

If you use the version I attached, I take the size of three arrays, sum them,  and use this to program the number of samples to generate.  What is this value?

 

Dan

0 Kudos
Message 12 of 15
(802 Views)

At 100fps, 10k sample rate it is 101 and 201 at 20k rate. I subtract 1 from this value and I don't get the error any more.

0 Kudos
Message 13 of 15
(800 Views)

Kostas,

 

I think this makes sense. At 10 kHz, it takes 10.1 ms to generate your 101 sample waveform.  This is slightly longer than your 10 ms frame time. The same is true of a 201 sample waveform at 20 kHz.  As written now, it appears as though your low time and high time occupy your entire period, not leaving any time in your period to set your output back to zero.  I'm not familiar enough with your timing requirements to propose how to modify the data such that the entire waveform fits within a single frame time, however several thoughts come to mind:

 

1) Drop a high sample or low sample. This would shorten your waveform by enough to fit into your frame time.

2) Same as my first suggestion, but output at a higher rate with more samples.  This would lower the impact of dropping a sample.

 

One last point I'd like to bring up.  Both your camera and your 6341 operate on their own HW clocks.  These clocks are not synchronized.  This means both of these devices may have a slightly different view of what 10 ms actually is.  If possible, I would try to leave a bit of extra head room in the analog generation to account for this.  As an example, let's take the 100 fps use case, and assume we want a high time of 1 ms and a low time of 9 ms.

 

I'm going to pick a sample clock rate of 100 kHz (1000 samples would create a full 10 ms period).  I want to leave a little bit of 'wiggle room' to account for the lack of synchronization between my devices, so I'm only going limit my waveform to 998 samples.  Ideally, I would generate 900 low voltage samples followed by 100 high voltage samples, but I also need to reset my output to 0 V... this means I need to eliminate 3 samples from my ideal. As such, I will remove two low time samples and one high time sample to create a waveform made of 898 low voltage samples, 99 high voltage samples, and zero voltage sample.

 

Initially, I would have had low voltage from time 0 to time 9 ms, and high voltage from 9.1 to 10 ms, with no time to output zero volts.  With my modifications, I should have low voltage from time 0 to time 8.98 ms, and high voltage from 8.99 ms to 9.97 ms.  At 9.98 ms, I'll drop the output to zero volts, and leave myself with .02 ms of unused time.  By doing this, we keep the voltage transitions very close in time to where they'd be ideally, but allow ourselves a little extra time to complete the waveform before the next trigger.

 

Would an approach such as this work for your application?

 

Dan

 

 

 

 

 

0 Kudos
Message 14 of 15
(794 Views)

Dan,

 

I believe something like that should work. It is more important to have the same waveform "fill" each frame duration without sample drops, than to try to fit the output exactly into the time of each exposure. I will give it a try.

 

Thanks,

Kostas

0 Kudos
Message 15 of 15
(792 Views)