Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How to avoid the error code 200018 on synchronizing analog outgaput using USB-6341

I need to generate a waveform to synchronized with my input trigger. However, my VI randomly got the following error code:

 

Error -200018 occurred at Property Node DAQmx Task (arg 1) in DAQmx Is Task Done.vi:4470003->Galvo control 4.vi

 

Possible reason(s):

DAC conversion attempted before data to be converted was available.

Decrease the output frequency to increase the period between DAC conversions, or reduce the size of your output buffer in order to write data more often. If you are using an external clock, check your signal for the presence of noise or glitches.

Task Name: _unnamedTask<103>

 

Source:

Property Node DAQmx Task (arg 1) in DAQmx Is Task Done.vi:4470003->Galvo control 4.vi <append>
<B>Task Name: </B>_unnamedTask<103>

 

 

I was told that I can avoid the problem by reducing my output buffer or decrease the output frequency. But I have to synchronize the output with my trigger. So neither way is not really a solution. Is there any other ways to solve the problem?

Download All
0 Kudos
Message 1 of 5
(4,855 Views)

Well you have the obvious race conditions you caused by using the local variables "Galvo Amplitude ", "# of empty scans" and "Y" rather than just wiring the data to the for loops.  Getting rid of those abused locals would be a good place to start.

 

The "Is Task Done" in the while loop makes very little sense since, you don't do anything with the output.


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 5
(4,850 Views)

Thank you for your reply!

 

I can definitely get rid of those local variables

 

The reason I use the "Is Task Done" in the while loop is because I wanna have continuous output. I need to make the VI running for at least one hour. However, it only works up to 7 min when the Polygon Frequency is 5k. Is there any ways to fix that?

0 Kudos
Message 3 of 5
(4,828 Views)

carless wrote:

The reason I use the "Is Task Done" in the while loop is because I wanna have continuous output.


But, You aren't using it!Smiley Surprised  whether it outputs a true or a false or an error out or not the code responds the same.  Hence: "It makes little sense."

 

So do "Finite samples" unless something else is supplying the trigger.  Look at the Regenerate property.Smiley Wink


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 5
(4,816 Views)

Sorry, I'm confused. I use  "Finite samples" because according to my experience,  "Finite samples" does a better job in synchronizing everything than "Continuous samples". Is there any sample VIs I can look at?

 

I need to synchronize this waveform with lots of pulses. It's lots of pain Smiley Frustrated

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