Hi T.,
Unfortunately, there is no way to acquire the complete buffer during an asynchronous clear of the DAQ board. Also, the DAQ clear is the only way to stop a continuous acquisition.
The best thing for you to do is acquire your data and when you want to end your program, delay the DAQ Clear command until you receive the next buffer of data. That way you have acquired the buffer and are stopping (clearing) during the next buffer cycle which you don't care about anyway.
For example, suppose you have acquired 5 buffers of data and you want to send the clear command (through a button or callback function etc.). Using the old code, it would miss the remainder of the 6th buffer. However, when you choose to stop your program, you can set a flag that your
clear function monitors. It waits until you receive 1 more buffer of data at which point your acquisition function resets the flag and your clear function will clear the next buffer (7th buffer). Therefore you got all the points you were looking for.
Anyway, hope that workaround helps.
Ron