Owning Palette: Stimulus-Response Test VIs

Requires: Sound and Vibration Toolkit Adds buffering to stimulus-response applications. You must manually select the polymorphic instance to use.

Note For instances of Read from Buffer that read 'Next' data, the next data is tracked by a timestamp unique to each reader name. Use the same reader name (even with different instances of Read from Buffer) to provide continuous read functionality. Use a unique reader name (even with the same instance of Read from Buffer) to read unique streams of data from the buffer.
Instance Use
Next Continuous Data Reads the next x samples, continuous with previous samples. Use this reader for continuous processing and logging to disk.
Next Overlapping Data Reads the next x samples, where a percentage of those samples overlap with the previous read. Use this instance for FFT processing of data; it enables you to simultaneously decouple the processing (read) size from the acquisition (write) size and use overlap to compensate for time-domain windowing effects.
Next Measurement Data Reads the next set of measurement samples of a pre-configured measurement.
Newest Data Reads the newest data available in the buffer. Use this instance when you want to provide dashboard metrics for the latest data found in the buffer.
Data at Timestamp Reads data from a specified timestamp. Use this instance to read arbitrary subsets of buffered data, which is useful when panning through datasets forwards or backwards in time.
All Data Reads all data from the buffer. This is equivalent to the buffer 'Waveforms' property. Use this instance to read all available data.
SV Read Next Continuous DataSV Read Next Overlapping DataSV Read Next Measurement DataSV Read Newest DataSV Read Data at TimestampSV Read All Data

SV Read Next Continuous Data

This buffer read VI advances the reader timestamp such that successive blocks of data are continuous (t0_next = t0_current + N*dt). This read mode is required for continuous processing. This VI can be used to decouple a continuous acquisition stream from continuous processing. It can also be used for a single-write, large-data buffer to perform continuous processing with arbitrary block size. Both of these use cases are useful in producer-consumer design patterns where it is desirable to decouple timing of the data producer and the data consumer. On reset, this buffer read VI sets its read timestamp to 0 (first available) .

  • The default reader ID is ContinuousData .
  • The default block length and timeout are such that this buffer read VI will read all available samples and return immediately. While it may not be required for filtering and other continuous processing, it often makes sense to use a constant read length. If the application is writing and reading to the waveform buffer asynchronously, use a non-zero timeout to allow this buffer read VI to wait for data to become available before returning.

reader ID specifies the identifying information for this reader. Readers with the same reader ID maintain the same timestamp.
buffer specifies a reference to a buffer of continuous waveforms.
block length specifies the number of samples to read from the buffer. The default is โ€“1, all samples remaining.
timeout specifies the time, in milliseconds, the reader will wait to receive data before ending the read. The default is 0 milliseconds.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
reset start (F) specifies if the reader begins at the first samples in the buffer. The default is FALSE.
buffer out returns a reference to a new buffer of continuous waveform data.
waveforms subset returns the subset of waveforms specified by the selected configuration.
t0 indicates the start time of the waveform.
dt indicates the time interval in seconds between data points in the waveform.
Y indicates the data values of the waveform.
end of buffer returns TRUE when this VI has read the last samples available in the buffer.
error out contains error information. This output provides standard error out functionality.

SV Read Next Overlapping Data

This buffer read VI advances the reader timestamp forward so that successive blocks overlap. Overlap may be necessary to maintain sensitivity to transient events that may occur near edges of the analysis block where the DFT window attenuates the signal. Samples may be processed multiple times to smoothly include transient phenomenon and time-varying frequency content. This VI advances the timestamp based on the block size, sample rate, and overlap. T0_next = t0_current + [ (1 - 0.01*overlap) * N * dt ]

  • The default reader name is OverlappingData .
  • The default block size is 4096; default overlap is 50 %.
  • The default timeout is 0 ms indicating that this reader will return immediately with 4,096 (2,048 new + 2,048 previously processed) samples if they are available. This buffer read VI will return with a timeout warning if the samples are not yet available.

This buffer read VI is used in the DSA SFP Sample Project when overlap > 0. This reader is also used in the example <LabVIEW>\examples\Sound and Vibration\Frequency Analysis\Baseband Power Spectrum with Overlap (Simulated) VI

overlap (50 %) specifies the percentage of the last block the VI reads and appends to the current block. The default is 50 .
reader ID specifies the identifying information for this reader. Readers with the same reader ID maintain the same timestamp.
buffer specifies a reference to a buffer of continuous waveforms.
block length specifies the number of samples to read from the buffer. The default is 4,096 samples.
timeout specifies the time, in milliseconds, the reader will wait to receive data before ending the read. The default is 0 milliseconds.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
reset start (F) specifies if the reader begins at the first samples in the buffer. The default is FALSE.
buffer out returns a reference to a new buffer of continuous waveform data.
waveforms subset returns the subset of waveforms specified by the selected configuration.
t0 indicates the start time of the waveform.
dt indicates the time interval in seconds between data points in the waveform.
Y indicates the data values of the waveform.
end of buffer returns TRUE when this VI has read the last samples available in the buffer.
error out contains error information. This output provides standard error out functionality.

SV Read Next Measurement Data

