Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

Writing Data Using the Write To Measurement File Express VI

LabVIEW 2011 Help

Edition Date: June 2011

Part Number: 371361H-01

»View Product Info

Complete the following steps to use the Write To Measurement File Express VI to write numeric or waveform data to a text-based measurement file (.lvm) or binary measurement file (.tdm or .tdms). Use the Read From Measurement File Express VI to read data from a measurement file.

  1. Add the Write To Measurement File Express VI to the block diagram. Notice that the File Name text box in the Configure Write To Measurement File dialog box displays the full path to the output file.
  2. In the File Format section, select the format for the file to which you want to write data.
  3. In the Segment Headers section, select the header option for the file.
  4. Configure the X Value Columns section if you selected Text (LVM) in the File Format section and you plan to view the data in a spreadsheet or text editor, or if you selected Binary (TDMS) or Binary with XML Header (TDM) in the File Format section and you plan to use the Express VI to save single-point data.
  5. Configure the remaining sections in the Configure Write To Measurement File dialog box and click the OK button to save the configuration and close the dialog box.
Note  LabVIEW automatically generates column titles from the data forms that are wired to this VI. To change the column titles, use the Set Dynamic Data Attributes Express VI.
  1. Add the Simulate Signal Express VI to the block diagram and configure the VI.
  2. Wire the output of the Simulate Signal Express VI to the Signals input of the Write To Measurement File Express VI.
  3. Wire all error in and error out terminals on the block diagram.
  4. Run the VI. The VI writes the data from the Simulate Signal Express VI to the file specified in the File Name section of the Configure Write To Measurement File dialog box.
  5. To view the data you saved, open the output file with a spreadsheet or word processing application if it is a .lvm file, with NI DIAdem or the Data Viewer Example VI in the labview\examples\file\storage.llb if it is a .tdm file, or the TDMS File Viewer if it is a .tdms file. Use the file path displayed in the File Name section of the Configure Write To Measurement File dialog box to access the file. You can use the Read From Measurement File Express VI to read data from the file.

You also can use the Storage/DataPlugin VIs to write to a .tdm file.


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit