Skip to content Skip to navigation Skip to collection information

OpenStax-CNX

You are here: Home » Content » Programación Gráfica LabVIEW - Cadenas de texto y Ficheros de entrada y salida » Ejercicios adicionales para cadenas de texto y Ficheros de entrada y salida

Navigation

Recently Viewed

This feature requires Javascript to be enabled.
 

Ejercicios adicionales para cadenas de texto y Ficheros de entrada y salida

Module by: Juan Martínez. E-mail the author

Based on: Additional Exercises for Strings and FileI/O by National Instruments

Exercise 1

Construir un instrumento virtual que genere un array de 2 dimensiones con 3 filas×100 columnas 3 filas 100 columnas de números aleatorios y escriba los datos transpuestos en una hoja de calculo. Añade un encabezamiento en cada columna. Usar los VIs de alto nivel de File I/O situados en la paleta File I/O.

sugerencia:

Usar el VI Write Characters To File para escribir el encabezado y el Write To Spreadsheet File VI para escribir los datos numéricos en el mismo fichero.

Salvar el instrumento virtual como More Spreadsheets.vi en el directorio C:\Exercises\LabVIEW Basics I.

Exercise 2

Construir un VI que convierta cadenas de hoja de calculo delimitadas por tabuladores a cadenas de hoja de calculo delimitadas por comas, es decir, cadenas de hoja de calculo con columnas separadas por comas y filas separadas por caracteres end of line. Visualiza en el panel frontal ambas cadenas, la delimitada por tabuladores y la delimitada por comas.

sugerencia:

Usar la función Search and Replace String.

Salvar el instrumento virtual como Spreadsheet Converter.vi en el directorio C:\Exercises\LabVIEW Basics I.

Exercise 3

Modificar el instrumento virtual Temperature Logger VI para que la aplicación no cree un nuevo fichero cada vez que se ejecuta. Añadir los datos al final del fichero existente temp.dat que fue creado por el VI Temperature Logger. Ejecutar el instrumento virtual varias veces y usar un de procesador de texto para comprobar que el instrumento virtual añade nuevas lecturas de temperatura.

sugerencia:

Borrar la función Format Into File y sustituirla con las funciones Format Into String y Write File. Usar los parámetros pos mode y pos offset de la función Write File para mover la marca de fichero actual.

Seleccionar File>>Save As para salvar el instrumento virtual como Temperature Logger 2.vi en el directorio C:\Exercises\LabVIEW Basics I.

Collection Navigation

Content actions

Download:

Collection as:

PDF | EPUB (?)

What is an EPUB file?

EPUB is an electronic book format that can be read on a variety of mobile devices.

Downloading to a reading device

For detailed instructions on how to download this content's EPUB to your specific device, click the "(?)" link.

| More downloads ...

Module as:

PDF | More downloads ...

Add:

Collection to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks

Module to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

Definition of a lens

Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks