Use datalog files to access and manipulate data only in LabVIEW and to store complex data structures quickly and easily.
A datalog file stores data as a sequence of identically structured records, similar to a spreadsheet, where each row represents a record. Each record in a datalog file must have the same data types associated with it. LabVIEW writes each record to the file as a cluster containing the data to store. However, the components of a datalog record can be any data type, which you determine when you create the file.
For example, you can create a datalog whose record data type is a cluster of a string and a number. Then, each record of the datalog is a cluster of a string and a number. However, the first record could be (�abc�,1), while the second record could be (�xyz�,7).
You may eventually decide to change the record data type of your datalog file. In doing so, any VIs you created to manipulate those records will have to be updated to read the new data type. However, once you update your VIs, they cannot read any files created with the old record data type.
Using datalog files requires little manipulation, which makes writing and reading much faster. It also simplifies data retrieval because you can read the original blocks of data back as a record without having to read all records that precede it in the file. Random access is fast and easy with datalog files because all you need to access the record is the record number. LabVIEW sequentially assigns the record number to each record when it creates the datalog file.
You can access datalog files from the front panel and from the block diagram.
LabVIEW writes a record to a datalog file each time the associated VI runs. You cannot overwrite a record after LabVIEW writes it to a datalog file. When you read a datalog file, you can read one or more records at a time.
Another way to create a datalog file is by using front panel data logging, which records data for use in other VIs and in reports.
Refer to the labview\examples\File IO\Datalog\Datalog File.lvproj for examples of reading and writing datalog files.
Open example� Find related examples