07-13-2011 07:28 AM
Hello,
I'm trying to write an analog output and read the input simultaneously. I used the Multi-Function-Synch AI-AO.vi example and connected the output of my PCI-4461 directly to the input with a short BNC cable. I've modified the VI a little to output a triangular wave and show both the input and output at the same time. It seems there input channels starts reading at some delay after the output:
My problem is that I need them to start at the exact same time. Here is a screen shot of the modified VI (also attached).
Any ideas???
Thanks,
Ran
Solved! Go to Solution.
07-13-2011 02:12 PM
Hi Ran,
This knowledgebase explains where the delay comes from: Why Is My Data Delayed When Using DSA Devices?
One way to compensate for this is to discard the appropriate number of samples from the beginning of the AI acquisition.
Brad
07-14-2011 02:37 PM
Hi Ran,
I had a similar problem earlier....I would suggest removing the data buffer as it is not required and also in the read vi inside the loop, instead of the data buffer specify a fraction of the sample rate or if that does not work the sample rate as it is as the "samples to read".
Also only one write vi will suffice you have two over here, unless you have another reason for that.
best of luck
sanju
07-18-2011 03:48 AM
Thank you very much for both your comments, they were very helpful.
I've measured the delays of the PCI 4461, and they match the sum of the two delays mentioned in the specs.
Here's a table summarizing it:
Frequnecy Range | ADC Filter Delay | DAC filter delay | Sum | Measured delay | Diff |
3.2-6.4 | 35.875 | 37.4 | 73.275 | 74 | 0.725 |
6.4-12.8 | 39.75 | 38.5 | 78.25 | 78 | -0.25 |
12.8-25.6 | 47.5 | 40.8 | 88.3 | 89 | 0.7 |
25.6-51.2 | 63 | 43.2 | 106.2 | 108 | 1.8 |
21.2-102.4 | 63 | 48 | 111 | 113 | 2 |
102.4-204.8 | 63 | 32 | 95 | 99 | 4 |
Also, sanju, your tip was very helpful. Writing the output once in the beginning and reading the input in loops is much better than writing the output every loop as well - this caused all sorts of sporious delays.
Best,
Ran