Sine Waveform VI
- Updated2025-07-30
- 3 minute(s) read
Generates a waveform containing a sine wave.

Inputs/Outputs
offset
—
offset is the DC offset of the signal. The default is 0.0.
reset signal
—
reset signal, if TRUE, resets the phase to the phase control value and the time stamp to zero. The default is FALSE.
frequency
—
frequency is the frequency of the waveform in units of hertz. The default is 10.
amplitude
—
amplitude is the amplitude of the waveform. The amplitude is also the peak voltage. The default is 1.0.
phase
—
phase is the initial phase, in degrees, of the waveform. The default is 0. The VI ignores phase if reset signal is FALSE.
error in (no error)
—
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
sampling info
—
sampling info contains sampling information.
signal out
—
signal out is the generated waveform.
error out
—
error out contains error information. This output provides standard error out functionality. |
If sine wave is represented by the sequence Y, the VI generates the pattern according to the following equation.
y[i] = amp × sin(phase[i]), for i = 0, 1, 2, …, n – 1,where amp = amplitude, n = number of samples (#s), and phase[i] is:
initial_phase + frequency × 360.0 × i/FsThis VI initializes the phase on the first run. After the first run, if reset signal is TRUE, phase sets the initial phase of the input signal. If reset signal is FALSE, the VI ignores phase.
This VI is reentrant so that it can be used to simulate a continuous acquisition from a sine wave function generator. If the input control reset signal is FALSE, subsequent calls to this VI produce the output sine wave waveform containing the next n samples of a sine wave. This VI remembers the phase and time stamp of the current waveform and uses this to continuously generate and time stamp the subsequent waveforms, as long as the reset signal input is FALSE.
Examples
Refer to the following example files included with LabVIEW.
- labview\examples\Signal Processing\Waveform Measurements\Noise Waveforms and PS Density.vi
offset
—
reset signal
—
error in (no error)
—
sampling info
—
signal out
—
error out
—