07-23-2019 08:26 AM
Hi all,
I am trying to do scanning with a trigger, so created three channels with three waves generating at the same time. This program works well if it only run once, but get an error-200288 (atttemped write a sample before the final sample generated) in loop. I think I should put some flag to make sure all the sample generated before writing, but I do not know how to do this. Or this is wrong? Can anyone help?
The VI is attached.
Thanks,
Mei
07-24-2019 02:16 AM
Hi,
maybe the following link can help you:
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019O31SAE
Regards,
Kevin
07-24-2019 04:00 AM
Hi Kevin,
Thanks, I tried according to this link before, but it does not work, maybe I misunderstood the explanation, can you explain more clearly?
Thanks,
Mei
07-25-2019 03:21 AM
Hi,
I think the error occurs, because the loop ends, although the DAQ action isn't finished yet.
I haven't worked too much with DAQ, you could try to add something like a 'stop routine' (when stop is pressed, stop the entire DAQ action)
Regards,
Kevin
07-25-2019 08:01 AM
If you are trying to continuously output a voltage, then your timing mode should be Continuous Samples. I would also unwire the Number Of Samples input to the DAQmx Timing VI since you usually limit your buffer when you do wire it up.