Message Edited by labfritz on 06-15-2006 05:17 PM
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,
Message Edited by labfritz on 06-20-2006 06:11 AM
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?
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.