DYNAMICALLY FORMATTING WAVEFORM GRAPHS AND CONFIGURING A GRAPH OR CHART IN LABVIEW
DYNAMICALLY FORMATTING WAVEFORM GRAPHS
Wire a dynamic data type output to a waveform graph to automatically format the plot legend and x-scale time stamp for the graph. For example, if you configure the Simulate Signal Express VI to generate a sine wave and to use absolute time and wire the output of the Simulate Signal Express VI to a waveform graph, the plot legend of the graph automatically updates the plot label to sine, and the x-scale displays the time and date when you run the VI. Right-click the graph and select Ignore Attributes from the shortcut menu to ignore the plot legend label the dynamic data includes. Right-click the graph and select Ignore Time Stamp from the shortcut menu to ignore the time stamp configuration the dynamic data includes.
DYNAMIC DATA TYPE
Most Express VIs accept and/or return the dynamic data type. The dynamic data type appears as a dark blue terminal, shown as follows.
The dynamic data type accepts data from and sends data to the following data types, where the scalar data type is a floating-point number or a Boolean value:
- 1D array of waveforms
- 1D array of scalars
- 1D array of scalars—most recent value
- 1D array of scalars—single channel
- 2D array of scalars—columns are channels
- 2D array of scalars—rows are channels
- Single scalar
- Single waveform
Wire the dynamic data type to an indicator that can be the best to present the data. Indicators include a graph, chart, or numeric indicator. However, because dynamic data undergoes an automatic conversion to match the indicator to which it is wired, Express VIs can slow down the block diagram execution speed.
The dynamic data type is for use with Express VIs. Most other VIs and functions that ship with LabVIEW do not accept this data type. To use a built-in VI or function to analyze or process the data the dynamic data type includes, you must convert the dynamic data type.
CONFIGURING A GRAPH OR CHART
Right-click a graph or chart and select one of the following shortcut menu options to configure a graph or chart.
Stack Plots—Stacks the plots. Remove the checkmark from this shortcut menu option to overlay the plots. This option is available only for charts.
Chart History Length—Launches the Chart History Length dialog box. This option is available only for charts.
Transpose Array—Switches the x– and y-data before plotting. You also can use the Transpose Array property to switch the x– and y-data before plotting programmatically.
Autosize Legend—Automatically resizes the plot legend to the width of the longest plot name visible in the legend. You also can configure the x– and y-axes on a graph or chart.