Graphing XY Data

Complete the following steps to display an array of points on a single-plot XY graph.

  1. Select an XY graph located on the Controls»Graph palette, and place it on the front panel.
  2. Build a block diagram with the following objects:
  3. Expand the Bundle function to include two inputs.
  4. Wire the x/y output of the Divide function to the x input of the Sine function.
  5. Wire the sin(x) output of the Sine function to the first (top) input terminal of the Bundle function.
  6. Wire the x*y output of the Multiply function to the second (bottom) input terminal of the Bundle function.
  7. 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.
  8. Right-click the y input terminal of the Divide function and select Create»Constant from the shortcut menu. A numeric constant appears.
  9. Enter 10 in the constant and press the <Enter> key.

    Macintosh and UNIX Press the <Return> key.
  10. Wire the constant to the y input terminal of the Multiply function.
  11. 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.
  12. Right-click the count terminal of the For Loop and select Create»Constant from the shortcut menu. A numeric constant appears.
  13. Enter 100 in the constant and press the <Enter> key.

    Macintosh and UNIX Press the <Return> key.
  14. Run the VI.

Refer to the XY Graph VI in the examples\general\graphs\gengraph.llb for an example of graphing XY data.