Quantcast
Channel: Digital I/O topics
Viewing all articles
Browse latest Browse all 2183

PCI6509 readout too slow

$
0
0

Hey,

 

I'm using PCI6509 card to read out 100 000 samples per channel (I have 3 channels) but at the moment, with my code, I can read out maximum 150 samples/second which is too slow. I'm guessing that there is something missing from my code which is written in C.

 

Here is the code I'm using:

TaskHandle digitaskHandle=0;
uInt8 readArray[300000];
int32 sampsPerChanRead;
float64 timeout = 1.0;

DAQmxCreateTask("DigiRead", &digitaskHandle);
DAQmxCreateDIChan(digitaskHandle,"Dev2/port0", "X", DAQmx_Val_ChanForAllLines);

DAQmxCreateDIChan(digitaskHandle,"Dev2/port1", "Y", DAQmx_Val_ChanForAllLines);

DAQmxCreateDIChan(digitaskHandle,"Dev2/port2", "Z", DAQmx_Val_ChanForAllLines);

DAQmxCfgChangeDetectionTiming (digitaskHandle,"Dev2/port2/line4","", DAQmx_Val_FiniteSamps, 100000);

DAQmxStartTask(digitaskHandle);

uInt32 arraySizeInSamps;
arraySizeInSamps=300000;
DAQmxReadDigitalU8 (digitaskHandle, -1, timeout, DAQmx_Val_GroupByScanNumber, readArray, arraySizeInSamps, &sampsPerChanRead, NULL);

DAQmxStopTask(digitaskHandle);
DAQmxClearTask(digitaskHandle);

 

Please help, any suggestions are welcome.


Viewing all articles
Browse latest Browse all 2183

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>