Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

double buffer with PCI 6115

We are using the PCI 6115 board for analog output in double buffered configuration. Once the buffer is filled initially and the output operation is started, new scanblocks are written into the buffer in a while loop using the AO Write.vi. Everything works fine besides one problem: Despite already new scanblocks have been written to the buffer ('number of buffers done' form AO Write.vi is greater 0), the buffer puts out exactly three times the values that were initially written into the buffer, independently from buffer size, update rate and scanblock length. After these three buffer iterations everything works OX and new values, written into the buffer, are put out. We tried to fix this problem by disabling the 'Allow Regeneration' option of the initial AO Write.vi, however then the buffer is generated only once despite new data has been written into it. It seems to us that the buffer has to be regenerated three times before new data is accepted. Is there anybody who has had similar problems and can help us.

Thanks a lot!
0 Kudos
Message 1 of 6
(3,879 Views)
Hi,

you can find a solution for double buffered output here:

http://digital.ni.com/public.nsf/websearch/A882EEF24E1C27F786256E820066D0D0?OpenDocument


Kai Kratt
National Instruments
0 Kudos
Message 2 of 6
(3,865 Views)
Thank's for your advice,
however we've already tried out to disable regeneration and it didn't work. For us it is very important to write new data into the buffer 'on the fly', for example every time the while loop completed a well defined number of iterations, and therefore a FIFO memory cannot be used as data cannot be written into the buffer any more. As already mentioned after three times of trying to write into the buffer everything works fine, and the buffer accepts our new data. Does anyone know if there's a solution for our problem?

Thank's a lot!
0 Kudos
Message 3 of 6
(3,845 Views)
Have you tried this yet:

http://digital.ni.com/public.nsf/websearch/EF29D21A990FB5ED86256B3A0062BFF6?OpenDocument
0 Kudos
Message 4 of 6
(3,832 Views)
Maybe our problem is of the same type as described in the link below:

http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/53b5101b1fbf017886256f3200748793?OpenDocument

Is there any possibility to influence the call to DAQmxWriteRaw?

Thank's a lot!
0 Kudos
Message 5 of 6
(3,825 Views)
Could be that this is your problem.

But: DAQmxWriteRaw is command from CVI and does not exist in LabVIEW in that way. What you can do is to change the DAQWrite VI to write raw data. The problem now is, that the 6115 cannot use the new DAQmx driver but only the traditional driver.
0 Kudos
Message 6 of 6
(3,819 Views)