Solution
If you are able to successfully initialize and start your task, but receive this error when trying to read samples, this indicates that an empty task handle has been connected to the DAQmx Read VI.
- Check the logic of your program to ensure that the initialization state is not being skipped, or that the task is not being cleared prior to the read
- If you have a case or event structure in your code and the DAQmx task handle is passed through the structure, ensure that Use Default Value if Unwired is not checked for the output terminal. See figure below for an example:
In this example, since Use Default if Unwired is checked, depending on which case is executed prior to this code the default value for the task handle will be passed to DAQmx read, which will be an empty task handle. This will result in error -200088.