Create Analog Signal

LabVIEW SignalExpress

Create Analog Signal

Creates an analog signal. You can create various periodic waveform signals as well as noise, multi-tone, or DC signals. You also can use a formula to define a signal. Use Create Analog Signal to create arbitrary signals. For example, you can use Create Analog Signal to create a signal to use as a stimulus for a hardware device. Create Analog Signal can run in continuous signal mode or repeated signal mode, depending on whether you place a checkmark in the Repeated signal checkbox. The default is continuous signal mode.

Details  

ParameterDescription
Output SignalDisplays the signal the step creates.
ConfigurationContains the following options:
  • Signal Calculation Setup—Contains options you can use to configure how the step calculates the signal. The options that appear in this section depend on the Signal type you specify. Contains the following options:
    • Signal type—Specifies the type of signal Create Analog Signal creates. You can select from the following options:
      • Sine Wave—(Default) Creates a sine wave with a default amplitude and frequency of 1.
      • Triangle Wave—Creates a triangle wave with a default amplitude and frequency of 1.
      • Square Wave—Creates a square wave with a default amplitude and frequency of 1.
      • Sawtooth Wave—Creates a sawtooth wave with a default amplitude and frequency of 1.
      • DC Signal—Creates a DC signal with a default offset of 0V.
      • Noise Signal—Creates a noise signal with a default level of 1. Use the Noise type field to specify Gaussian, rectangular, or triangular amplitude distribution.
      • Multi-tone—Creates a multi-tone signal with a default start frequency and amplitude of 1 and a default stop frequency of 2. Multi-tone signals allow the fast and efficient stimulus of a system across an arbitrary band of frequencies, and you can use them to determine the frequency response of a device.
      • Formula—Creates a signal according to the formula you enter in the Formula field.
    • Frequency (Hz)—[Signal type: Sine Wave, Triangle Wave, Square Wave, Sawtooth Wave, Formula] Specifies the frequency of a sine, triangle, square, or sawtooth wave in hertz or the value of f if you select the Formula signal type. The default is 1.0 kHz.
    • Amplitude (V)—[Signal type: Sine Wave, Triangle Wave, Square Wave, Sawtooth Wave, Formula] Specifies the amplitude of a sine, triangle, square, or sawtooth wave or the value of a if you select the Formula signal type. The default is 1.0 V.
    • Phase (deg.)—[Signal type: Sine Wave, Triangle Wave, Square Wave, Sawtooth Wave] Specifies the initial phase of a sine, triangle, square, or sawtooth wave in degrees. The default is 0 degrees.
    • Offset (V)—Specifies the DC offset of the signal. The default is 0 V.
    • Repeated signal—Specifies if the created signal is repeated or continuous. If you place a checkmark in this checkbox, Create Analog Signal calculates the signal only during the first iteration of the step after you click the Run button or the Reset Signal button and each time you change a configuration parameter. The signal then repeats with the same time stamp and start phase.
    • N periods—[Signal type: Sine Wave, Triangle Wave, Square Wave, Sawtooth Wave] Forces the number of periods in the signal to be an integer. If you select this option and change the values of Sample rate (S/s) or Block size (samples), Create Analog Signal coerces the value of Frequency (Hz) so that the number of periods remains an integer.
    • Duty cycle (%)—[Signal type: Square Wave] Specifies the percentage of each period a square wave remains high.
    • Noise type—[Signal type: Noise Signal] Specifies the type of noise the probability density function represents. Create Analog Signal defines the Noise type by the distribution of frequencies that appear on a histogram of the signal.
      • White (Gaussian)—(Default) Creates a noise signal with a Gaussian distribution of frequencies.
      • White (Rectangular)—Creates a noise signal with a rectangular distribution of frequencies.
      • White (Triangular)—Creates a noise signal with a triangular distribution of frequencies.
    • Level (Vrms)—[Signal type: Noise Signal] Specifies the noise level. The default is 1 V_rms. This option is available only when you select White (Gaussian) as the Noise type.
    • Start freq. (Hz)—[Signal type: Multi-tone] Specifies the start frequency of the multi-tone signal. This step coerces the start frequency to be a multiple of the frequency resolution defined by the ratio of the Sample rate (S/s) divided by the Block size (samples).
    • Stop freq. (Hz)—[Signal type: Multi-tone] Specifies the stop frequency of the multi-tone signal. This step coerces the stop frequency to equal Start freq. (Hz) + n * Step freq. (Hz), where n is an integer number.
    • Step freq. (Hz)—[Signal type: Multi-tone] Specifies the step frequency of the multi-tone signal. This step coerces the step frequency to be a multiple of the frequency resolution defined by the ratio of the Sample rate (S/s) divided by the Block size (samples).
    • Formula—[Signal type: Formula] Specifies the formula string that defines the signal. The default is a*sin(w*t). You can use the following defined variable names:
      • f—Frequency equal to the Frequency (Hz) input.
      • a—Amplitude equal to the Amplitude (V) input.
      • w2*pi*f.
      • n—Current number of samples generated.
      • t—Number of elapsed seconds.
      • fs—Sampling frequency equal to the Sample rate (S/s).
  • Sampling Conditions—Contains the following options:
    • Sample rate (S/s)—Specifies the sampling rate of the signal in samples per second. The default is 100 kS/s.
    • Block size (samples)—Specifies the number of samples in the signal. The default is 1000 samples.
  • Optional Outputs—Contains the following option:
    • Export coerced values—Exports coerced frequency values as output scalar values. Create Analog Signal can coerce frequency values when you select a periodic signal type and you place a checkmark in the N periods checkbox, or when you select a multi-tone signal type.
Execution ControlContains the following option:
  • Post-execution delay (ms)—Specifies the amount of time to wait after the step executes.

Create Analog Signal Details

In continuous signal mode, the signal that Create Analog Signal creates at each iteration is contiguous to the previous iteration. The result is a signal with a continuously increasing time stamp and phase continuity. You can use the continuous signal mode to continuously generate a signal with arbitrary frequency or a non-repetitive noise signal with an analog output device if the device supports updating the output buffer while running.

In repeated signal mode, this step calculates the signal only during the first iteration of the step after you click the Run button or, in LabVIEW SignalExpress, the Reset Signal button and each time you change a configuration parameter. The signal then repeats with the same time stamp and start phase. National Instruments recommends that you use repeated signal mode if you generate the signal with an analog output device that does not support updating the output buffer while running, such as the devices that NI-FGEN Arbitrary Waveform supports.

Signal Frequency Coercion

If you select a standard periodic signal type, you can place a checkmark in the N periods checkbox to coerce the signal frequency you specify so that Create Analog Signal creates a signal with an integer number of periods. The periods repeat without phase discontinuities. If you place a checkmark in the N periods checkbox, the actual coerced values overwrite the input value you type. When you select a multi-tone signal type, Create Analog Signal coerces the Start freq. (Hz), Stop freq. (Hz), and Step freq. (Hz) values to create a repeatable signal. Place a checkmark in the Export coerced values checkbox to export coerced frequency values as an output of Create Analog Signal.