Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Strange latency in DAQmxWriteAnalogF64

Hi all. We are using a pci-6122 board in order to output data acquired with other device. This data, once acquired is processed to apply some filters and then is output through one channel of the pci-6122 board (Actually we do output though analog channels 0 and 1 but with fdifferent processing algorithms). This is done at a rate of 32768 Hz and we write 10944 data values every 334 msec. This is, we call DAQmxWriteAnalogF64 3 times per seconds with 10944 samples every call.

The task is started after the first call for writing because start can't be called without data previously written.

In this scenary we have appreciated that the calling of DAQmxWriteAnalogF64 adds around 200-250 msecs to the loop. Taking in account that processing (applying filters and so) is only around 30-40 msecs, this is inadmissible.

Any idea about this problem????
0 Kudos
Message 1 of 3
(6,403 Views)

Hi "jpcanovas",

I kow that Problem, I have it too. My problem is, that the hardware always trys to acces onboard memory when you issue the start function outputting a continous numer of samples.

Try to work buffered (that means countinous output)...

(DAQmxCfgSamplClkTiming(taskhandle,"",samprate,DAQmx_Val_However,DAQmx_Val_ContSamps,NumberOfSampsToBeWrittenPerChannel);

You will need to put your samples into the buffer continously.

Hope I could help you,

Hanna

0 Kudos
Message 2 of 3
(6,392 Views)

Sorry, I found a typo,

it should of be "a finite numer of samples..."

And access wit two s.

0 Kudos
Message 3 of 3
(6,389 Views)