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.

  1. Add the Open/Create/Replace Datalog function to the block diagram to open the datalog file for reading.
  2. 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.
  3. Add the Read Datalog function to the block diagram.
  4. Wire the refnum out output of the Open/Create/Replace Datalog function to the refnum input of the Read Datalog function.
  5. Close the datalog file.
    1. Add the Close File function to the block diagram.
    2. Wire the refnum out output of the Read Datalog function to the refnum input of the Close File function.
  6. Right-click the record(s) output of the Read Datalog function and select Create » Indicator.
    An indicator is added to the front panel.
  7. Run the VI.
    LabVIEW displays the data record in the front panel indicator.