07-12-2018 02:03 PM
Hi all,
I got an error200290(DAQmx-write.VI)-The generation has stopped to prevent the regeneration of old samples. Your application was unable to write samples to the background buffer fast enough to prevent old samples from being regenerated.
Can anyone help me?
Thanks,
Mei
Solved! Go to Solution.
07-12-2018 02:09 PM
To avoid this error, you can do any of the following:
In addition, if you do not need to write every sample that is generated, you can configure the regeneration, and then use the position and offset attributes to write the desired samples.
See: https://forums.ni.com/t5/LabVIEW/NI-DAQmx-200290-error/td-p/3367064
07-12-2018 03:11 PM
Hi Tom,
Thanks for your reply. I got these information, but I do not know how to realize them in the VI.... so, can you help me?
p.s 4.reduce the sample rate. This one cannot be used as the sample rate filled in is very low.
Thanks,
Mei
07-12-2018 03:19 PM
What hardware are you using?
07-12-2018 06:45 PM
In addition to the good advice from Tom, I made a couple mods and comments in place in your code -- the pic will save me from typing 1000 words.
-Kevin P
07-13-2018 05:36 AM
Hi Kevin,
Thanks for your correction! Yes, it works well according to your suggestion. But in my application, xy scanning is conducted by two axis galvo mirrors, so, I need to put 'duplicate' the vi. Error 50103 occurred while error 200290 came again when I used two channel. What should I do to solve this?
p.s Should I use Nchan version of DAQmx Write when I use two channels?
Thanks,
Mei
07-13-2018 05:37 AM
Hi Tom,
My hardware is galvo mirrors (Thorlabs, GVS012).
Thanks,
Mei
07-18-2018 08:54 AM
RE: error -50103
A good answer was already given here.
RE: error -200290
It'll be more productive (at least initially) to change the task configuration to "allow regeneration" while doing Continuous sampling OR change to Finite sampling.
Either way, you probably need to first troubleshoot your algorithm that generates the 2 channels of data you want to generate via AO. It'll be important that both channels have the same # points when they're part of the same task. And the timing of how they vary relative to one another needs to be correct. It isn't clear that you've got that part worked out yet. It's pretty easy to make a subvi out of this signal generation and to put a waveform graph on the front panel. That'll be a *huge* help in refining your algorithm.
-Kevin P