This read mode uses the input signal configuration to parse the data buffer and extract the measurement samples that should be used to perform stimulus-response measurements. Delays can be introduced by NI devices, the device under test (DUT), and propagation delay through the signal path should be removed by the user prior to writing data to the buffer, so that reading next measurement samples is time-locked to the generated stimulus (test) signal.

  • By default, this reader VI uses the name MeasurementData .
  • The default number of samples is -1 (all available samples in this measurement segment).
  • The default timeout is 1000 ms .

On reset, this reader VI resets the timestamp to 0 (first available) which must correspond to the first generated stimulus sample.The audio examples demonstrate use of Read Next Measurement Data VI in the context of stimulus-response measurements.

test signal configuration specifies a configured signal from the SV Signal VI.
reader ID specifies the identifying information for this reader. Readers with the same reader ID maintain the same timestamp.
buffer specifies a reference to a buffer of continuous waveforms.
block length specifies the number of samples to read from the buffer. The default is โ€“1, all samples remaining.
timeout specifies the time, in milliseconds, the reader will wait to receive data before ending the read. The default is 1000 milliseconds.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
reset start (F) specifies if the reader begins at the first samples in the buffer. The default is FALSE.
buffer out returns a reference to a new buffer of continuous waveform data.
waveforms subset returns the subset of waveforms specified by the selected configuration.
t0 indicates the start time of the waveform.
dt indicates the time interval in seconds between data points in the waveform.
Y indicates the data values of the waveform.
end of buffer returns TRUE when this VI has read the last samples available in the buffer.
error out contains error information. This output provides standard error out functionality.
done indicates when the VI finishes reading the configured test measurement.

SV Read Newest Data

This read mode reads the most recent N samples from the buffer. Reading only the newest data can be an effective way to minimize processor requirements when measurement analysis does not rely on previous results.This type of read can be used to create a dashboard of measurements that indicates the latest values.

  • The default reader name is NewestData .
  • The default block size of -1 and timeout of 0 ms result in a read of all available samples and immediate return.

The reader timestamp is set to -|N|*dt which is interpreted as

N

samples at the end (most recent) of the waveform buffer.The SV 2015 DSA SFP Sample Project uses this read mode when averaging = None and overlap = 0.

reader ID specifies the identifying information for this reader. Readers with the same reader ID maintain the same timestamp.
buffer specifies a reference to a buffer of continuous waveforms.
block length specifies the number of samples to read from the buffer. The default is โ€“1, all samples remaining.
timeout specifies the time, in milliseconds, the reader will wait to receive data before ending the read. The default is 0 milliseconds.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
buffer out returns a reference to a new buffer of continuous waveform data.
waveforms subset returns the subset of waveforms specified by the selected configuration.
t0 indicates the start time of the waveform.
dt indicates the time interval in seconds between data points in the waveform.
Y indicates the data values of the waveform.
end of buffer returns TRUE when this VI has read the last samples available in the buffer.
error out contains error information. This output provides standard error out functionality.

SV Read Data at Timestamp

This buffer read VI gets the N samples starting at the specified timestamp. Use this buffer read VI when you want to select data to process by start time and length. This VI sets the reader timestamp to the next sample (t0_next = t0_current + N*dt). Even though the VI advances the timestamp, you can use this VI to read selected blocks of data whether they are continuous, overlapped, or custom spaced. You can also use this buffer read VI to set an arbitrary reader timestamp before calling one of the other read VI instances. Reader timestamps are tagged and advanced by the name of the reader, so read Vis sharing the same name will advance a shared timestamp.

  • The default reader name is SubsetData .
  • default block length = -1 (all available samples)
  • default timeout = 0 (return immediately with available data)

reader ID specifies the identifying information for this reader. Readers with the same reader ID maintain the same timestamp.
buffer specifies a reference to a buffer of continuous waveforms.
block length specifies the number of samples to read from the buffer. The default is โ€“1, all samples remaining.
timeout specifies the time, in milliseconds, the reader will wait to receive data before ending the read. The default is 0 milliseconds.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
timestamp specifies the timestamp at which this reader starts to read. The default is first available.
buffer out returns a reference to a new buffer of continuous waveform data.
waveforms subset returns the subset of waveforms specified by the selected configuration.
t0 indicates the start time of the waveform.
dt indicates the time interval in seconds between data points in the waveform.
Y indicates the data values of the waveform.
end of buffer returns TRUE when this VI has read the last samples available in the buffer.
error out contains error information. This output provides standard error out functionality.

SV Read All Data

This buffer read VI returns all samples available in the buffer and sets the reader timestamp to the next continuous sample:(t0_next = t0_current + N*dt).The default reader name is AllData .This VI does not have timestamp or reset inputs as this buffer read VI returns all data starting at the first available sample.

reader ID specifies the identifying information for this reader. Readers with the same reader ID maintain the same timestamp.
buffer specifies a reference to a buffer of continuous waveforms.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
buffer out returns a reference to a new buffer of continuous waveform data.
waveforms returns the waveforms read from the buffer.
t0 returns the trigger time of the waveform.
dt returns the time interval in seconds between data points in the waveform.
Y returns the data values of the waveform.
error out contains error information. This output provides standard error out functionality.