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

Swept Sine Express VI

Owning Palette: Frequency-Domain Measurements Express VIs

Installed With: Sound and Vibration Measurement Suite

Performs frequency response measurements by outputting a customizable sweep of test tones, acquiring the stimulus and response signals, and performing gain, phase, and distortion measurements. You must use a data acquisition device supported in DAQmx with at least one analog output and two analog inputs.

Dialog Box Options
Block Diagram Inputs
Block Diagram Outputs

Dialog Box Options

ParameterDescription
ViewSpecifies the display that appears in the Signals graph.
SignalsDisplays the acquired stimulus and response signals or measurement results you select in the View pull-down menu.
  • Top Plot—Displays the first signal or plot of the option you select from the View pull-down menu.
  • Bottom Plot—Displays the second signal or plot of the option you select from the View pull-down menu.
AutoscaleAutomatically adjusts the scales of the graph to display the data.
DAQ HardwareSpecifies the device and channels used for the swept sine measurement.
  • Analog Output Channel—Contains the following option:
    • Excitation channel—Specifies the physical channel used for the analog output excitation signal.
  • Analog Input Channels—Contains the following options:
    • Stimulus channel—Specifies the physical channel used for the analog input stimulus signal.
    • Response channel—Specifies the physical channel used for the analog input response signal.
    • Export signals—Specifies if the time-domain signals are exported.
Channel ConfigurationSpecifies the channel configuration for the analog output and analog input channels.
  • AO Channel Configuration—Contains the following options:
    • Output range (V)—Specifies the output range for the physical channel you select. The default is ±5.
    • Terminal configuration—Specifies the input terminal configuration of the selected channel.
      • Default—This is the default device input configuration. Refer to the device documentation for information about the default input configuration.
      • Differential—The differential configuration has neither of its inputs tied to a fixed reference, such as earth or building ground.
      • Pseudodifferential—The pseudodifferential configuration references the positive and negative inputs for the channel to measurement system ground through different impedances. The pseudodifferential terminal configuration measures the difference between the positive and negative inputs.
      • RSE—The referenced single-ended (RSE) configuration references the signal with respect to a ground directly connected to the measurement ground.
  • AI Channel Configuration—Contains the following options:
    • Input range (V)—Specifies the input value range for the physical channels you select. The default is ±5.
    • channel selected—Specifies the analog input channel you want to configure.
    • Terminal configuration—Specifies the input terminal configuration of the selected channel.
      • Default—Default is the default device terminal configuration. Refer to the device documentation for information about the default terminal configuration.
      • RSE—The referenced single-ended (RSE) configuration measures the signal with respect to a ground directly connected to the measurement system ground.
      • NRSE—The nonreferenced single-ended (NRSE) configuration measures the signal with respect to a single ground, but the potential might differ from the measurement system ground.
      • Differential—The differential configuration has neither of its inputs tied to a fixed reference, such as earth or building ground.
      • Pseudodifferential—The pseudodifferential configuration references the positive and negative inputs for the channel to measurement system ground through different impedances. The pseudodifferential terminal configuration measures the difference between the positive and negative inputs.
    • Coupling—Specifies the coupling setting of the selected channel.

      • AC
      • DC
      • GND
    • IEPE—Specifies whether integrated electronic piezoelectric (IEPE) onboard current excitation is used.
SweepSpecifies the amplitude and frequency of the test tones in the sweep.
  • Frequencies—Contains the following options:
    • Spacing—Specifies how the frequency steps occur. Changes to this setting during a sweep do not take effect until the start of the next sweep. You can select one of the following options:

      • Linear
      • Logarithmic (default)
    • Start (Hz)—Specifies the starting frequency of the sine sweep in hertz. The default is 20.
    • Number of steps—Specifies the number of frequency steps of the sine sweep.
    • Stop (Hz)—Specifies the stopping frequency of the sine sweep in hertz. The default is 8k.
  • Amplitudes—Contains the following options:
    • Definition—Specifies how the amplitude is computed.

      You can select one of the following options:

      • Constant (default)
      • Formula
    • DC offset (V)—Specifies the DC offset of the source in volts.
    • Amplitude (V)—Specifies the constant amplitude. This option appears if Definition is Constant.
    • Amplitude formula—Defines the amplitude as a function of frequency (f). Select Stimulus Signal and Sweep Status from the View pull-down menu to view the result of the formula on a graph. This option appears if Definition is Formula. You can use f as a variable for frequency in the formula string.
MeasurementsSpecifies the measurements to perform during the sweep.
  • Measurement Selection—Contains the following options:
    • Frequency response—Specifies that the frequency response (magnitude and phase) is measured.
    • Linear/dB—Specifies if the step returns the sine sweep linearly or in decibels. The default is decibels.
    • RMS levels—Specifies whether the RMS levels for the stimulus and response channels are measured.
    • Harmonic distortion—Specifies whether THD and individual harmonic distortion are measured.
    • Maximum harmonic—Specifies the highest harmonic number for swept-sine total harmonic distortion (THD) computations. For example, if maximum harmonic is 3, harmonics 2 and 3 are the only harmonics used to compute THD. The default is –1.
  • Settling—Contains the following options:
    • Time (s)—Specifies how much time, in seconds, must elapse before the measurement begins at the new test frequency. When stepping from one frequency to the next, some devices under test might require a specific amount of settling time before reaching a steady state. The actual settling time is the maximum of Time (s) and Cycles. Allowing the device to reach a steady state helps ensure an accurate response measurement.
    • Cycles—Specifies the minimum number of cycles that must elapse before the measurement begins.
  • Integration—Contains the following options:
    • Time (s)—Specifies the time duration, in seconds, rounded to the next whole cycle, used as the present integration measurement period. The actual integration time used is the maximum of the Time (s), rounded to the next whole cycle, and the Cycles.
    • Cycles—Specifies the duration of the measurement in cycles.
