Error -200802 While Trying to Output a Continuous Signal with DAQ Assistant

Updated May 4, 2023

Reported In

Software

  • LabVIEW

Driver

  • NI-DAQmx

Issue Details

My project involves using LabVIEW and a NI USB-6211 DAQ device to control a machine by outputting analog signals. I am using Express VIs and have a continuous samples generation mode as I require the signal to be generated over a duration of 2 minutes:


On execution this error appears:

Solution

The error message in the screenshot above has several possible reasons, the one applicable here is "Sample timing type is something other than On Demand". The root cause for this issue is a conflicting setting of the Simulate Arbitrary Signal node and the DAQ Assistant's Timing Settings: As an example, the former could have been set to generate one sample per loop iteration whereas the DAQ Assistant could have been set to write 1000 samples per iteration.

There are two possible solutions to this disparity: 
  1. Set the Simulate Arbitrary Signal node to output the Entire Signal each iteration and configure the DAQ Assistant to N Samples. Remove the loop. Make sure the Samples to write value in DAQ Assistant is the same or less than Number of points defined in the Signal Simulator. This way the complete signal is generated at once, transferred to the USB-6211 which then outputs it automatically.
  1. Leave the Simulate Arbitrary Signal node Signal Generation setting as One Point per iteration, but set the DAQ Assistant to 1 Sample (On Demand). Add code into the while loop to handle the needed timing.


Additional Information

Both methods have drawbacks:
  1. Method one has the drawback that as the signal is generated and transferred to the DAQ hardware at once, it is not possible to easily change the signal waveform while it is been output.
  2. Method two introduces a source for jitter. The internal clock of the USB-6211 is more exact than LabVIEW's timing source as the latter has to rely on Windows' internal timing routines.