0% found this document useful (0 votes)
149 views

Lesson 09 - Accessing Files in LabVIEW-1

This document provides an overview of Lesson 9 on accessing files in LabVIEW. The lesson covers: A) The basic steps for writing and reading files from a LabVIEW application using the File I/O palette. B) The differences between high-level and low-level file I/O functions, and how to use file reference numbers (refnums) for unique file I/O sessions. C) Comparing common file formats like ASCII, binary, TDMS, and LVM for options like easily exchangeable data, disk footprint, read/write access, and high-speed streaming.

Uploaded by

nirmin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
149 views

Lesson 09 - Accessing Files in LabVIEW-1

This document provides an overview of Lesson 9 on accessing files in LabVIEW. The lesson covers: A) The basic steps for writing and reading files from a LabVIEW application using the File I/O palette. B) The differences between high-level and low-level file I/O functions, and how to use file reference numbers (refnums) for unique file I/O sessions. C) Comparing common file formats like ASCII, binary, TDMS, and LVM for options like easily exchangeable data, disk footprint, read/write access, and high-speed streaming.

Uploaded by

nirmin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

Lesson 9

Accessing Files in LabVIEW


Describe the basic concept of file I/O and apply the
appropriate File I/O functions to a given scenario.

A. Accessing Files from LabVIEW


B. High-Level and Low-Level File I/O Functions
C. Comparing File Formats

1
LESSON 9 Accessing Files in LabVIEW

A. Accessing Files from


LabVIEW
Identify the steps for writing and reading files from a
LabVIEW application.

2
A. Accessing Files from LabVIEW

Typical File I/O Operations

Open/ Read
Close Check for
Create/ and/or
File Errors
Replace File Write to File

3
A. Accessing Files from LabVIEW

File I/O Palette for File Operation


Functions

4
LESSON 9 Accessing Files in LabVIEW

B. High-Level and Low-Level


File I/O Functions
Identify when to use high-level and low-level File I/O
functions.

5
B. High-Level and Low-Level File I/O Functions

High-Level File I/O


Open/ Read
Close Check for
Create/ and/or
Replace File Write to File File Errors

6
LESSON 9 Accessing Files in LabVIEW

Exercise 9-1
Exploring High-Level File I/O

Observe how a high-level file I/O VI writes to a spreadsheet-readable file.

7
LESSON 9 Accessing Files in LabVIEW

Exercise 9-1
Exploring High-Level File I/O

How would you include more columns of data in the log file?

8
B. High-Level and Low-Level File I/O Functions

Low-Level File I/O

Open/ Read
Close Check for
Create/ and/or
Replace File Write to File File Errors

9
B. High-Level and Low-Level File I/O Functions

File Refnums
Identify unique file I/O sessions.

refnum

10
B. High-Level and Low-Level File I/O Functions

Streaming Data to Disk

11
B. High-Level and Low-Level File I/O Functions

String Functions
Convert data types to text

12
LESSON 9 Accessing Files in LabVIEW

Exercise 9-2
Temperature Monitor VI—Logging Data

Modify a VI to create an ASCII file using disk streaming.

13
LESSON 9 Accessing Files in LabVIEW

Exercise 9-2
Temperature Monitor VI—Logging Data

What would happen if you used the Open/Create/Replace File and Close File
functions inside the While Loop?

14
LESSON 9 Accessing Files in LabVIEW

C. Comparing File Formats


Recognize different options for logging data to disk.

15
C. Comparing File Formats

Common Log File Formats


TDMS

ASCII/
LVM

Binary
16
C. Comparing File Formats

Comparing File Formats


ASCII Binary TDMS LVM
Easily
Exchangeable
Small disk
footprint
Random
read/write
access
Inherent
attributes
High-speed
streaming
LESSON 9 Accessing Files in LabVIEW

Activity 9-1
Lesson Review

Refer to the participant guide to answer questions about what you have learned in
this lesson and then discuss the answers as a group.

18
Lesson Review

1. After opening a file, which output does the


Open/Create/Replace File I/O function
return?
a. File path
b. File name
c. Refnum out
d. Task out

19
Lesson Review

1. After opening a file, which output does the


Open/Create/Replace File I/O function
return?
a. File path
b. File name
c. Refnum out
d. Task out

20
Lesson Review

2. Which file format is best in an application


that requires high-speed streaming?

a. ASCII
b. Binary
c. TDMS
d. LVM

21
Lesson Review

2. Which file format is best in an application


that requires high-speed streaming?

a. ASCII
b. Binary
c. TDMS
d. LVM

22

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy