Waveform charts and waveform graphs support the following data types.
LabVIEW uses waveform charts and graphs to display data with a constant rate.
Waveform charts are used to display measurements as one or more curves of uniform acquisition. Waveform plots plot only single-valued functions, that is, points in y = f(x) that are uniformly distributed along the x-axis. An example is a waveform that varies over time.
Waveform charts can display curves containing any number of data points. Waveform graphs accept a wide range of data types, thus minimizing the amount of work involved in converting data to type before displaying it as a graph.
Note: Digital waveform graphs are used to display digital data.
Displaying a Single Curve in a Waveform Chart
Waveform charts receive multiple data types to display a single curve. For an array of values, where each piece of data is considered to be a point in the graph, the x index is incremented by increments of 1 starting at x = 0. Waveform graphs accept clusters containing arrays of initial x values, ?x, and y data. The waveform graph also receives the waveform data type, which contains the data, start time and time interval (?t) of the waveform.
The waveform graph also receives a dynamic data type for use with the Express VI.The dynamic data type includes, in addition to the data corresponding to the signal, various attributes of the signal information, such as the signal name, the date and time of the data acquisition, and so on. The attributes specify how the signal is displayed in the waveform graph. When the dynamic data type contains a single value, the waveform graph will plot that value and automatically format the legend and x-scale time stamp. When the dynamic data type contains a single channel, the waveform graph will plot the entire waveform while automatically formatting the legend and the time stamp of the x-scale.
Displaying Multiple Curves in a Waveform Chart
Waveform charts receive multiple data types to display multiple curves. Waveform charts receive two-dimensional arrays of values, where a row in the array is a curve. Waveform charts treat the data in the array as points on a graph, incrementing the x index by 1 from x = 0. By connecting a two-dimensional array of data types to a waveform, right-clicking on the waveform and selecting Transpose Array from the shortcut menu, each column in the array is displayed as a curve. Multi-curve waveforms are especially useful for multi-channel data acquisition with DAQ devices, which return data in the form of a two-dimensional array, with each column in the array representing one channel of data.
The waveform also receives clusters containing two-dimensional arrays of initial x values, ?x, and y. The waveform uses the y data as a graph. The waveform graph uses the y data as points on the graph, incrementing the x index by ?x from the initial x value. This data type is suitable for displaying multiple signals sampled at the same rate.
A waveform graph receives an array of curves containing clusters. Each cluster contains a one-dimensional array containing y data. The internal array describes the points on the curve, and each cluster of the external array corresponds to a curve. The following front panel shows such an array of y clusters.
If each curve contains a different number of elements, use a curve array rather than a two-dimensional array. For example, if data is acquired from several channels and the acquisition time is different for each channel, a curve array should be used instead of a two-dimensional array, because the number of elements in each row of a two-dimensional array must be the same. The number of elements in an array within a cluster array can vary.
The waveform graph receives a cluster containing initial values x, ?x, and an array of clusters. Each cluster contains a one-dimensional array containing y data. The bundle function binds the array to the clusters or embeds the clusters in the array with the create array function. The Create Cluster Array function creates an array of clusters containing the specified input. For an example of a graph that receives this data type, see
A waveform graph receives an array of clusters that contains an array of x values, ?x values, and y data. This data type is commonly used by multi-curve waveform graphs to specify a unique start point and x scale increments for each curve.
Waveform charts also receive a dynamic data type for use with Express VI. The dynamic data type includes, in addition to the data corresponding to the signal, various attributes of the signal information, such as the signal name, the date and time of data acquisition, and so on. The attributes specify how the signal is displayed in the waveform graph. When a dynamic data type contains multiple channels, the waveform graph can display curves for each channel and automatically format the legend as well as the time stamp for the graph x scale.
Waveform charts are special numeric display controls that show one or more curves, typically used to display data acquired at a constant rate. The following front panel shows an example of a waveform chart.
The Waveform Chart retains historical data from previous updates, also known as a buffer. The buffer size can be configured by right-clicking on the chart and selecting Chart History Length from the shortcut menu. The default chart history length for waveform charts is 1,024 data points. The frequency of data transfer to the chart determines how often the chart is redrawn.
Displaying a Single Curve in a Waveform Chart
If you pass one or more data values to the chart at a time, LabVIEW treats these data as points on the chart, incrementing the x index by 1 from x = 0. The chart treats these inputs as new data on a single curve.
Waveform charts receive a waveform data type that contains the data, start time, and time interval (?t) of the waveform. The Create Waveform function divides the time on the chart's x-scale and automatically uses the correct interval for the x-scale scale. In a waveform that specifies t0 and a single-element Y array, individual data points have time stamps, making it suitable for plotting non-uniformly sampled data.
Displaying Multiple Curves in a Waveform Chart
To send data from multiple curves to a waveform chart, bundle the data into a cluster of scalar values, where each value represents a single data point on each curve.
To send multiple points to each curve in a single update, connect an array of value clusters to the waveform chart. Each value represents a single y-value point for each curve.
The Waveform data type can be used to create multiple curves in a waveform chart. The "Create Waveform" function divides time on the x-axis of the chart and automatically uses the correct intervals for the x-scales. In a one-dimensional array waveform that specifies t0 and a single-element Y array, individual data points have time identifiers, making it suitable for plotting non-uniformly sampled data.
If you are unable to determine the number of curves to display before running, or wish to pass multiple data points for multiple curves in a single update, you can connect a two-dimensional array of values or waveforms to the chart. By default, the waveform chart treats each column in the array as a curve. To connect a 2D array data type to a chart, right-click the chart and select Transpose Array from the shortcut menu to treat each row in the array as a curve.
Waveform data types
Waveform data types contain the data, start time, and time interval (?t) of a waveform. Waveforms can be created using the Create Waveform function. By default, many VIs and functions for acquiring or analyzing waveforms can receive and return waveform data types. When you connect waveform data to a waveform graph or waveform chart, the graph or chart will automatically plot the waveform based on the waveform data, start time, and △x. When connecting an array of waveform data to a waveform graph or waveform chart, the graph or chart