Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Writing to Datalog Files

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

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

  1. Place the Open/Create/Replace Datalog function on the block diagram.
  2. Right-click the operation input of the Open/Create/Replace Datalog function and select Create»Constant from the shortcut menu. Select create from the ring constant that appears.
  3. Create a cluster that matches the data record and wire the cluster to the record type input of the Open/Create/Replace Datalog function. The cluster specifies how LabVIEW writes the data to the file.
  4. Place the Write Datalog function on the block diagram.
  5. Wire the refnum out output of the Open/Create/Replace Datalog function to the refnum input of the Write Datalog function.
  6. Create a control or constant to represent the data record and wire it to the record(s) input of the Write Datalog function.
  7. Close the datalog file.
    1. Place the Close File function on the block diagram.
    2. Wire the refnum out output of the Write Datalog function to the refnum input of the Close File function.
  8. After you write to a datalog file, read the file.

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


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit