I've got a couple ideas, but take them with a grain of salt -- I haven't used the FPGA card and don't (yet) have LV 7.1 to look at the code.
First of all, have you verified that when you set up your AI card for 32 kHz sampling, your
actual sampling rate is indeed 32.0000000 kHz? I suspect the answer will be yes because 32 kHz corresponds to exactly 625 cycles of the 20 MHz clock on the E-series boards. In general though, this quantization error is something to watch out for.
More likely, you're simply dealing with a discrepancy in the accuracy of the two cards' clocks. A quick look at specs on some E-series boards shows an accuracy spec of only about 0.01% where you're finding a discrepancy of less than 0.001%.
Can you generat
e an output from the FPGA card to drive your AI card? For example, if you were able to toggle a DIO on the FPGA every 1875 cycles of your 120 MHz counter, you'd produce a 32 kHz clock. If you set up your AI to use
that clock for sampling, you should get "exactly" 120000000 counts per 32000 samples, give or take signal propagation variations.
Note: the above is based on interpreting your description to mean that your AI card is only sampling a single channel, since you seemed to equate the sampling rate with the "AI Convert" rate. Either that or you've got a S-series board that does simultaneous sampling.
If you are sampling several channels on a multiplexing AI board, you may need to generate both a scan and channel clock (a.k.a. sample and convert clock under DAQmx) with the FPGA.
-Kevin P.
ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.