05-26-2009 02:18 PM
Hello,
I accidentally posted this in the multifunction DAQ forum so forgive me for posting this again here.
I am attempting to do a buffered edge counting with PCI-6115 for the application I am trying to develop.
Ideally, I would initialize a buffer array, then use a sample clock to time and acquire counter values which would then be stored in a buffer. After a certain number of samples, I would then use the DAQmxReadCounterU32 function to extract the said data and perform some calculations.
However, windows gives me an error when I try to initalize the size of the buffer array to be larger than 255001, I need 264000+.
Essentially, only this part of the code seems to execute:
int error=0;
TaskHandle taskHandle=0;
TaskHandle taskHandleCtr=0;
uInt32 data[260000];
After trying to initialize the uInt32 array my program crashes saying there was an error with my exe with a popup asking me if i want to send an error report to Microsoft.
Would this be a problem of windows not allowing me to allocated more than 255000 32 bit samples for that array? If so how do i put the array onto the onboard memory?
Solved! Go to Solution.
05-26-2009 03:28 PM
Sorry guys, it actually didn`t have anything to do with the DAQ board.
Apparently it was C++ that limits the size of the array I was calling, which was the traditional "int a[size]".
I used this instead to solve my problem:
int* a = NULL;
a = new int[10000000];
Problem solved.
Sorry for posting in the wrong forum, and thank you to everyone who's read this.
Howard