Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Multitone Generator (Not in Base Package)

LabVIEW 8.2 Help
August 2006

NI Part Number:
371361B-01

»View Product Info

Generates a waveform that is the sum of integer cycle sine tones. Details  Examples

amplitude is the value that the sum of all the tones is scaled to and is the largest absolute value that the waveform contains. The default is –1. amplitude is useful when outputting the waveform to an analog output channel. If the maximum value that the hardware can output is 5 volts, set amplitude to 5. If amplitude 0, the scaling is not applied.
reset signal, if TRUE, resets the phase to the phase control value and the time stamp to zero. The default is FALSE.
tone frequencies is an array in which each element is a single tone frequency. The size of this array must match the size of the tone amplitudes array and the size of the tone phases array.
tone amplitudes is an array in which each element is a single tone amplitude. The size of this array must match the size of the tone frequencies array and the size of the tone phases array.
tone phases is an array in which each element is a single tone phase in degrees. The size of this array must match the size of the tone frequencies array and the size of the tone amplitude array.
error in describes error conditions that occur before this VI or function runs. The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. This VI or function runs normally only if no error occurred before this VI or function runs. If an error occurs while this VI or function runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.
status is TRUE (X) if an error occurred before this VI or function ran or FALSE (checkmark) to indicate a warning or that no error occurred before this VI or function ran. The default is FALSE.
code is the error or warning code. The default is 0. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.
source specifies the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.
sampling info contains sampling information.
Fs is the sampling rate in samples per second. The default is 1000.
#s is the number of samples in the waveform. The default is 1000.
coerce frequencies? If coerce frequencies? is TRUE, the specified tone frequencies will be coerced to the nearest multiple of Fs/N.
signal out is the generated waveform.
crest factor is the ratio of the Peak voltage to the RMS voltage of signal out.
actual tone frequencies are the tone frequencies generated after accounting for coercion, if coerce frequencies? is True, and the Nyquist criteria.
error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error.
status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.
code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.
source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning.

Multitone Generator Details

The frequency domain representation of this waveform is a sequence of impulses at the specified tone frequencies and zero at all other frequencies. The number of tones is determined by the size of the array inputs tone frequencies, tone amplitudes, and tone phases. The sine tones are generated using the frequency, phase, amplitude, and samples information. This raw array is then scaled so the largest absolute value is equal to amplitude. Finally, the waveform is bundled. The X0 element of the waveform is always set equal to 0 and the delta X element is set equal to 1/Fs.

LabVIEW assumes tone phases to be referenced to the sine function. To reference tone phases to the cosine function, add 90 degrees. Be aware that this may change the crest factor. The following code excerpt shows how to reference tone phases to the cosine function:

Examples

Refer to the following VIs for examples of using the Multitone Generator VI:

  • labview\examples\measure\maxmpl.llb\Bandlimited Signal Generation.vi

     

  • labview\examples\measure\maxmpl.llb\Multitone with Amplitudes and Phases.vi

     


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit