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

Formatting and Writing Data to a File

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

Formatting and writing data to a file creates a text file and automatically formats the data as a string. You can format and write numeric, string, path, or Boolean data types to a file.

Complete the following steps to format and write data to a file.

  1. Place the Format Into File function on the block diagram.
  2. Wire a path or file refnum to the input file input of the Format Into File function.
  3. Use the Positioning tool to expand the Format Into File function to include the argument inputs necessary for the data.
  4. Wire the data to the argument inputs of the Format Into File function.
  5. If necessary, format the strings in the format string input of the Format Into File function.
  6. If necessary, close the reference to the file by wiring the output file refnum of the Format Into File function to the refnum input of the Close File function. The Format Into File function closes the reference to the file unless you wire the output refnum to another VI or function or unless you open a reference to the file with another VI or function, for example, the Open/Create/Replace File function. In these cases, you must close the file to remove it from memory.
  7. Run the VI.

Resources


 

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