Note: In order to improve performance, you should manually move the DAQmx task to the Commit State before entering the while loop, as is shown in the example above. You can read more about the Commit State and other DAQmx Task States at NI-DAQmx Help: Task State Model.Solution 4: Use Is Task Done? in While LoopIn some cases, you may be interested in acquiring a subset of the complete finite acquisition before the acquisition is complete. In this case, you can manually specify a number of samples that is lower than the total number of samples being acquired. In the example below, the DAQmx Read property Status»Available Samples Per Channel is used to determine how many samples are currently in the DAQmx buffer and make a read request for the number of samples available in the buffer at that moment. After DAQmx Read is called, the DAQmx Is Task Done? function is used to identify whether the finite acquisition is complete.
Collaborate with other users in our discussion forums
A valid service agreement may be required, and support options vary by country.
Thank you for your feedback.
You changed your response to Not Helpful
You changed your response to Helpful