Writing to Datalog Files

Complete the following steps to write each record to a file in the form of a cluster.

  1. Select the New File function on the Functions»File I/O»Advanced File Functions palette and place it on the block diagram.
  2. Create a cluster that matches the data record and wire the cluster to the datalog type input of the New File function. The cluster specifies how LabVIEW writes the data to the file.
  3. Select the Write File function on the Functions»File I/O palette and place it on the block diagram.
  4. Create a control or constant to represent the data record and wire it to the data input of the Write File function.
  5. After you write to a datalog file, read the file.

Refer to the Write Datalog File Example VI in the examples\files\datalog.llb for an example of saving a simulated temperature reading and the timestamp in a LabVIEW datalog file.