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

EMB Square Waveform (DSP Module)

LabVIEW DSP Module 2.5 Help
August 2007

NI Part Number:
371300C-01

»View Product Info

Generates a waveform containing a square wave.

Details  

offset is the DC offset of the signal. The default is 0.0.
frequency is the frequency of the waveform in units of hertz. The default is 62.5.
amplitude is the amplitude of the waveform. The default is 1.0.
phase is the initial phase, in degrees, of the waveform. The default is 0.0.
duty cycle is the percentage of time a square wave remains high versus low over one period. The default is 50.
#s is the number of samples in the waveform. The default is 128.
Fs is the sampling rate in samples per second. The default is 8000.
signal out is the generated waveform.

EMB Square Waveform Details

If the sequence Y represents Square Wave, this VI generates the pattern according to the following equation.

y[i] = amp × square(phase[i]), for i = 0, 1, 2, …, n – 1,

where amp = amplitude, n = number of samples (#s), and square(phase[i]) is:

1.0 if 0 pmod < (0.01 × duty) × 360.0

or

–1.0 if (0.01 × duty) × 360.0 pmod < 360.0

where pmod = p modulo 360.0, duty = duty cycle in percent, and phase[i] is

initial_phase + frequency × 360.0 × i/Fs


Resources


 

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