Owning Palette: File I/O VIs and Functions
Requires: Base Package (Windows). This topic might not match its corresponding palette in LabVIEW depending on your operating system, licensed product(s), and target.
Use the Storage/DataPlugin VIs to read measurement data from a variety of file formats, write data to .tdm or .tdms files, or manage DataPlugins installed on the local computer. You must download appropriate DataPlugins and register them on the local computer before you can access the corresponding file formats. Refer to the National Instruments Web site at ni.com/dataplugins to download DataPlugins.
Refer to the NI Developer Zone at ni.com/zone for information about using the Storage/DataPlugin VIs with an ASAM-ODS database.
|Note If you build an installer for a stand-alone application or shared library that uses the Storage/DataPlugin VIs, you must include the NI USI installer. On the Additional Installers page of the Installer Properties dialog box, place a checkmark in the NI USI checkbox to include the NI USI installer.|
The VIs on this palette can return storage error codes.
|Close Data Storage||Closes a data file. You must use this Express VI to close a data file after you finish reading from or writing to the file. Memory leakage might occur if you do not close the data file.|
|Convert to TDM or TDMS||Converts the specified file to the .tdm or .tdms file format.|
|Data File Viewer||Opens the data file specified in the file path input and presents the data in the Data File Viewer dialog box.|
|Delete Data||Removes a channel group or channel you specify. If you choose to delete a channel group, this VI deletes all channels associated with that channel group. Wire data to the storage refnum input to determine the polymorphic instance to use or manually select the instance.|
|Get Properties||Reads property values from a file, channel group, or channel. If you configure this Express VI before you wire a refnum to storage refnum, the configuration might change depending on the refnum you wire. For example, if you configure this Express VI for a channel and then wire a channel group refnum, this Express VI returns broken wires on the block diagram because the same properties are not available for a channel group.|
|Open Data Storage||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.|
|Read Data||Returns an array of refnums that represent channel groups or channels in the file. If you select Channel as the Object type to read in the configuration dialog box, this Express VI can return the channel data formatted as dynamic data or arrays of specific data types. You also can use this Express VI to return channel groups or channels that meet query conditions you specify.|
|Set Properties||Defines the properties of an existing file, channel group, or channel. If you configure this Express VI before you wire a refnum to storage refnum, the configuration might change depending on the refnum you wire. For example, if you configure this Express VI for a channel and then wire a channel group refnum, this Express VI returns broken wires on the block diagram because the same properties are not available for a channel group.|
|Write Data||Adds a channel group or channel to a file you specify. If you select Channel as the Object type in the configuration dialog box, this Express VI also creates a Signal block diagram input that enables you to add a signal to an existing channel. You also can use this Express VI to define properties for the channel group or channel that you want to add.|
|Advanced Storage VIs||Use the Advanced Storage VIs to read, write, and query data when object types or property names are determined at run time.|
|Manage DataPlugins VIs||Use the Manage DataPlugins VIs to list, export, register, or unregister DataPlugins installed on the local computer.|
Refer to the labview\examples\file\storage.llb for examples of using the Storage/DataPlugin VIs.