11-17-2003 10:33 AM
11-19-2003 09:56 AM
06-15-2006 05:14 PM - edited 06-15-2006 05:14 PM
Message Edited by labfritz on 06-15-2006 05:17 PM
06-16-2006 03:57 PM
06-16-2006 05:33 PM
06-19-2006 02:47 PM
Hello Peter,
Are you using FIFO mode for your analog output? If not, I would give this a try. You can read more about how to do this in this knowledgebase and try it out in an example program.
I do not understand your comment about the analog input portion of your program. Why are you not doing a continuous analog input, such as in the example Cont Acq&Graph (buffered).vi? You can find this example in the Example Finder in LabVIEW by going to Help >> Find Examples. This way, you do not need to stop and start the acquisition each loop iteration. You can always discard that data you do not need before graphing it or saving it to file.
If you do want to start and stop the analog input acquisition once each loop iteration, you can use AI Control with the control codes of start and pause immediately to pause the operation between loop iterations.
Hope this helps,
Laura
06-20-2006 05:59 AM - edited 06-20-2006 05:59 AM
Message Edited by labfritz on 06-20-2006 06:11 AM
06-21-2006 11:25 AM
Hi Peter,
I am glad to hear you are making progress. I have taken a look at your VI and I do not see anything that should be keeping the buffer from updating. However, I can't run the VI because the subVIs in your ramp VI are missing. Can you post them?
Thanks,
Laura
06-21-2006 11:42 AM - edited 06-21-2006 11:42 AM
Message Edited by labfritz on 06-21-2006 11:43 AM
06-22-2006 11:39 AM
Hi Peter,
I think I see the problem. It's not that the DC voltage 2000 sample buffer is being outputted twice, but that the 200 sample ramp waveform alternates with the DC voltage until the buffer is full of the ramp signal. On your first few loop iterations, the buffer is filled up with 2000 samples of DC signal, and then you add 200 samples of your ramp signal that overwrites part of the DC signal. This continues until the buffer has been replaced with your rampl. My recommendation is to fill the buffer for the output operation on the first iteration of the while loop with a 2000 sample ramp signal. This way, you will start outputting the ramp as soon as the 2000 samples of DC voltage has been outputted. Another recommendation is not to write to the buffer every while loop iteration, but only when you need to update that waveform.
Regards,
Laura