What is a waveform graph?
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.
Creating a waveform 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.
- X0 - first value on the x-axis
- Δx - increment on the x-axis
- y array - the data points that we want to plot
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.
Labview Training
- Master Your Craft
- Lifetime LMS & Faculty Access
- 24/7 online expert support
- Real-world & Project Based Learning
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.
Subscribe to our YouTube channel to get new updates..!
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.
Conclusion
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.
Related Articles:
About Author
As a content writer at HKR trainings, I deliver content on various technologies. I hold my graduation degree in Information technology. I am passionate about helping people understand technology-related content through my easily digestible content. My writings include Data Science, Machine Learning, Artificial Intelligence, Python, Salesforce, Servicenow and etc.
Upcoming Labview Training Online classes
Batch starts on 21st Dec 2024 |
|
||
Batch starts on 25th Dec 2024 |
|
||
Batch starts on 29th Dec 2024 |
|