Open Data Storage Express VI

Owning Palette: Storage/DataPlugin VIs

Requires: Base Development System (Windows)

Opens data files with different storage formats for reading or writing. You also can use this Express VI to create a new file or replace an existing file. Use the Close Data Storage Express VI to close the reference to the file.

Note  You must download appropriate DataPlugins and register them on the local computer before you can access the corresponding data files. Refer to the National Instruments website at ni.com/dataplugins to download DataPlugins.
Dialog Box Options
Block Diagram Inputs
Block Diagram Outputs
 Add to the block diagram  Find on the palette

Dialog Box Options

ParameterDescription
DataPluginSpecifies the format of the file you want to access. If you wire a value to the DataPlugin name block diagram input of this Express VI, LabVIEW ignores the DataPlugin option. If you wire an empty string to the DataPlugin name block diagram input, LabVIEW automatically detects the storage format of the data file. Contains the following options:
  • auto-detect the storage format—Automatically detects the storage format of the data file you specify in the File location option or the file path block diagram input.
  • TDM Streaming (high performance)—Opens or replaces an existing .tdms file or creates a new .tdms file. This storage format has a higher performance compared to the TDM with XML Header storage format.
  • TDM with XML Header (medium performance)—Opens or replaces an existing .tdm file or creates a new .tdm file.
  • CSV—Opens an existing data file with comma-separated values (CSV).
  • DAT—Opens an existing .dat file.
  • LVM—Opens an existing text-based measurement file (.lvm).
Tip  Click the Install/Update DataPlugins button on this dialog box to download more DataPlugins from ni.com and install more storage formats to this list.
DataPlugin parameters (if not wired)Contains the following option:
  • File location—Specifies the location of the file you want to open.
Overwrite options (if not wired)Specifies the operation to perform. Contains the following options:
  • open—Opens an existing file.
  • open or create—Opens an existing file or creates a new file if one does not exist.
  • create or replace—Creates a new file or replaces a file if it exists and you give permission. This Express VI replaces a file by opening the file and setting its end of file to 0.
  • create—Creates a new file.
  • open (read only)—Opens an existing file for read only.
Note  Only TDM and TDMS files support all the options listed above. If the DataPlugin you specify in the DataPlugin list is not a .tdms or .tdm file, LabVIEW uses the open (read only) option by default to open the data file. To write to the data file, you can wire a create or create or replace control to the function (open:0) block diagram input.
Install/Update DataPluginsLaunches the Install/Update DataPlugins dialog box which allows you to search, install, and update DataPlugins from the National Instruments website at ni.com/dataplugins.

Block Diagram Inputs

ParameterDescription
file pathSpecifies the full path of the file you want to open.
function (open:0)Specifies the operation to perform.
DataPlugin nameSpecifies the name of the DataPlugin, which determines the storage format of the data file. To open an external data file, you first must install the correct National Instruments DataPlugins. Refer to the National Instruments website at ni.com/dataplugins to download DataPlugins. If you do not wire data to this input, LabVIEW uses the value that you specify in the DataPlugin dialog box option. If you wire data to this input, LabVIEW ignores the value of the DataPlugin option. If you wire an empty string to this input, LabVIEW automatically detects the storage format of the data file.
additional parametersSpecifies additional parameters for the input DataPlugin.
error inDescribes error conditions that occur before this node runs.

Block Diagram Outputs

ParameterDescription
storage refnum (file)Generates a refnum to the file this Express VI opened.
DataPlugin name outReturns DataPlugin name unchanged. If you do not wire data to the DataPlugin name input, DataPlugin name out returns the value that you specify in the DataPlugin dialog box option. If you wire an empty string to the DataPlugin name input, DataPlugin name out returns the storage format that LabVIEW automatically detects.
error outContains error information. This output provides standard error out functionality.