Download LabVIEW Data Acquisition Basics Manual

Transcript
Chapter 12
Buffering Your Way through Waveform Generation
analog output. The AO Write VI places the data in a buffer. The AO Start VI
begins the actual generation at the update rate. The AO Write VI in the
While Loop writes new data to the buffer until you click the Stop button.
Then, the AO Clear VI clears the analog channels.
Figure 12-5. Circular Buffered Waveform Generation Using Intermediate VIs
The Function Generator VI, located in labview\examples\daq\
anlogout\anlogout.llb, is a more advanced example than the one
shown in Figure 12-5. This VI changes the output waveform on-the-fly,
responding to changing signal types (sine or square), amplitude, offset,
update rate, and phase settings on the front panel.
Eliminating Errors from Your
Circular-Buffered Application
If you get error number –10843 underFlowError, while performing
circular-buffered output, it means your program cannot write data fast
enough to the buffer to output the data at the update rate. To solve this
problem, decrease the speed of the update rate. If adjusting the update rate
does not get rid of the error in your application, increase the buffer size.
© National Instruments Corporation
12-5
LabVIEW Data Acquisition Basics Manual