Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

6218 analog out latency

Good Morning,

 

currently we’re faced with some problems using analog out with USB-6218.

Our application is constructed using single voltage values for analog out, because of this we use the function DAQmxWriteAnalogScalarF64 up to now.

We have the same application code for different hardware (PCI-6221, PCMCIA-6062E), which are working fine.

 

Because of the latency on the usb(~750us for each call) bus we get timing problems (higher sample rates weren’t possible).

Because of this we moved the write call to an separate thread.

 

We tried different ways to reduce the latency. We tried to use hardware triggered analog out with small blocks (2 values).

To be sure we get an accurate analog out rate. But this didn’t worked as thought.

This were the function calls:

 

DAQmxErrChk (DAQmxCreateAOVoltageChan(taskHandle,"Dev1/ao0","",-10.0,10.0,DAQmx_Val_Volts,NULL));

DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandle,"",1000.0,DAQmx_Val_Rising,DAQmx_Val_FiniteSamps,1000));

DAQmxStartTask(taskHandle);

for(….) //simplified routine

{

                float64 data[2];

…

data[0] = xyz[i];

data[1] = xyz[i+1];

DAQmxWriteAnalogF64(taskHandle,2,0,10.0,DAQmx_Val_GroupByChannel,data, NULL, NULL)

}

 

 

xyz is filled dynamically (values not known before measurement, could be dependend on analog in). We got an analog output but it wasn’t not as expected.

Is there something wrong in this calls. Or is it impossible to fill the hardware timed analog out buffer during a running task.

 

Other configurations we tried to reduce latency:

DAQmxCfgOutputBuffer

DAQmxSetAOUseOnlyOnBrdMem

DAQmxSetAOUsbXferReqSize

 

Thanks, Regards

Markus

0 Kudos
Message 1 of 1
(3,599 Views)