LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Retriggerable AI Problem:: very desperate!

Hi! My name is Dmitry, I work on Optical Coherence Tomography project right now. We have PCI-6111, LV8.20 with the lastest NIDAQ-mx.  Dell PC 2.8Ghz, 2.5Gb RAM. Triangular  wave (100 Hz) drives the mirror in the OCT reference arm, on rising and falling slope of the wave I want to acquire as many points as possible with at least 500kHz sampling frequency (expected frequency of signal is 200kHz) (see attachments). So the task is simply Analog Triggered Aqusition. However some triggers were missed (due to some overhead produced by Start Stop task as far as I understood). I was suggested to use retriggerable Analog Aquisition  (Multi-Function-Ctr Retrigg Pulse Train Generation for AI Sample Clock.vi). It does work fine only with low sampling frequencies. If I use 500kHz and number of samples less than 200 it seems to work fine. Once number os samples exceeds 200 (and it is only 0.4 ms of aquisition instead of 4-4.5 ms) I either have Error -200279 occurred at DAQmx Read (Analog 1D Wfm NChan NSamp).vi:2 or nothing seems to happen, namely loop still iterates but no data is outcoming. PC does not freeze or anythning like that, jsu no data at all + Number of Available Samples is 0. I have check the train of  pulses and it is correctly positioned and of correct length (see attachment). I googled this problem and found some forums where people reported exactly the same problem. However no answers were given.
 
Below is the description of Error -200279 
Error -200279  Possible reason(s):
Attempted to read samples that are no longer available. The requested sample was previously available, but has since been overwritten.
Increasing the buffer size, reading the data more frequently, or specifying a fixed number of samples to read instead of reading all available samples might correct the problem.
 
I am positive that I use DMA data transfer mechanism. Possible explanation is that 6111 has only 8192 samples big onboard memory and it is somehow related to this.
 
I have contacted NI and was suggested to use the input buffer size equal to the number of samples and use option "Do not overwrite samples". It did not help at all. Very similar behavour of the program remained  + different sort of errors related to onboad memory being overwritten or error "-200222" - Acquisition has been stopped to prevent an input buffer overwrite.
 
Could onyone please give me an hint on this probelm. I am quite sure that there must be a solution. It does not seem to be a very difficult task. Any help will be greatly appreciated!!! Thank you very much.
 
Dmitry
0 Kudos
Message 1 of 3
(2,613 Views)
Hi Dmitry

As this is now solved, I am going to put up the solution for others.

The main issue was we were acquiring 5M samples of data per second, but because of out loop rate of 5ms and reading only 22000 Samples every loop, we were only reading 4.4M samples per second and so were filling up the buffer.

The read operation was waiting until 22000 samples were available before taking them from the buffer, so we now take a multiple of this number so to break out the data into raising and falling slopes is easier, and we grab more data at a time so we read more data than is acquired.

Regards
JamesC
NIUK and Ireland

0 Kudos
Message 2 of 3
(2,561 Views)
Hi James,


Thank you very much for all your advices!!! It really guided me to the final solution!!! Thanks a again.
0 Kudos
Message 3 of 3
(2,527 Views)