This error can occur for multiple reasons. Work through the steps outlined below to resolve this issue:
1. If the DAQmx task is successfully initialised and started, but this error occurs when trying to read or write samples, this indicates that an empty task handle has been connected to the DAQmx Read
or DAQmx Write
- Check the logic of the program to ensure that the initialisation state is not being skipped, or that the task is not being cleared prior to the read/write.
2. If the LabVIEW code consists of Case Structures or Event Structures that pass the DAQmx task handle, ensure that Use Default Value if Unwired
is not checked
for the output terminal.
- See the figure below for an example.
- Instead of using the Use Default Value if Unwired terminal, ensure that the DAQmx task handle is directly wired through all structures and cases.
- 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 could be an empty task handle. This will result in error -200088.
3. If the DAQmx task handle is being passed over Shift Registers in a Functional Global Variable (FGV), consider the points in Storing DAQmx Task Handle in Shift Registers
4. Ensure that the DAQmx task handle is not being retrieved or stored in a LabVIEW Local or Global Variable.
- Local and Global Variables can introduce race conditions and it can be almost impossible to monitor when they are being updated. Instead, directly connect the DAQmx task handle between DAQmx VIs.
- To better understand the risks of using Local and Global Variables, refer to Using Local and Global Variables Carefully.
5. If none of the steps above resolve the error, repair or reinstall the NI-DAQmx driver by following Repair Software In NI Package Manager (NIPM)