Steps to create a VI that generates a signal and displays it in the front panel window.
1. Launch LabVIEW.
2. In the Getting Started window, click the New or VI from Template link to display the New dialog box.
3. From the Create New list, select VI»From Template»Tutorial (Getting Started)»Generate and Display. This template VI generates and displays a signal.
4. Click the OK button to create a VI from the template. You also can double-click the name of the template VI in the Create New list to create a VI from a template.
LabVIEW displays two windows: the front panel window and the block diagram window.
5. Examine the front panel window.
The user interface, or front panel, appears with a gray background and includes controls and indicators. The title bar of the front panel indicates that this window is the front panel for the Generate and Display VI.
6. Select Window»Show Block Diagram and examine the block diagram of the VI.
The block diagram appears with a white background and includes VIs and structures that control the front panel objects. The title bar of the block diagram indicates that this window is the block diagram for the Generate and Display VI.
7. On the front panel toolbar, click the Run button, shown at left. You also can press the <Ctrl-R> keys to run a VI.
A sine wave appears on the graph in the front panel window.
8. Stop the VI by clicking the front panel STOP button, shown at left.
|
Steps to change this signal to a sawtooth wave
1. Display the block diagram by pressing the <Ctrl-E> keys or by clicking the block diagram.
Locate the Simulate Signal Express VI, shown at left. The Simulate Signal Express VI simulates a signal based on the configuration that you specify.
2. Right-click the Simulate Signal Express VI and select Properties from the shortcut menu to display the Configure Simulate Signal dialog box. Press <Command>-click to perform the same action as right-click.
3. Select Sawtooth from the Signal type pull-down menu.The waveform on the graph in the Result Preview section changes to a sawtooth wave.
| Configure Simulate Signal Dialog Box |
4. Click the OK button to save the current configuration and close the Configure Simulate Signal dialog box.
5. Move the cursor over the down arrows at the bottom of the Simulate Signal Express VI. The down arrows indicate you can reveal hidden inputs and outputs by extending the border of the Express VI.
6. When a double-headed arrow appears, shown at left, click and drag the border of the Express VI to add two rows. When you release the border,the Amplitude input appears.
| Configure Formula Dialog Box |
1. Change the text in the Label column of the dialog box option you read about, shown at left, from X1 to Sawtooth to indicate the input value to the Formula Express VI. When you click in the Formula text box at the top of the Configure Formula dialog box, the text changes to match the label you entered.
2. Define the value of the scaling factor by entering *10 after Sawtooth in the Formula text box.
| Block Diagram of the Acquiring a Signal VI |
|
On the Plots page, select Sawtooth from the top pull-down menu. In the Colors section, click the Line color box to display the color picker. Select a new line color
Post a Comment