09-25-2013 04:13 PM
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?
09-25-2013 04:40 PM
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.
09-26-2013 01:56 PM
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?
09-26-2013 03:21 PM
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!
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.![]()
09-26-2013 04:58 PM
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 ![]()