Sunday 14 April 2013

11 ~ 17 March 2013 (week 8)


Tittle of Activity :

Project Progress 
-Modifying the Appearance of graphs.
- Analyzing the Amplitude of the Signal .
-Controlling the Speed of Execution.
-adding a warning light.
-setting a Warning level limit.
-Warning the User.
-saving data to file.


Objectives

-Learn how to modify the Appearance of graphs .
-The way of analyzing the amplitude of the signal, and control.
-How to add a warning light and set it a level limit for that light .
-To warn the user and save the data to file .



Content/Procedure

-Modifying the Appearance of Graphs

-You can use the Display Format page of the Graph Properties dialog boxto specify how the scales of the x-axis and y-axis appear on the graph.Complete the following steps to change the format of the x-axis and y-axisof the Unfiltered Signal and Filtered Signal graphs.

1. In the front panel window, right-click the Unfiltered Signal graphindicator and select Properties from the shortcut menu. The GraphProperties dialog box appears.

2. On the Display Format page, select Time (X-Axis) from the toppull-down menu.

3. Select the Default editing mode option.

4. In the Type list, select Automatic formatting.

5. In the Digits field, enter 6 and select Significant digits from the Precision Type pull-down menu.

6. Place a checkmark in the Hide trailing zeros checkbox.

7. Select Amplitude (Y-Axis) from the top pull-down menu and repeat steps 3–6 so the y-axis configuration matches the x-axis configuration.

8. On the Scales page, select Amplitude (Y-Axis).

9. Remove the check mark from the Auto scale check box.

10. Enter -2.5 in the Minimum text box and 2.5 in the Maximum text box.

11. Click the OK button to save the configuration and close the Graph Properties dialog box.

12. Repeat steps 1–11 to configure the Filtered Signal graph indicator. The x-axis and the y-axis on the Unfiltered Signal and Filtered Signal graph indicators change to reflect the new configuration.



-Analyzing the Amplitude of a Signal

-You can use the Amplitude and Level Measurements Express VI to analyze the voltage characteristics of a signal. Complete the following steps to reconfigure the Express VI to measure the peak-to-peak amplitude values of the signal.

1. On the block diagram, double-click the Amplitude and Level Measurements Express VI to display the Configure Amplitude and Level Measurements dialog box.

2. In the Amplitude Measurements section, remove the checkmark from the RMS checkbox.

3. Place a check mark in the Peak to peak check box. Peak to peak appears in the Results section with the corresponding value of the measurement.

4. Click the OK button to save the current configuration and close the Configure Amplitude and Level Measurements dialog box. The RMS output of the Amplitude and Level Measurements Express VI changes to reflect the new Peak to Peak output, shown at left. You will use the Peak to Peak output in a later exercise.








 - Controlling the Speed of Execution

-To plot the points on the waveform graphs more slowly, you can add a time delay to the block diagram. A time delay slows the speed at which a VI runs. Complete the following steps to control the speed at which the VI runs.

1. On the block diagram, search for the Time Delay Express VI.

2. Place the Time Delay Express VI inside the While Loop. The Configure Time Delay dialog box appears.

3. Enter 1.000 in the Time delay (seconds) text box and click the OK button


4. Display the front panel and run the VI. The VI runs more slowly. The loop iterates once every second.

5. Stop the VI. Another way to control the speed of the VI is to alter the rate of data acquisition. On the block diagram, double click the Simulate Signal Express VI to display the Configure Simulate Signal dialog box. Locate the Timing section in the dialog box. The Timing section contains a number of ways to alter the rate of data acquisition and the speed at which a VI runs.
For example, one of the default settings of the VI is Simulate Acquisition Timing. This means that the VI mimics the acquisition rate of a hardware device. You can select Run as fast as possible to
display data more quickly. In the Samples per second (Hz) text box, the default value is 1000, while the default value in the Number of Samples text box is 100. This means that the VI will output 100 data
points spanning 0.1 second. You can change these values to change the amount of data the VI displays, as well as the rate at which the VI displays the data.

-Adding a Warning Light

-If you want a visual cue to indicate when a value exceeds a specified limit, you can use a warning light.
Complete the following steps to add a warning light to the VI.

1. Display the Controls palette by right-clicking any blank space in the front panel window.

2. On the Express palette, select the LEDs palette.

3. Select the round LED indicator and add it to the front panel to the left of the waveform graphs.

4. Double-click the Boolean label above the LED and enter Warning to change the label of the LED.
You will use this LED in a later exercise to indicate when a value has exceeded its limit.

5. Select File»Save As to display the Save As dialog box.

6. Read the various dialog box options. Select the Copy and Substitute copy for original options to create a copy of the original VI and immediately edit the copy.

7. Click the Continue button and save the VI as Warning Light.vi in an easily accessible location.

-Setting a Warning Level Limit

-To specify the value at which you want the LED to light, use the Comparison Express VI. Complete the following steps to compare the peak-to-peak value to a limit you set.

1. On the block diagram, search for the Comparison Express VI and place it to the right of the Amplitude and Level Measurements Express VI. The Configure Comparison dialog box appears.

2. In the Compare Condition section, select the > Greater option.

3. In the Comparison Inputs section, select Value and enter 2 in the Value numeric control to assign a constant value at which you want the LED to light.

4. Click the OK button to save the current configuration and close the Configure Comparison dialog box. The name of the Comparison Express VI changes to reflect the operation of the Express VI, shown at left. Greater indicates that the Express VI does a greater than comparison.

5. Wire the Peak to Peak output of the Amplitude and Level Measurements Express VI to the Operand 1 input of the Greater Express VI.

6. Move the cursor over the wire that connects the Peak to Peak output to the Operand 1 input.

7. When the Positioning tool appears, right-click the wire that connects the Peak to Peak output to the Operand 1 input and select Create» Numeric Indicator from the shortcut menu. A Peak to Peak terminal, shown at left, appears on the block diagram. If the Peak to Peak terminal appears to be on top of the wires between the Express VIs, move the Express VIs and Peak to Peak terminal
around to create more space. For example, move the Peak to Peak terminal into blank space above the Express VIs.


-Warning the User

After you specify the values at which you want the LED to light, you must wire the LED to the Greater Express VI. Complete the following steps to provide a visual cue when the peak-to-peak value of the signal exceeds a specified limit.

1. In the block diagram window, move the Warning terminal to the right of the Greater Express VI. Make sure the Warning terminal is inside the While Loop, as shown in Figure below :





2. Wire the Result output of the Greater Express VI to the Warning terminal. The block diagram should appear similar to Figure above .

3. Display the front panel. A numeric indicator labeled Peak to Peak appears in the front panel
window. This indicator displays the peak-to-peak value of the signal.

4. Run the VI. When the peak-to-peak value exceeds 2.0, the Warning indicator lights.

5. Click the STOP button to stop the VI.

6. Save the VI.



                               figure1 :Block Diagram of the Save Data VI.




Result&Analysis 

-From this exercise we have learned how to modify the appearance of the graphs and analysis the amplitude of signal as well .
-Get the way of controlling the speed of execution and adding a warning light , as we know there are a limits for the warning light so in this exercise it teach you of setting warning light.
as well as warning the user and get the way of saving data for the signal .







No comments:

Post a Comment