UnitsContains the following options:
  • Stimulus Channel—Specifies the scaling information for the stimulus channel.
    • Sensitivity (mV/EU)—Specifies the sensitivity of the stimulus channel sensor in mV/EU.
    • Engineering units—Specifies the engineering units for the stimulus channel.

      If you are using a microphone, select Pa. If you are using an accelerometer, select g, m/s^2, or in/s^2. If the units you need are not listed, select custom and enter the unit to use in custom label.

      • custom
      • V
      • A
      • Pa
      • N
      • g
      • m/s^2
      • m/s
      • m
      • mm/s
      • mm
      • microns/s
      • microns
      • in/s^2
      • in/s
      • in
      • mils/s
      • mils
      • rad/s^2
      • rad/s
      • rad
      • strain
    • dB reference (EU)—Specifies the reference value used for the stimulus channel when results are computed in decibels. dB reference (EU) is expressed in the selected engineering units. The typical decibels reference for sound pressure level is 20E–6 Pa. When Engineering units is set to Pa, the dB reference (EU) is automatically set to 20E–6 Pa.
    • Custom label—Specifies the string used for stimulus channel units when Engineering units is set to custom. If Engineering units is not set to custom, this option is ignored.
  • Response Channel—Specifies the scaling information for the response channel.
    • Sensitivity (mV/EU)—Specifies the sensitivity of the response channel sensor in mV/EU.
    • Engineering units—Specifies the engineering units for the response channel. If you are using a microphone, select Pa. If you are using an accelerometer, select g, m/s^2, or in/s^2. If the units you need are not listed, select custom and enter the unit to use in custom label.

      • custom
      • V
      • A
      • Pa
      • N
      • g
      • m/s^2
      • m/s
      • m
      • mm/s
      • mm
      • microns/s
      • microns
      • in/s^2
      • in/s
      • in
      • mils/s
      • mils
      • rad/s^2
      • rad/s
      • rad
      • strain
    • dB reference (EU)—Specifies the reference value used for the response channel when results are computed in decibels. dB reference (EU) is expressed in the selected engineering units. The typical decibels reference for sound pressure level is 20E–6 Pa. When Engineering units is set to Pa, the dB reference (EU) is automatically set to 20E–6 Pa.
    • Custom label—Specifies the string used for response channel units when Engineering units is set to custom. If Engineering units is not set to custom, this option is ignored.
AdvancedContains the following options:
  • Sample Rate—Contains the following options:
    • Sample rate (Hz)—Specifies the sampling frequency to acquire the stimulus and response channels in hertz.
    • Lock value—Locks the sampling rate to the value you specify in Sample rate (Hz).
  • Block duration (s)—Specifies the block duration in seconds. The default is 100 milliseconds.
  • Propagation delay (samples)—Specifies the propagation delay, in number of samples, for the device used to perform the measurement. The default is 1 sample.

Block Diagram Inputs

ParameterDescription
stopStops the sweep.
error inDescribes error conditions that occur before this Express VI 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. 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.
restartRestarts the sweep. The default is FALSE.

Block Diagram Outputs

ParameterDescription
sweep doneReturns TRUE when all the frequencies have been measured.
stimulus signalReturns the raw voltage signal acquired on the stimulus channel. You can connect this output to a waveform graph.
response signalReturns the raw voltage signal acquired on the response channel. You can connect this output to a waveform graph.
magnitude (Y/X)Returns the magnitude of the frequency response (response/stimulus). You can connect this output to an XY graph.
phase (Y/X)Returns the phase of the frequency response (response/stimulus). You can connect this output to an XY graph.
stimulus levelReturns the level of the stimulus signal. You can connect this output to an XY graph.
response levelReturns the level of the response signal. You can connect this output to an XY graph.
THDReturns the measured total harmonic distortion (THD). THD is the ratio of the RMS energy of the harmonics to the RMS energy of the fundamental tone. You can connect this output to an XY graph.
harmonicsReturns the measured harmonic components. You can connect this output to an XY graph.
error outContains error information. This output provides standard error out functionality.
statusReturns information about the current swept-sine measurement.
  • elapsed time [s]—Returns the elapsed time since the start of the measurement.
  • scan backlog—Returns the amount of data acquired in the current buffer minus the amount of data read. If scan backlog continues to increase, you are not reading data fast enough and will eventually lose data. The VI returns a buffer overwrite error when data is lost.
  • current source frequency—Returns the frequency, in hertz, currently being generated.
  • current processed frequency—Returns the frequency, in hertz, currently being processed.
  • % complete—Returns the level of completion for the current sweep as a percentage.

Resources


 

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