Friday 12 April 2013

4~10 March 2013 (week 7 )


Tittle Of Activity : 

Project Progress 
-Building an analysis VI .
-Modifying a VI Created from a template .
-Adding a Signal.
-Adding two Signal.
-Filtering a signal.\


Objectives:

-Learn how to build an analysis VI.
-The way of modifying a VI Created from a template .
-Learn how to filter a signal .



Content/Procedure

-In the following exercises, you will build a VI that generates a signal, filters
the signal, indicates if the signal exceeds a certain limit, and records the
data. After you complete the exercises, the front panel of the VI will look
similar to the front panel in Figure below :




Modifying a VI Created from a Template
Complete the following steps to create a VI that generates, analyzes, and
displays a signal.
1. In the Getting Started window, click New to display the New dialogbox.

2. From the Create New list, select VI»From Template»Tutorial (Getting Started)»Generate, Analyze, and Display. This templateVI simulates a signal and analyzes it for its root mean square (RMS

3. Click the OK button or double-click the name of the template to create a VI from the template.

4. If the Context Help window is not visible, press the <Ctrl-H> keys to display the window. (Mac OS X) Press the <Command-Shift-H> keys.

5. Display the block diagram by pressing the <Ctrl-E> keys.

6. Move the cursor over the Amplitude and Level Measurements Express VI, shown at left. The Context Help window displays information about the behavior of the Express VI. Keep the Context Help window open. It will provide useful information as you complete the rest of this exercise.
7. Display the front panel and remove the RMS indicator, shown at left. You will not use the RMS functionality of the Amplitude and Level Measurements Express VI for this exercise. However, you can use the Generate, Analyze, and Display template VI with the RMS functionality in the future to reduce development time.
8. Display the block diagram and remove any broken wires that result from removing the RMS indicator. To remove all broken wires from the block diagram, you can press the <Ctrl-B> keys.
9. Then return to the front panel window and right-click the waveform graph indicator. Select Properties from the shortcut menu. The Graph Properties dialog box appears.
10. On the Appearance page, place a checkmark in the Visible checkbox in the Label section and enter Unfiltered Signal in the text box.
11. Click the OK button to save the configuration and close the Graph Properties dialog box.
12. Run the VI.The signal appears in the graph.

13. Click the STOP button to stop the VI.




Adding a Signal

The Simulate Signal Express VI simulates a sine wave by default. You can customize the simulated signal by changing the options in the Configure Simulate Signal dialog box. Complete the following steps to create an additional simulated signal that adds uniform white noise to the sine wave.

1. On the block diagram, use the Positioning tool to select the Simulate Signal Express VI.
Hold down the <Ctrl> key and click and drag to create an additional Simulate Signal Express VI on the block diagram. (Mac OS X) Hold down the <Option> key and drag. (Linux) You also can hold down the middle mouse button and drag.

2. Release the mouse button to place the copied Simulate Signal Express VI below the original Simulate Signal Express VI. LabVIEW updates the name of the copied Simulate Signal Express VI to Simulate Signal2.

3. Double-click the Simulate Signal2 Express VI to display the Configure Simulate Signal dialog box.

4. Select Sine from the Signal type pull-down menu.

5. Enter 60 in the Frequency (Hz) text box.

6. Enter 0.1 in the Amplitude text box.

7. Place a checkmark in the Add noise checkbox to add noise to the sine signal.

8. Select Uniform White Noise from the Noise type pull-down menu.

9. Enter 0.1 in the Noise amplitude text box.

10. Enter -1 in the Seed number text box.

11. In the Timing section, select the Run as fast as possible option.

12. In the Signal Name section, remove the check mark from the Use signal type name check box.

13. Enter 60 Hz and Noise in the Signal name text box.When you change the signal name in the Configure Simulate Signaldialog box, LabVIEW changes the name of the signal output on the
block diagram. Changing the signal name makes it easier for you to identify the signal type when you view the Express VI on the block iagram .


-The Result Preview section displays a random signal. The Configure Simulate Signal dialog box should appear similar to Figure below :



14. Click the OK button to save the current configuration and close the Configure Simulate Signal dialog box.




Adding Two Signals

-To add two signals together to create one signal, you can use the Formula VI. Rather than merging two signals on one graph, the Formula Express VI adds both signals together to create a single signal on the graph. You can use this Express VI to add noise to a signal.



-Complete the following steps to add the 60 Hz and Noise signal to the Sine signal.

1. In the block diagram window, triple-click the wire that connects theSine output of the Simulate Signal Express VI to the Signals input ofthe Amplitude and Level Measurements Express VI and to the Unfiltered Signal indicator. Remove the wire.

2. On the Functions palette, click the Search button to search for the Formula Express VI, shown at left, and add it to the block diagram between the Simulate Signal Express VIs and the Amplitude and Level Measurements Express VI. The Configure Formula dialog box
appears. Note LabVIEW displays a folder glyph to the left of sub palettes in the search results and displays a light blue glyph to the left of Express VIs in the search results.

3. In the Label column, change the label for X1 to Sine and the label for X2 to 60 Hz and Noise.
The Formula Express VI automatically enters the first input, Sine, in the Formula text box.

4. Click the + button and then the X2 button to add Sine and 60 Hz and Noise together in the Formula text box.

5. Click the OK button to save the current configuration and close the Configure Formula dialog box.

6. Use the Wiring tool to wire the Sine output of the Simulate Signal Express VI to the Sine input of the Formula Express VI.
7. Wire the 60 Hz and Noise output of the Simulate Signal2 Express VI to the 60 Hz and Noise input of the Formula Express VI.
\
8. Wire the Result output of the Formula Express VI to the Unfiltered Signal indicator and to the Signals input of the Amplitude and Level Measurements Express VI.

9. Display the front panel by pressing the <Ctrl-E> keys.

10. Run the VI. The signal with added noise appears in the graph.

11. Click the STOP button to stop the VI.
12. Select File»Save As and save the VI as Analysis.vi in an easily accessible location.




Filtering a Signal

-You can use the Filter Express VI to process signals through filters and windows. Complete the following steps to configure the Filter Express VI to filter the signal using an infinite impulse response (IIR) filter.

1. Display the block diagram window and remove the wire that connects the Result output of the Formula Express VI to the Signals input of the Amplitude and Level Measurements Express VI.

2. Remove all broken wires that result from removing the wire.

3. Search for the Filter Express VI, shown at left, and add it to the block\ diagram between the Simulate Signal2 Express VI and the Amplitude and Level Measurements Express VI. The Configure Filter dialog box appears.

4. In the Filter Specifications section, change the Cutoff Frequency (Hz) to 25.

5. Click the OK button to save the configuration and close the Configure Filter dialog box.

6. Display the front panel.
7. Click the Unfiltered Signal waveform graph indicator and press the\ <Ctrl> key while you drag with the Positioning tool to create an additional waveform graph indicator.

8. Triple-click the Unfiltered Signal 2 label above the new waveform graph indicator and enter Filtered Signal to change the label of the indicator. You also can change the label on the Appearance page of the Graph Properties dialog box.

9. On the block diagram, wire the Result output of the Formula Express VI to the Signal input of the Filter Express VI and to the Unfiltered Signal waveform graph indicator.

10. Wire the Filtered Signal output of the Filter Express VI to the Signals input of the Amplitude and Level Measurements Express VI and to the input of the Filtered Signal waveform graph indicator.








Result&Analysis 

-From the exercise above ,we have learned how to build an analysis vi and at the same time how to add a signal and adding two signal as well . Therefore, Using the filter to filter the signal using an infinite impulse response (IIR) filter .

 


 




No comments:

Post a Comment