07-25-2017 08:10 AM
Hi,
I'm currently working on a automatic testing sequence with the help of a cDAQ 9178 containing amongst other things an NI 9269. I have written a LabVIEW .VI for writing data to this module and there I can without any problem run it at the modules maximum speed of 100kS/s. When I'm implementing this in TestStand my plan is to use a StationGlobal variable to control the amplitude of the written waveform. All this seem to work as it shold but when I'm starting the VI to begin writing data to the NI 9269 I can't get anywhere near it's maximum speed, I have to enter a write speed of no more than about 23kS/s and then a minimum of about 800 samples to write. Otherwise I get the following error with LabVIEW:
Error -200621 occurred at WriteAO_MAIN_FILE_TestStand.vi,
Onboard device memory underflow. Because of system and/or bus-bandwidth limitations, the driver could not write data to the device fast enough to keep up with the device output rate.
Reduce your sample rate. If your data transfer method is interrupts, try using DMA or USB Bulk. You can also reduce the number of programs your computer is executing concurrently.
Does anyone know why this could be happening? The target is to get the VI to run on as few datapoints as possible to get a quick repsonse once I change the amplitude.
07-28-2017 07:04 AM
Hi Robroy_95,
First thing to double check, are you connecting via a USB hub? If you are then please try connecting straight to the PC instead.
However, I do not think that that is the issue. Basically, this error means that the buffer is empty, and this is due to TestStand not writing to your Hardware quick enough. If you are at 23kS/s, and 800 samples, this only gives TestStand an incredibly small amount of time to get the setup done and perform its interface duties with LabVIEW. The issue is, TestStand simply isn't that deteministic, and it's not designed for this level of timing capability.
I think there are two main issues here, because from the looks of things it seems as though setup and HW initialization is being performed with each iteration of the output task.
1. Ensure you just do the setup once, and 2. Ensure you store the data locally within LabVIEW, thereby only executing once and keeping any tasks relating to the update rate native to LabVIEW. Any other "Test management" related tasks can then be performed in TestStand where it can run at its own pace.
I hope this helps! Best of luck!
Sarah F
Applications Engineering
National Instruments UK and Ireland
07-28-2017 09:19 AM
Hi Sarah and thank you for your answer.
No I'm not connected via a USB hub so that can't be the issue.
I'm running the VI continously in a separate, asynchronous sequence and the only connection with TestStand here is the StationGlobals variable that informs LV of what amplitude to use, LV then checks this variable in each loop to generate the correct waveform to output. This generation is done in every loop of the VI, but the HW initialization is only done once and that is before the loop.
Attached isa minimal example to show you how I have implemented my LV design because I don't quite understand how you mean by your second point. In the TestStand example I have two StationGlobals variables, Stop9269 and Amp9269_Wave1 and it's that context that I call this VI with, as can be seen in the Test1_min_example.seq
If you'd like to have a look at this complementing material I'd be most grateful.