Use the digital waveform graph to display digital data, especially when you work with timing diagrams or logic analyzers.

The digital waveform graph accepts the digital waveform data type, the digital data type, and an array of those data types as an input. By default, the digital waveform graph displays data as digital lines and buses in the plot area. Customize the digital waveform graph to display digital buses, digital lines, or a combination of digital buses and lines. If you wire an array of digital data where each array element represents a bus, the digital waveform graph plots each element of the array as a different line in the order that the array elements draw to the graph.

To expand and contract digital buses in the tree view of the plot legend, click the expand/contract symbol to the left of the digital bus. Expanding and contracting digital buses in the tree view of the plot legend also expands and contracts the bus in the plot area of the graph. To expand and contract digital buses when the plot legend is in standard view, right-click the digital waveform graph and select Y Scale»Expand Digital Buses from the shortcut menu.

Note Y Scale»Expand Digital Buses is available only if you disable Show Buses With Lines and the plot legend is in standard view. To disable Show Buses With Lines, change the plot legend to the standard view, right-click the digital waveform graph, and select Show Buses With Lines from the shortcut menu to remove the checkmark next to the menu item.

The digital waveform graph in the following front panel plots digital data as a bus. The VI converts the numbers in the Numbers array to digital data and displays the binary representations of the numbers in the Binary Representations digital data indicator. In the digital graph, the number 0 appears without a top line to symbolize that all the bit values are zero. The number 255 appears without a bottom line to symbolize that all the bit values are 1.

Right-click the y-scale and select Expand Digital Buses from the shortcut menu to plot each sample of digital data. Each plot represents a different bit in the digital pattern. You can customize the appearance of data plotted on a digital waveform graph.

The digital waveform graph in the following front panel displays the six numbers in the Numbers array.

The Binary Representations digital data indicator displays the binary representations of the numbers. Each column in the table represents a bit. For example, the number 89 requires 7 bits of memory (the 0 in column 7 indicates an unused bit). Point 3 on the digital waveform graph plots the 7 bits necessary to represent the number 89 and a value of 0 to represent the unused eighth bit on plot 7. Notice that the data is read from right to left.

The following VI converts an array of numbers to digital data and uses the Build Waveform function to assemble the start time, delta t, and the numbers entered in a digital data control and to display the digital data.

Refer to the labview\examples\Controls and Indicators\Graphs and Charts\Digital Waveform Graph\Digital Waveform Graph.lvproj for examples of the digital waveform graph.

Digital Waveform Data Type

The digital waveform data type carries start time, delta x, the data, and the attributes of a digital waveform. You can use the Build Digital Waveform function to create a digital waveform. When you wire digital waveform data to the digital waveform graph, the graph automatically plots a waveform based on the timing information and data of the digital waveform. Wire digital waveform data to a digital data indicator to view the samples and signals of a digital waveform.