I have a MSVC6 / NI-DAQmx PCI-6733 ansi-C based system that responds to a digital trigger with analog output (among other things). I have my 6733 setup to start AO on a digital edge trigger. It is working fine, but the C call DAQmxWriteRaw(taskAnalogOut, SAMPS_PER_CHAN, true, 0.0, (void *)writeArray, &sampsPerChanWritten, NULL); takes between 3ms and 7 ms to return. This is way too long for my application. I have tried loading fewer samples and not error checking etc. but it always takes way more than 1ms. I'm using a dual processor xeon 2.4 Ghz w/ 2 Gbytes ram running XP. I've tried changing the priority of my .exe file but that didn't speed it up.
Is there a way to change the priority of the NI-DAQmx drivers? 5ms @ 2.4Ghz is 12,000,000 clock cycles per CPU. Is there any way to speed this operation up?
Cale F. Brownstead
cfb102@psu.edu
814-863-5379
P.S.
Here is a code snippet of the AO channel setup
#define VPP 20.0
#define FS 200000
#define SAMPS_PER_CHAN 2000
#define NUM_CHAN 6
checkError( DAQmxCreateTask ("AO_6ch", &taskAnalogOut), 2000);
checkError( DAQmxCreateAOVoltageChan (taskAnalogOut, "/pci6733/ao0:5", "ANALOG_0_5_OUT", -VPP/2, VPP/2, DAQmx_Val_Volts , NULL),2010);
checkError( DAQmxCfgSampClkTiming (taskAnalogOut, NULL, FS, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps, SAMPS_PER_CHAN),2020);
checkError( DAQmxCfgDigEdgeStartTrig (taskAnalogOut, "/pci6733/PFI6", DAQmx_Val_Falling),2030);
Cale Brownstead