You can programmatically graph waveform data on an XY graph.

This procedure describes how to build a simple VI that continuously generates a sine wave and graph that wave on an XY graph. You can apply these same principles to graph real data with LabVIEW.

To display an array of points on a single-plot XY graph, complete the following steps.

  1. Add an XY graph to the front panel.
  2. Build a block diagram with the following objects:
    • Divide function
    • Multiply function
    • Sine function
    • Bundle function
    • For Loop: Drag the loop around all objects on the block diagram except for the XY graph terminal
  3. Wire the x/y output of the Divide function to the x input of the Sine function.
  4. Wire the sin(x) output of the Sine function to the first (top) input terminal of the Bundle function.
  5. Wire the x*y output of the Multiply function to the second (bottom) input terminal of the Bundle function.
  6. Wire the iteration terminal of the For Loop to the x input of the Divide function and to the x input of the Multiply function.
  7. Right-click the y input terminal of the Divide function and select Create»Constant from the shortcut menu.
    A numeric constant appears.
  8. Enter 10 in the constant and press the Enter key.
  9. Wire the constant to the y input terminal of the Multiply function.
  10. Wire the output terminal of the Bundle function to the XY graph terminal.
    An auto-indexing tunnel appears where the wire intersects the loop border.
  11. Right-click the count terminal of the For Loop and select Create Constant from the shortcut menu.
    A numeric constant appears.
  12. Enter 100 in the constant and press the Enter key.
  13. Run the VI.
For an example of graphing XY data, Refer to the XY Graph Data Types VI in the labview\examples\Controls and Indicators\Graphs and Charts\XY Graph.