LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why is there a delay in a wave that is being written and produced in a while loop?

I am trying to output an analog triangle wave, within a while loop. The writeout is setup with the wave going to AO Write, then AO Start, then another AO Write (I realize that this may be the problem, but I haven't had any luck finding a way around it). This appears to work at very low points/buffer divided by sampling rate ratios. Any suggestions?
0 Kudos
Message 1 of 3
(2,642 Views)
Hi jmarotta,

you want to give out a waveform. Generate the complete waveform in advance. Send the waveform to AO Write and then start it with AO Start. Set the update rate to a value for the correct frequency. Set number of buffer iteration to 0. So the waveform will be generated continously.

Generating the values in a while loop point by point and give them out point by point will give unpredictable results. The time the loop runs is not determined. You can use Wait for next multiple milliseconds to time your loop. But the time is not accurate.

Waldemar
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
0 Kudos
Message 2 of 3
(2,642 Views)
Very helpful... Thank you!
0 Kudos
Message 3 of 3
(2,642 Views)