Thanks for the example. It has proved helpful, but i wanted to ask about the "DAQmxGetWriteSpaceAvail(taskhandle, &writeSpaceAvail)" function. I think that is a crucial part of the code, but i can't find a reference to it DAQmx C reference. Is this an older function?
Overall, i think i understand what you were doing in the example, but i guess the part I am fuzzy on is how to know when to write more data to the buffer. I think the GetWriteSpace available function might be the key to that. It looks like in the example you gave me that you wait till there are at least 500 samples worth of space open to be written, and then you refill the buffer. Is that correct?
Thanks again,
Gerry