Friday 22 March 2013

18~24 February 2013 (week 5 )

Title Of Activity 

-Project Progress :
 -Saving a data .
-Adding a Button That stores data when clicked .

Objectives

-To store information about the data a VI generates.
-Click the button to store the data.
-Run the program and see the storing information of the progress.


Content/Procedure

-To store information about the data a VI generates, use the Write To Measurement File Express VI.

-Complete the following steps to build a VI that saves peak-to-peak values and other information to a LabVIEW data file.

1. Search for the Write To Measurement File Express VI and add it to the block diagram below and to the right of the Amplitude and Level Measurements Express VI.

The Configure Write To Measurement File dialog box appears.The Filename text box displays the full path to the output file,test.lvm. A .lvm file is a tab-delimited text measurement file you
can open with a spreadsheet application or a text-editing application.LabVIEW saves data with up to six digits of precision in a .lvm file. LabVIEW saves the .lvm file in the default LabVIEW Data
directory. LabVIEW installs the LabVIEW Data directory in thedefault file directory of the operating system.When you want to view the data, use the file path displayed in the Filename text box to access the test.lvm file.


2. In the Configure Write to Measurement File dialog box, locate theIf a file already exists section and select the Append to file option to write all the data to the test.lvm file without erasing any existing
data in the file.


3. In the Segment Headers section, select the One header only optionto create only one header in the file to which LabVIEW writes the data.

4. Enter the following text in the File Description text box: Sample of peak to peak values. LabVIEW appends the text you enter in this text box to the header of the file.

5. Click the OK button to save the current configuration and close the Configure Write To Measurement File dialog box.


-Saving Data To A File 

-When you run the VI, LabVIEW saves the data to the test.lvm file. Complete the following steps to generate the test.lvm file:

1. On the block diagram, wire the Peak to Peak output of the Amplitude and Level Measurements Express VI to the Signals input of the Write To Measurement File Express VI.

2. Select File»Save As and save the VI as Save Data.vi in an easily accessible location.

3. Display the front panel and run the VI.

4. Click the front panel STOP button.

5. To view the data you saved, open the test.lvm file in the LabVIEW Data directory with a spreadsheet or text-editing application. 
The file has a header that contains information about the Express VI.

6. Close the file after you finish looking at it and return to the Save Data VI.



-Adding a Button That Stores Data When Clicked

-If you want to store only certain data points, you can configure the Write To Measurement File Express VI to save peak-to-peak values only when a user clicks a button.

Complete the following steps to add a button to the VI and configure how the button responds when a user clicks it.


1. Display the front panel and search the Controls palette for a rocker button. Select one of the rocker buttons and place it to the right of the waveform graphs.

2. Right-click the rocker button and select Properties from the shortcut menu to display the Boolean Properties dialog box.
3. Change the label of the button to Write to File.

4. On the Operation page of the Boolean Properties dialog box, select Latch when pressed from the Button behavior list.

Use the Operation page to specify how a button behaves when a user clicks it. To see how the button reacts to a click, click the button in the Preview Selected Behavior section.

5. Click the OK button to save the current configuration and close
the Boolean Properties dialog box.

6. Save the VI.



-Viewing Saved Data

-Complete the following steps to view the data that you save to the Selected Samples.lvm file.

1. Display the front panel and run the VI. Click the Write to File button several times.

2. Click the STOP button.

3. Open the Selected Samples.lvm file with a spreadsheet or text-editing application. The Selected Samples.lvm file differs from the test.lvm file. test.lvm recorded all the data generated by the Save Data VI, whereas Selected Samples.lvm recorded data only when you
clicked the Write to File button.

4. Close the file after you finish looking at it.

5. Save and close the VI.



                      
                           Figure 1 : block diagram of save data .




                            Figure 2 : front panel of save data .




                            Figure 3 : context help box of Write To Measurement File .


Result&Analysis 

-The write to measurement file express VI saves data A VI generates and analysis to a .1vm, tdm, or , tdms measurement file .
- Get to know how to save the data and view it as well after the storing operation is completed .





  

2 comments:

  1. Here's a Quick Way to monitor Oxygen level without help of Doctor
    https://goo.gl/R2X3hq

    ReplyDelete
  2. We are giving away a $100 Amazon gift card to one lucky winner on November 30th, 2017. We hope the winner will use it to buy their

    favorite Santamedical Pulse Oximeter on Amazon but they can use it however they like :)
    There are 7 ways to enter (all free) so you can have up to 12 entries for even more chances to win!
    Enter below by clicking on each of the buttons and enter up to 12 times for free! (no purchase necessary)
    Pulse Oximeter Giveaway
    http://gurinproducts.com/get-a-chance-to-win-100-amazon-gift-card/

    ReplyDelete