NI-DAQmx .NET Framework 4.0 API Reference

Table of Contents

Task.WaitUntilDone Method (Int32)

  • Updated2023-02-21
  • 1 minute(s) read
Task.WaitUntilDone Method (Int32)
Waits for the measurement or generation to complete and returns if it has completed execution before the specified time elapses.

Namespace:  NationalInstruments.DAQmx
Assembly:  NationalInstruments.DAQmx (in NationalInstruments.DAQmx.dll) Version: 20.7.40.49302

Syntax

public void WaitUntilDone(
	int millisecToWait
)
Public Sub WaitUntilDone ( 
	millisecToWait As Integer
)

Parameters

millisecToWait
Type: SystemInt32
The maximum amount of time in milliseconds to wait for the measurement or generation to complete. This method returns an error if the time elapses. If you set the timeout to -1, the method always waits for the task to complete, regardless of the amount of time needed.

Return Value

Type: 
if the task has completed execution.

Exceptions

ExceptionCondition
DaqExceptionThe NI-DAQmx driver returned an error.

Remarks

WaitUntilDone(Int32) waits for the task to finish acquiring or generating the number of samples per channel specified on the Timing class. WaitUntilDone(Int32) does not wait for pending asynchronous operations to complete. Use the methods and properties on the IAsyncResult to verify that asynchronous reads and writes are complete.

See Also

Log in to get a better experience