LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

USB-6212 FIFO DataXferReqCond problem

I am trying to generate an analog wave on the fly from a file using the USB-6212.    my Program works except that there is the delay from onboard Fifo (which is 8.2 seconds at 1Khz output sample rate)

 

I found the article about changing the DataXferReqCond property to "On Board Memory Empty" but it has no effect. 

 

http://zone.ni.com/devzone/cda/tut/p/id/4402 

 

  The Article has a vi titled analogoutputdatatransqecond.vi   that I also tried and it also does not respond to the DataXferReqCond property (there is always the full FIFO delay).

 

 

Any pointers??

0 Kudos
Message 1 of 2
(2,095 Views)

Problem Solved.

 

 

Partly Because of my misunderstanding of how DAQmx writes work.    My loop would would keep trying to write my blocks (100 points) from the data file on every loop interation.    The DAQmx write would instantly return for until the entire FIFO was filled.   I thought that it would block under my buffer was empty.

 

 

To solve the problem I set the DataXferReqCond to "On Board memory half full or less".   I them would monitor the TotalSamplesPerChanGenerated property.   I would only do writes when this was greater than a buffer size difference between the number of samples that have been gerenated and how many data blocks I read from my data file.

 

 

Seems to work now except that every once in awhile data does not get written fast enough and I get an error that the FIFO is empty.

 

 

0 Kudos
Message 2 of 2
(2,087 Views)