Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -50410 occurred at DAQmx Write (Analog 1D Wfm NChan NSamp).vi:1

I am doing buffered Analog Output on one channel of a PCI-6281 card. The analog output update rate is 1000 Hz. The buffer size is 7000 updates (so there seven seconds worth of data in the buffer). The buffer is not allowed to regenerate, as the output needs to be different for every buffer. So i continuously replenish the buffer with new data from my LabVIEW VI. Usually, my software is able to keep up with this and adds new data to the buffer runs out of new data. But sometimes i get this error:
 
Error -50410 occurred at DAQmx Write (Analog 1D Wfm NChan NSamp).vi:1
Possible reason(s):
There was no more space in the buffer when new data was written. The oldest unread data in the buffer was lost as a result.
Task Name: StatusPC_AO,Load_CMD_AO
 
The error message is not defined anywhere in LabVIEW. I believe what happened was that my LabVIEW VI could not keep up with the Analog Output, so the AO buffer reached its end...but the error message makes it sound like something else (sounds like an Analog Input error, not an Analog Output error!)
 
Has anyone encountered this before? Many thanks to anyone who responds....
Thanks
--RAGHU
0 Kudos
Message 1 of 6
(4,391 Views)
Raghu,

This is indeed an interesting error for analog output.  How many samples are you writing to the AO buffer every time?

Could you post a snipet of code that throws this error?  I would be happy to take a look at it.  

Best Regards,

Jeff Tipps
Applications Engineer
National Instruments
0 Kudos
Message 2 of 6
(4,380 Views)

Jeff

I did confirm that the error message occurs whenever i deliberately slow down my VI causing the AO Buffer to run out of data.

Enclosed is a stripped down VI as you asked.

Thanks for your help!

--Raghu

0 Kudos
Message 3 of 6
(4,370 Views)
Hello Raghu,

I am seeing a different and more expected behavior.  I ran your program (all I did is replace your DAQmx global channel with a DAQmx Create Channel.vi and used Dev1/ao0:1) and began incrementing the delay field.  I was able to move well past 2000ms.  After setting the field to about 8000ms I got error -200290 saying "the generation stopped to prevent the regeneration of old samples."

I would say this is completely expected behavior but I have been unable to reproduce -50410.  One thing is consistent between our machines though.  When you are using AO and non-regeneration you must write to the buffer fast enough to keep the data flowing or you will get an error.  Another thing is that I'm using DAQmx 8.5.  What version of DAQmx are you using?

Regards,

Jeff T.
0 Kudos
Message 4 of 6
(4,355 Views)

Jeff,

I am using NI-DAQmx 8.1.0f1
Normally my LabVIEW VI can write 250 samples to the buffer every 0.25 seconds. If there is a temporary delay during any iteration, the LabVIEW VI writes more samples in the next write operation, so it is able to catch up if the delay is 2 seconds or less.

Apart from the error code nomenclature, is there anything else i can do to avoid this error?

--Raghu

 

 

0 Kudos
Message 5 of 6
(4,350 Views)
Raghu,

You could upgrade to DAQmx 8.5.  I didn't see any bug fixes that addressed this error specifically but I am seeing different (and better) behavior than you are. 

Best Regards,

Jeff Tipps
Applications Engineer
National Instruments
0 Kudos
Message 6 of 6
(4,326 Views)