Displaying data in the form of graphs delivers a lot of information at a glance. A graph can be defined as a visual presentation of data. A business can use graphs for a variety of reasons. There are a lot of graph types available so the business can choose the that fits their needs. Waveform graphs help in showing the variation of data with time. We can create effective waveform graphs using the LabVIEW tool. In this post, we will give you a basic understanding of waveform graphs. We will also show you how to create waveform graphs in the LabVIEW tool. Keep on reading to get knowledge on waveform graphs.
A waveform graph is typically used to represent data collected at a constant rate. It takes in arrays of data in various forms and displays plots of evenly sampled measurements. The input can be of an array, waveform, or dynamic data. It does not accept single point values like charts, but it plots all the received points at once.
The graph plots are displayed in y = f (x) function with points distributed evenly along the x-axis. By default, the starting X value (t0) and step size (dt) are 0 and 1 respectively. But they can be changed through property nodes or by the properties of the graph.
Open LabVIEW and go to Controls palette on the front panel. Navigate to the 'Modern' palette, select 'Graph', and then choose the 'Waveform Graph' indicator option. You will get a graph like structure where you can plot your data. By default, the axes will be configured with increment values, and they will auto-scale at run time. If you don't want to auto-scale the graph increments at run time, right-click on the Waveform Graph and deselect the “Autosize Plot Legend” option.
You have to feed the following data to the waveform.
Go to functions, select programming, and choose the bundle option. Drag and drop the bundle into the block diagram. Open the Mathematics option, select the 'Elementary & Special Functions', and choose the 'Trigonometric' option. Drag and drop the sine wave into the block diagram. Click on the bundle option, and connect the sine wave to the third array of the bundle.
Open the Mathematics function. Go to numeric, choose the numeric constant, and drag and drop it to the block diagram. Edit the constant value to 0.0. Wire it to the first array of the bundle. Drag another numeric constant onto the block diagram. Edit it to 0.1, so each data point will be spaced by 0.1. Wire this to the second array of the bundle. Connect the bundle to the waveform graph icon. Run the waveform graph, and you can see the sine wave.
A single plot on a waveform graph
A single plot waveform graph accepts several data types as input. It accepts an array of values as input, plots the data points on the waveform. It starts the x value at 0 and increments the x-axis by 1. It also accepts a waveform data type that takes in data, start time, and Δt.
The waveform graph also accepts the dynamic data type, which takes in attributes as input that provide information of a signal. It takes the name of the signal or the date and time at which the data is collected. These attributes determine how the signal appears on the waveform graph. If the dynamic data includes a single value, the waveform graph plots that single numeric value. It formats the plot legend and x-axis time stamp dynamically. If the dynamic data type includes a single channel, it plots the waveform graph and formats the x-axis automatically.
Multiple plots on a waveform graph
A multiple plot waveform graph accepts several data types as input. It accepts a 2D array of values in which each row is a single plot. The waveform graph plots the data as points on the graph and starts the x-axis at the value 0, and increments it by 1. To create a multiple plot waveform graph, right-click on the graph and select the 'Transpose Array' option from the shortcut menu.
Multiple plots on the waveform are very much useful for the DAQ devices as they output 2D arrays. The waveform graph also accepts an X0 value, Δx, and a 2D array of y data. The graph plots the y array as data points, index by Δx, and starts at the X0 value. This is useful for sampling multiple channels at a regular rate.
The waveform graph also accepts an array that contains clusters as input. Each cluster further contains a 1D array that has y data. This 1D array determines the points on the plot. The outer array is the cluster for each plot.
With the dynamic data input to a waveform graph, you can format the plot automatically. It provides a lot of user controls through which we can better plot the graph. There are multiple functions available in the waveform graph, including mathematical functions, data communication, signal processing, vision and motion, and many more. Try out creating different waveform graphs with different inputs and functions.
Batch starts on 8th Jun 2023, Weekday batch
Batch starts on 12th Jun 2023, Weekday batch
Batch starts on 16th Jun 2023, Fast Track batch