Writes data to text-based measurement files (.lvm) or binary measurement files (.tdm or .tdms).
Use the Read From Measurement File Express VI to read data from the generated measurement file.
| Dialog Box Options |
| Block Diagram Inputs |
| Block Diagram Outputs |
| Parameter | Description | ||
|---|---|---|---|
| File Name | Displays the full path to the file to which you want to write data. The Express VI writes data to the file that this parameter specifies only if the File Name input is unwired. If you wire the File Name input, the VI writes data to the file that this input specifies instead. | ||
| File Format | Contains the following options:
| ||
| Action | Contains the following options:
| ||
| If a file already exists | Contains the following options:
| ||
| Segment Headers | Contains the following options:
| ||
| X Value Columns | Contains the following options:
| ||
| Delimiter | Contains the following options:
| ||
| File Description | Contains the description of the .lvm, .tdm, or .tdms file. LabVIEW appends the text you enter in this text box to the header of the file.
|
| Parameter | Description |
|---|---|
| Signals | Contains the input signal or signals. If you wire two or more signals with the same name to the Signals input, LabVIEW appends an integer to the end of the names written in the file, which enforces unique channel names. For example, if you wire two signals named Sine to the Signals input, LabVIEW writes the names as Sine and Sine 1. |
| Reset | If TRUE, stops and restarts writing data to the .lvm, .tdm, or .tdms file based on the Action or If a file already exists options you select in the Configure Write Measurement File dialog box. The default is FALSE. |
| Enable | Enables or disables the Express VI. The default is ON or TRUE. |
| new_file | If TRUE, stops writing to the current file, creates the next file in the series, and writes to that file instead. This option is available only when you place a checkmark in the Save to series of files (multiple files) checkbox. |
| error in (no error) | Describes error conditions that occur before this VI or function runs. |
| DAQmx Task | Specifies the DAQmx task to use to populate data on the DAQmx Properties page of the Configure User Defined Properties dialog box. |
| Comment | Appends a comment to each data set written to the .lvm or .tdm file. |
| File Name | Specifies the name of the file to which you want to write data. If File Name is not wired, the VI uses the File Name specified in the configuration dialog box. |
| Parameter | Description |
|---|---|
| File Name Out | Returns the name of the file. |
| Saving Data | Indicates if the Express VI is saving the data. |
| error out | Contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces. |
![]() | Note The behavior of this VI changes depending upon the target. If the current target does not or might not have a host computer connected, the configuration dialog box displays warnings next to options that are invalid without a host. If you configure this VI to prompt for input and run the VI on a target with no user interface, such as the Real-Time Module with no host computer connected, this VI returns an error. |
You can also use the Storage VIs to read from and write to .tdm files, or you can use the TDM Streaming functions to read from and write to .tdms files.
This Express VI operates similarly to the following VIs and functions:
Open/Create/Replace File
Write to Text File
Write to Binary File
Write To Spreadsheet File
File Dialog
Format Into File
Refer to the following VIs for examples of using the Write To Measurement File VI: