09-08-2005 05:33 AM
09-08-2005 11:23 AM
09-08-2005 02:26 PM
09-08-2005 04:25 PM
09-08-2005 10:16 PM
Hi Daniel,
I wonder if it is possible to increase the output buffer size for the array by using "DAQmxCfgOutputBuffer"?
Since the array has 26400 elements, what is the maximum allowable buffer size specified by DAQmxCfgOutputBuffer? I tried 26400*16=422400, but I cannot verify if DAQmxWriteAnalogF64 returns immediately after adjusting the buffer size.
Thank you!
Rolly
09-09-2005 04:25 PM
09-12-2005 01:58 AM
Hi Daniel,
Sorry for reply late and thanks for your detail explanation. I am able to overcome my problem quite accidentally before trying out your code. Let me explain my scenario:
(1) I tried to increase the array size from 26400 to 52800 and there are 4 such arrays with different amplitude, and I also increase the DAQmxCfgOutputBuffer to 5280000, 100 times of the array size. As I execute the code, I saw stack overflow error and I was forced to quit by VC++. I tried several config of the buffer size but soon discovered that with array size of 52800, stack overflow persisted. I can only change back to 26400, and code executes as it did.
(2) I am suppose to capture an image "during" the DAQ device generate each of the waveform and before amplitude change. "during" is important because if I capture things happened "before" the DAQ actually write the wfm, I got error. I tried Sleep();after DAQmxCfgOutputBuffer in the while loop but it was not good and somehow the program freeze. I then added some timer_wait function form the Matrox since I am using their framegrabber. I added 132msec to wait following DAQmxWriteAnalogF64, then it suddenly solved my problem. The images I capture is now correct!
Anyway I have to thank you for help me all times!!![]()
Best Regards,
Rolly