You can configure the x- and y-scales, format the x- and y-scales, add a plot, zoom in or out, and add cursors.
Build the block diagram to display data on a waveform, XY, mixed signal, or digital waveform graph. XY Graphs—Display data acquired at a non-constant rate and data for multivalued functions. Explanation: to display multiple plots in the chart, you need to feed it with a cluster, not an array. In the below Figure, the Bundle function bundles the outputs of the three VIs to plot on the waveform chart. The waveform chart terminal changes to match the output of the Bundle function.
Bundle Details The elements in the output cluster must appear in the same order as the input elements. When you wire an existing cluster to the middle terminal of this function, the inputs are optional. LabVIEW replaces only those cluster elements that you wire. Clusters group data elements of mixed types. A cluster is similar to a record or a struct in text-based programming languages. The Bundle function assembles a cluster from individual elements.
You also can use this function to change the values of individual elements in an existing cluster without having to specify new values for all elements. This function refers to cluster elements by name instead of by their position in the cluster.
After you wire the node to an input cluster, right-click the name terminals to select elements from the shortcut menu. You also can use the Operating tool to click the name terminals and select from a list of cluster elements. To unbundle a cluster element by name, the element must have a label…. It then plots all the received points at once. It does not accept single point values. When an array of points is wired to a waveform graph, it assumes the points are equally spaced out.
By default, the starting X value and step size t0 and dt are 0 and 1 respectively. This can be changed in the properties of the graph or using property nodes. A Waveform Chart remembers and displays a certain number of points by storing them in a buffer. When the buffer gets full, the chart starts overwriting the oldest points with new ones.
As the data points become available, the Waveform Chart displays received data in addition to already existing points. Single-plot chart, updated with multiple points at a time.
Wiring a Multiple-Plot Chart. Waveform charts can also accommodate more than one plot. In Figure 8. Notice the change in the waveform chart terminal's appearance when it's wired to the Bundle function. To add more plots, simply increase the number of Bundle input terminals by resizing using the Positioning tool. Bundling data points to create a multi-plot Waveform Chart. When wiring a multiple-plot chart, make sure to use a Bundle function and not a Build Array function.
LabVIEW treats points in an array as belonging to a single plot and treats points in a cluster as belonging to multiple plots. If you build an array, you will have a single plot that has three new points for each loop iteration. This behavior is useful when reading waveforms from hardware, where you are reading multiple samples for a single channel. For an online example of charts, their modes, and their expected data types, open and run Charts.
Charts and graphs are polymorphic; they will accept several different data types, allowing you to create single-plots and multi-plots. However, it is often difficult to remember which data types are used for single-plot and multi-plot. Additionally, there are several different types of charts and graphs, which makes matters worse. Fortunately, there is a way to quickly find out which data types may be used with a specific type of chart or graph. Simply hover the mouse over the chart or graph terminal, on the block diagram, and a detailed description of the plot data types will appear in the Context Help window, as shown in Figure 8.
Note that the WDT item in the third row of the table shown in the Context Help window is the waveform data type, which will soon be discussed. Waveform Chart terminal's context help. The digital display shows the most recent value displayed by the chart. You can use the scrollbar to display older data that has scrolled off the chart.
Sometimes you will find it useful to remove all previous data from the chart display. If you are in run mode, Clear Chart is a pop-up menu option instead of being hidden under Data Operations. Sometimes you will want to perform the Clear Chart operation programmaticallyfor example, when you first start running your VI. The waveform chart accepts the waveform data type , which carries the data, start time, and delta t of a waveform. Use the Build Waveform Analog Waveform function to plot time on the x-axis of the chart and automatically use the correct interval between markers on the x-scale of the chart.
A waveform that specifies t0 and a single-element Y array is useful for plotting data that is not evenly sampled because each data point has its own time stamp. To pass data for multiple plots to a waveform chart, you can bundle the data together into a cluster of scalar numeric values, where each numeric represents a single point for each of the plots. If you want to pass multiple points per plot in a single update, wire an array of clusters of numeric values to the chart.
Each numeric represents a single y value point for each of the plots. You can use the waveform data type to create multiple plots on a waveform chart. Use the Build Waveform function to plot time on the x-axis of the chart and automatically use the correct interval between markers on the x-scale of the chart.
A 1D array of waveforms that each specify t0 and a single-element Y array is useful for plotting data that is not evenly sampled because each data point has its own time stamp. If you cannot determine the number of plots you want to display until run time, or you want to pass multiple points for multiple plots in a single update, wire a 2D array of numeric values or waveforms to the chart.
By default, the waveform chart treats each column in the array as a single plot. Wire a 2D array data type to the chart, right-click the chart, and select Transpose Array from the shortcut menu to treat each row in the array as a single plot. The waveform data type carries the data, start time, and delta t of a waveform. You can create a waveform using the Build Waveform function. Many of the VIs and functions you use to acquire or analyze waveforms accept and return waveform data by default.
When you wire waveform data to a waveform graph or chart , the graph or chart automatically plots a waveform based on the data, start time, and delta x of the waveform. When you wire an array of waveform data to a waveform graph or chart, the graph or chart automatically plots all waveforms. The XY graph is a general-purpose, Cartesian graphing object that plots multivalued functions, such as circular shapes or waveforms with a varying time base.
The XY graph displays any set of points, evenly sampled or not. Lines and labels on these planes are the same color as the Cartesian lines, and you cannot modify the plane label font.
The XY graph can display plots containing any number of points. The XY graph also accepts several data types, which minimizes the extent to which you must manipulate data before you display it. The XY graph accepts three data types for single-plot XY graphs. The XY graph accepts a cluster that contains an x array and a y array. The XY graph also accepts an array of points, where a point is a cluster that contains an x value and a y value.
The XY graph also accepts an array of complex data, in which the real part is plotted on the x-axis and the imaginary part is plotted on the y-axis. The XY graph accepts three data types for displaying multiple plots. The XY graph accepts an array of plots, where a plot is a cluster that contains an x array and a y array.
The XY graph also accepts an array of clusters of plots, where a plot is an array of points. A point is a cluster that contains an x value and a y value. The XY graph also accepts an array of clusters of plots, where a plot is an array of complex data, in which the real part is plotted on the x-axis and the imaginary part is plotted on the y-axis.
Use the intensity graph and chart to display 3D data on a 2D plot by placing blocks of color on a Cartesian plane. For example, you can use an intensity graph or chart to display patterned data, such as temperature patterns and terrain, where the magnitude represents altitude. The intensity graph and chart accept a 3D array of numbers. Each number in the array represents a specific color.
The indexes of the elements in the 2D array set the plot locations for the colors. The following illustration shows the concept of the intensity chart operation. The rows of the data pass into the display as new columns on the graph or chart. If you want rows to appear as rows on the display, wire a 2D array data type to the graph or chart, right-click the graph or chart, and select Transpose Array from the shortcut menu.
The array indexes correspond to the lower left vertex of the block of color. The block of color has a unit area, which is the area between the two points, as defined by the array indexes. The intensity graph or chart can display up to discrete colors. After you plot a block of data on an intensity chart, the origin of the Cartesian plane shifts to the right of the last data block.
When the chart processes new data, the new data values appear to the right of the old data values. When a chart display is full, the oldest data values scroll off the left side of the chart.
0コメント