Example Code

Write and Read Text File As Appended Using LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Download All

Overview

This VI shows how to write and read text file as appended using LabVIEW

 

Description

The program consists of a state machine, where it first writes the number of samples that the user indicates, random numbers are generated between 0 and 10, which are stored, then goes to the next state where the information is obtained from the file , The samples are plotted and the number of elements in the file is obtained as well as the average value.

 

Requirements

Software:

  • LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code

1. Select how many element do you want to write.
2. Run VI.
3. Notice that every time application run, elements inside report is increasing by "Numbers to Write."

 

Additional Information or Resources

 

2012_Read.png2012_Write.png

 

 

 

**This document has been updated to meet the current required format for the NI Code Exchange.**

 

 

Arturo Gómez | Applications Engineering
Certified LabVIEW Associated Developer

National Instruments Latin America
01-800-010-0793
ni.com/support

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
HunterSeeker
Member
Member
on

Por favor incluya una captura de pantalla en todos ejemplos.

Gracias!

Todd S.
NI Employee (retired)
on

Gracias por subir este codigo a la Comunidad! Cuando tengas tiempo, por favor haga las siguientes cambios:

1.  Anadir una foto del block diagram para darnos idea como funciona su codigo

2.  Cambiar el nombre del archivoadjunto a incluir la version de LabVIEW ("_lvXX.vi")

3.  Cambiar el titulo del documento para que no sea una pregunta (queremos que aparezca en una forma)

Otra vez, gracias por incluyendo este codigo en la Comunidad!!!

Todd S.
LabVIEW Community Manager
National Instruments