11-17-2009 11:29 PM
Hello,
I have a VI that I use to generate a sawtooth wave of varying amplitudes and frequencies ( 0<A<2V, 0<f<2000Hz). This is a fairly simple task, the frequencies and amplitudes don't even change with respect to time, just experiment to experiment.
I cannot use an express VI (at least I don't think I can), because of some features of my VI that require the signal to be turned off/turned back on, or have the amplitude and frequency programmatically change. I can attach the actual VI if anyone is interested.
Currently, I am basically just using one of the provided examples (Labview 8.6) in /examples/daqmx/analogout. It does a pretty good job, but I would like to make sure I am generating the best possible sawtooth for my application. Also, I find that the output (on a scope) tends to look kind of ugly.
For instance, there are settings for sample rate, number of samples, cycles/buffer, ....
If I would like to produce the cleanest possible signal (least amount of sample and hold steps, little to no jitter) that can run for an arbitrary amount of time, how would I do this? What should my settings for cycles/buffer, or number of samples be? I feel like I should be able to work this all out with paper and pencil, but I just haven't quite go it.
Any help with best practices for labview (reference code, book) or even a standard text on the subject would be much appreciated.
Cheers,
-Benedict
11-18-2009 01:49 AM
The best output can be generated if you understand the basics of signal generation just opposite of Analog acquisition.
Right now I would suggest not to use cycles/buffer. And use a simple signal generator function.
To get the frequency components, your sampling frequency must match the nyquist criteria. ie your sampling frequency must be atleast twice than the original signal frequency.
To get the amplitude components, your sampling frequency must be atleast 10 times the original signal frequency.
Refer to Mseries DAQ user manual for more information.