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

Scanning a File for Data

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

Scanning a file for data pulls expected data from a text file and formats the data for use with another VI or function.

Complete the following steps to scan a file for data.

  1. Open a reference to a text file.
  2. Place the Scan From File function on the block diagram.
  3. Wire an absolute file path or file refnum to the input file input of the Scan From File function.
  4. Use the Positioning tool to expand the Scan From File function to include the number of data outputs necessary for the data you expect. For example, if you expect to extract a string, two numbers, and a Boolean value from the file, expand the function to include four outputs.
  5. Format the strings in the format string input of the Scan From File function to set the outputs to the data type you expect. You must have one format specification for each output.
  6. Wire the outputs of the Scan From File function to a VI(s), function(s), or indicator(s).
  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