LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -200547 occurred at DAQmx Write

NI - PCI-6713 - 8 channel output (DAQmx)
NI - PCI-6036E - 1 channel input (DAQmx)
Labview 8.0

Hi, I am trying to perform frequency modulation. I am using a scaled version of the input (acquired by PCI-6036E) as the frequency. It is being sampled at 100 Hz. I am using the frequency to generate 8 different (different phases) of sine waves. The update rate of the sine waves must be 800 kHz. The same signals are being output from the 8 channels of a PCI-6713 at the same 800 kHz.

When I wire anywhere from 1 to 7 channels to the output DAQ-Assist, I am able to see the output in a signal analyzer connected to each of the 7 output channels of the connection box. However, when I connect the 8th channel (as shown in the attached VI - version 5), I cannot see any meaningful signal at any of the outputs (just noise) while the VI is running. Instead, when I stop the VI, I am getting an
----------------
"Error -200547 occurred at DAQmx Write"
Possible reason(s):

DAQmx Write failed, because a previous DAQmx Write automatically configured the output buffer size. The buffer size is equal to the original number of samples written per channel, so no more data can be written prior to starting the task.

Start the generation before the second DAQmx Write, or set Auto Start to true in all occurences of DAQmx Write. To incrementally write into the buffer prior to starting the task, call DAQmx Configure Output Buffer before the first DAQmx Write.

Task Name: _unnamedTask<BD>
---------------------
The attached version #5 has the above problem. I do not know how to tackle it.

I was also trying to program without using DAQ-Assist (this is probably preferred from the standpoint of speed, right?). This is shown in version #3.  However, with this, I am getting an intermittency in the output that is shown in the attached jpeg. To my knowledge, my configuration of the output should be identical to the one done by DAQ-Assist. But they are giving such different results!

Thanks in advance for your help,
Ani



0 Kudos
Message 1 of 5
(5,719 Views)
1. The only way to find out what wrong with the DAQ Assistant function is to generate the code. Right click and select create code.
2. The update speed of the analog output driver is slower than the the sample rate you want. Either select a slower sample rate (less data higher performance) or program smarter (less data handling in one loop iteration)
Regards,
André (CLA, CLED)
0 Kudos
Message 2 of 5
(5,710 Views)

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!

 

Pink-Gene_vi.png

 

Test Pink-Gene_vi.png

Download All
0 Kudos
Message 3 of 5
(4,990 Views)

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

Brian G.
0 Kudos
Message 4 of 5
(4,974 Views)

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. Smiley Happy

 

jiggle

0 Kudos
Message 5 of 5
(4,959 Views)