Aborting a Task

NI-DAQmx Key Concepts

Aborting a Task

Several conditions cause a task to abort:

  • To explicitly abort a task, call the Control Task function/VI with the Action parameter set to Abort. In general, aborting a task is not a normal operation. It is intended for exceptional situations.
  • In LabVIEW, you also can abort a task by clicking the Abort Execution button. Doing so results in all tasks created in that VI hierarchy to be aborted and then cleared.
  • If you remove a device from the system, all tasks currently using the resources of that device are aborted.
  • If you call the Reset Device function/VI to restore a device to its initial configuration, all tasks currently utilizing the resources of that device are aborted.

When a task is aborted, it is returned to the Verified state. If the task is running, it is stopped as soon as possible and is then unreserved. After a task has been aborted, you can continue to use the task. However, you might need to transition the task back to its previous state before continuing the specified operation.