User`s guide

6. Create a waveform chart by selecting Controls>>Graph>>Waveform Chart. This chart plots
data one point at a time.
7. Place the chart on the front panel and label it Random Plot.
8. To change the scale of the waveform chart, select the Operating tool from the Tools palette. If the
Tools palette is not visible, select Windows>>Show Tools Palette. Double-click 10.0 on the
Y-axis of the Random Plot indicator and enter new scale value.
Build the Block Diagram
Now you can create the source code in the block diagram of your VI.
1. Go to the block diagram by choosing Show Diagram from the Windows menu or clicking in the
block diagram window. The two terminals on the block diagram correspond to the Power toggle
switch and the Random Plot waveform chart on the front panel.
2. Select Random Number (0-1) from the Functions>>Numeric subpalette. If the Functions
palette is not visible, select Windows>>Show Functions Palette. For this exercise, you use a
random number generator to generate input data for your VI.
3. Place the Random Number function on the block diagram. This VI generates a random number
ranging from zero to one.
4. Select While Loop from the Functions>>Structures subpalette. The While Loop runs all code
within its boundaries while the value on its conditional terminal remains TRUE. When the value
changes to FALSE, the While Loop exits.
5. Place your pointer in the position where you want to anchor the top left corner of the loop. Drag
the loop diagonally to enclose the Random Number function, the Power
toggle switch, and the Random Plot chart.
Wire and Run Your VI
You need to add wiring to define the data flow in your VI. After your VI is complete, you can run it
from the front panel to see the data plot to your chart.
1. Select the Wiring tool from the Tools palette. If the Tools palette is not visible, select
Windows>>Show Tools Palette.
2. Wire the Random Number function to the Random Plot chart terminal. To create a wire, click on
the Random Number function, move to the Random Plot chart, and click again to terminate the
wire.
3. Wire the Power toggle switch terminal to the conditional terminal on the While Loop.
4. Go to the front panel and select the Operating tool. Click the Power toggle switch to turn it to
the TRUE position.
5. Click the Run button on the toolbar to run the VI.
6. To stop running the VI, click the Power toggle switch again to turn it to the FALSE position.
Because the While Loop executes only as long as its conditional terminal remains TRUE,
changing the value of the toggle switch to FALSE stops the loop.