Reading from Datalog Files
- Updated2026-08-05
- 1 minute(s) read
Read data records from a LabVIEW datalog file by opening the file, defining the record type cluster, and using Read Datalog.
To read data from a datalog file, complete the following steps.
- Add the Open/Create/Replace Datalog function to the block diagram to open the datalog file for reading.
-
Create a cluster constant that matches the data in the record and wire the cluster to
the record type input of the Open/Create/Replace
Datalog function.
LabVIEW uses the cluster to verify that the specified file is a datalog file containing records whose type matches record type. If they do not match, LabVIEW reports an error when you run the VI.
- Add the Read Datalog function to the block diagram.
- Wire the refnum out output of the Open/Create/Replace Datalog function to the refnum input of the Read Datalog function.
-
Close the datalog file.
- Add the Close File function to the block diagram.
- Wire the refnum out output of the Read Datalog function to the refnum input of the Close File function.
-
Right-click the record(s) output of the Read
Datalog function and select .
An indicator is added to the front panel.
-
Run the VI.
LabVIEW displays the data record in the front panel indicator.
Related Information
- Creating Cluster Constants
- Datalog Type
The data type of each record in a datalog file can be of any type. However, the data type varies depending on how you logged the data to the datalog file.