Opening a Blank VI
1. In the Getting Started window, click the Blank VI link in the New section or press the <Ctrl-N> keys to open a blank VI.
2. Display the block diagram.
Customizing a User Interface from the Block Diagram
1.On the block diagram, right-click the Mean output of the Sample Compression Express VI and select Create»Numeric Indicator from the shortcut menu to create a numeric indicator. A Mean indicator,shown at left, appears on the block diagram.
2. Right-click the Mean output of the Sample Compression Express VI and select Insert Input/Output from the shortcut menu to insert the Enable input.
3.Right-click the Enable input and select Create»Control from the shortcut menu to create a switch. A Boolean control, shown at left, appears on the block diagram.
4.Right-click the wire that connects the Sine output of the Simulate Signal Express VI to the Signals input of the Sample Compression Express VI and select Create»Graph Indicator from the shortcut
menu.
5. Use the Wiring tool to wire the Mean output of the Sample Compression Express VI to the Sine graph indicator.
The Merge Signals function appears.
6. Arrange the objects on the block diagram.
| Block Diagram of the Reduce Samples VI |
Using a Table to Display Data
1. Display the front panel.
2. On the Controls palette search for the Express Table indicator and add it to the right of the waveform graph.
3. Display the block diagram. LabVIEW wired the Table terminal to the Build Table Express VI.
4. If the Build Table Express VI and the Table terminal are not selected already, click an open area on the block diagram to the left of the Build Table Express VI and the Table terminal. Drag the cursor diagonally until the selection rectangle encloses the Build Table Express VI and the Table terminal, shown at left.
A moving dashed outline, called a marquee, highlights the Build Table
Express VI, the Table terminal, and the wire joining the two.
5. Drag the objects into the While Loop to the right of the Sample Compression Express VI.
6. Use the Wiring tool to wire the Mean output of the Sample Compression Express VI to the Signals input of the Build Table Express VI.
7. The block diagram should appear
| Block Diagram of the Reduce Samples VI |
9. Run the VI.
10. Click the Enable switch. If the Enable switch is on, the table displays the mean values of every
25 samples of the sine wave. If the Enable switch is off, the table does not record the mean values.
11. Stop the VI.
12. Experiment with properties of the table by using the Table Properties dialog box. For example, try changing the number of columns to one.
13. Save and close the VI.
Post a Comment