Use the waveform control, the digital waveform control, the waveform graph, and the digital waveform graph to represent the waveforms and digital waveforms you acquire or generate. LabVIEW represents an analog waveform, such as a sine wave or a square wave, with the waveform data type by default. A 1D array of waveform data type represents multiple waveforms. LabVIEW represents a digital waveform with the digital waveform data type by default.

The waveform and digital waveform controls consist of components that include a start time, a delta t, the waveform data, and attributes. Use the Waveform VIs and functions to access and manipulate individual components.

The start time (t0) is a time stamp associated with the first measurement point in the waveform. Use the start time to synchronize plots on a multi-plot waveform graph or digital waveform graph and to determine delays between waveforms. Delta t (dt) is the time interval in seconds between any two points in the signal. The waveform data and the digital waveform data are the values that represent the waveform. An array of any numeric data type other than the fixed-point numeric data type can represent analog waveform data. Generally, the number of data values in the array corresponds directly to the number of scans from a DAQ device. The digital data type represents a digital waveform and displays the digital data in a table. Attributes include information about the signal, such as the name of the signal and the device acquiring the signal. NI-DAQ automatically sets some attributes for you. Use the Set Waveform Attribute function to set attributes, and use the Get Waveform Attribute function to read attributes.

Note If you convert the waveform data type to the dynamic data type, you can set and read attributes of the dynamic data by using the Set Dynamic Data Attributes Express VI and the Get Dynamic Data Attributes Express VI, respectively. These Express VIs automatically convert the dynamic data type to the waveform data type before you can set and read attributes. The dynamic data type is for use with Express VIs.

Displaying Waveforms

To represent waveform data in the front panel window, use the waveform control or the waveform graph. To represent digital waveform data, use the digital waveform control or the digital waveform graph.

Use the waveform control and the digital waveform control to manipulate the t0, dt, and Y components of the waveform or to display those components as an indicator. When you wire a waveform to a graph, the t0 component is the initial value on the x-axis. The number of scans acquired and the dt component determine the subsequent values on the x-axis. The data elements in the Y component comprise the points on the plot of the graph.

If you want to let a user control a certain component, such as the dt component, create a front panel control and wire it to the appropriate component in the Build Waveform (Analog Waveform) function.

If you want to organize digital waveform data into a digital waveform array, use the Group Digital Signals Express VI.

Using the Waveform Control

You can use several VIs to accept, operate on, and/or return waveforms. In addition, you can wire the waveform data type directly to many controls, including the graph, chart, numeric controls, and numeric array controls.

The AI Acquire Waveform VI acquires a specified number of samples at a specified sample rate at a particular time from a single input channel and returns a waveform. The Digital IIR Filter VI accepts an array of waveforms and filters the data of each waveform. The AI Sample Channel VI acquires a single sample from a channel and returns a single-point waveform. The Sine Waveform VI generates a sine waveform, and the AO Generate Waveform VI sends a waveform to a device.

Use the Get Waveform Components (Analog Waveform) function to extract and manipulate the components of a waveform you generate. The Negate function negates waveform data and plots the results to a graph.

Using the Digital Waveform Control

Use the Digital Waveform VIs and functions to manipulate digital data by extracting and editing the components of the digital signal. Use the NI-DAQmx VIs on the Digital I/O palette to acquire and send a digital signal. The Digital Waveform palette also includes VIs that convert analog data to digital signals, search a digital signal for a pattern, append a digital signal(s) to another digital signal, and perform other digital tasks.

Refer to the Taking an NI-DAQmx Measurement in LabVIEW tutorial for more information about creating typical DAQ applications.