05-14-2008 07:51 AM
05-14-2008 10:54 AM
03-27-2012 10:04 PM
I got the same error while calling “Pink-Gene.vi” as a subVI in a loop to let it run with continuous pink noise generation.
I read the error explanation and suggestions. It needs a DAQmx Configure Output Buffer before first DAQmx write to avoid this error.
Somehow, I can press the Run Continuously Button to run Pink-Gene.vi only without errors, and why did I get an error to run as “Test Pink-Gene.vi”? I don’t understand what’s the difference between them? That makes me wonder.
Any suggestions would be greatly appreciated!
03-29-2012 10:00 AM - edited 03-29-2012 10:03 AM
Hi jiggle,
A few points.
1. You have set your DAQmx Task to stop after 3 loop iterations, then exit the while loop. In this case the DAQ resources, including the buffer, remain reserved by the Task after it is stopped.
2. When set to Run Continuously, Pink-Gene.vi will abort after each run, clearing the DAQmx Task and unallocating the buffer and its other resources. When the VI starts again, a new DAQmx Task is created and a new buffer is allocated. This will not result in an error.
3. When in a while loop, the DAQmx Task's buffer will still be allocated after each iteration. When the new DAQmx Task starts again, a previous buffer allocation already exists, therefore resulting in an error.
For more information on this error, please see the following Knowledge Base article:
Using DAQ Assistant for Analog Output Returns Error -200547: http://digital.ni.com/public.nsf/allkb/94596472EED1EC54862571330015A408?OpenDocument
To remedy this problem, I would use the DAQmx palette functions provided in LabVIEW, which will allow you to clear the task when the while loop completes. You can get a good start from the generation examples in Help>>Find Examples>>Hardware Input and Output>>DAQmx>>Analog Generation>>Voltage. Good luck!
Brian
04-02-2012 02:07 AM
Hi Brian,
I see. VI will abort and clear resources in Run Continuously.
Using DAQ Assistant is easy but has its limitation.
Thanks so much for the informations.
jiggle