Hello,
I use a PCIe-6536 card to control a image sensor with ansi C, Microsoft Visual Studio and DAQmx 8.3 . Im able to generate the requiered signals and the sensor send also data back. To acquire data I have to trigger at one control signal, which starts one measure each 240us.
I tried to aquire the data like this:
DAQmxErrChk( DAQmxCreateTask("read",&taskREAD));
//create channel with 4 lines(port 2 lines 0,1,2,3)
DAQmxErrChk( DAQmxCreateDIChan(taskREAD,DEV1/port2/line0:3,"", DAQmx_Val_ChanForAllLines));
//set sample clock for reading 20MHz ( 2000 samples)
DAQmxErrChk( DAQmxCfgSampClkTiming (taskREAD, "OnBoardClock", 20000000, DAQmx_Val_Rising , DAQmx_Val_FiniteSamps, 2000));
//set trigger
DAQmxErrChk( DAQmxCfgDigEdgeStartTrig (taskREAD, "/DEV1/PFI0", DAQmx_Val_Falling ));
while(1)
{
//start reading
DAQmxErrChk( DAQmxReadDigitalU8 (taskREAD,2000,timeout, DAQmx_Val_GroupByChannel,inBufffer,2000, &read,NULL));
//wait until buffer is full
DAQmxErrChk( DAQmxWaitUntilTaskDone (taskREAD, timeout))
//*********************************************
//process and save data
//*********************************************
}Actually everything works, but the problem is, to read once it needs about 2ms. But I want to use the sensor at maximal rate, it means 10 time faster.
Any ideas to solve this problem?
Thanks
marc
Message Edited by stehsegler on
11-06-2007 05:34 AM