Activity 7. Create a Multiplot Chart

Your objective is to create a chart that can accommodate more than one plot.

Front Panel

  1. Open the Random Average VI by selecting File»Open and navigating to labview\activity\Random Average.vi.
  2. Select Window»Show Tools Palette to display the Tools palette.
  3. If the Automatic Tool Selection LED in the Tools palette is not lit, click the Automatic Tool Selection button to enable automatic tool selection.
  4. Modify the front panel as shown in the following illustration.

    1. Use the Positioning tool to drag out the plot legend to include two plots. Move the Positioning tool over the corner of the legend to display resizing handles . Move the Positioning tool over a resizing handle to change the tool to the resizing cursor, which you drag out to enlarge the legend.
    2. Rename Plot 1 to Random Average by double-clicking the label and entering the new text. You can resize the label area by using the Positioning tool to drag either of the left corners.
    3. Change the plot style of the Current Value plot. Right-click the plot and select the plot style from the Common Plots shortcut menu.
    4. Change the color of the Current Value plot. Right-click the plot and select the Color shortcut menu. Select a light blue color from the color picker that appears.

Block Diagram

  1. Show the block diagram by selecting Window»Show Diagram or pressing <Ctrl-e>. Macintosh Press <Command-e>.
  2. Right-click the wire between the Divide function and the Random Plot terminal and select Insert from the shortcut menu. From the temporary Functions palette that appears, hold down the mouse button and select the Functions»Cluster»Bundle function.
  3. Add an additional element to the Bundle function.
    1. Move the cursor over the node to display the resizing circles at the top and bottom of the node.
    2. Move the cursor over one of the circles to change the cursor to a resizing handle.
    3. Drag the border of the node vertically or horizontally to add terminals to the node.
  4. Note  The order of the inputs to the Bundle function determines the order of the plots on the chart. For example, if you wire the raw data to the bottom input of the Bundle function and the average to the top, the first plot corresponds to the running average, and the second plot corresponds to the raw data.
    1. Use the Wiring tool to connect the new element of the Bundle function to the wire that connects the Random Number function and the right-most shift register . The Bundle function bundles the running average and the current value into a cluster. Notice that when you wire the second element of the Bundle function, the Random Plot terminal changes appearance to indicate that its data type is now a cluster of numbers.

    Your block diagram should look similar to the following illustration.

    Running the VI

    1. From the front panel, click the Run button to run the VI. The VI displays two plots that share the same vertical scale on the chart.
    2. From the block diagram, click the Execution Highlighting button and run the VI. Notice the data values displayed in the shift registers. Click the Stop button on the front panel to stop the VI.
    3. Click the Execution Highlighting button again to turn execution highlighting off. From the front panel, run the VI.

    Optional Steps

    Complete the following optional steps to experiment with various options of the waveform chart.

    1. While the VI is running, experiment with the buttons on the Scale Legend and the Graph Palette to modify the chart. You can reset the chart, change the scale of the X or Y axis, and change the display format. Click the Plot Legend to modify the appearance of the plots.
    2. Format the scales of the waveform chart to represent either absolute or relative time. To select the x-scale time format, right-click the x-scale and select Formatting from the shortcut menu.
      1. Choose absolute time by selecting the Time & Date option from the Format pull-down menu. For the waveform chart to start at a certain time and increment at certain intervals, you can edit the Xo and dX values respectively. Format the chart to display the data starting from noon, April 1, 2000, and increment every 10 minutes, as shown in the following image. Click the OK button to save your changes.

      2. Select the relative time format and select Decimal from the Format pull-down menu. Modify the dialog box, as shown in the following illustration, and click the OK button.

    3. Click the Run button to run the VI.
    4. Save the VI as Multiple Random Plot.vi in the labview\activity directory.

    End of Activity 7. Create a Multiplot Chart