<< Chapter < Page Chapter >> Page >
En este ejercicio, se pretente escribir datos a un fichero. Completar los siguientes pasos para construir un VI que concatene un texto, un valor numérico y otro texto y guarde estos datos en un fichero. En otro ejercicio, se construirá un VI que lea el contenido de un fichero y lo muestre al usuario.

Panel frontal

  1. Abrir un VI en blanco y construir el panel frontal mostrado en la [link] .
    1. Colocar en el panel frontal un indicador de path situado en la paleta Controls>>Text Indicators . Este indicador muestra el path para el fichero de datos que se va a crear.
    2. Hacer clic con el botón derecho sobre el control String to Write y seleccionar Visible Items>>Scrollbar en el menú contextual para mostrar una barra de desplazamiento.

Diagrama de bloques

  1. Construir el diagrama de bloques mostrado en la [link] .
    1. Colocar en el diagrama de bloques el VI Create String del ejercicio anterior . Seleccionar Functions>>All Functions>>Select a VI y navegar a C:\Exercises\LabVIEW Basics I\Create String.vi . Este subVI concatena las tres cadenas de entrada en una cadena combinada.
    2. Colocar en el diagrama de bloques el VI Open/Create/Replace File , situado en la paleta Functions>>All Functions>>File I/O . Este VI muestra una caja de diálogo para abrir o crear un fichero.Hacer clic con el botón derecho del ratón en la entrada de prompt , seleccionar Create>>Constant en el menú contextual, y escribir Enter Filename en la constante. Cuando el VI se ejecuta, aparece una caja de diálogo de navegación de ficheros con Enter Filename como título de la ventana.Hacer clic con el botón derecho del ratón en la entrada function , seleccionar Create>>Constant en el menú contextual, y hacer clic sobre la constante con la herramienta de operaciones para seleccionar create or replace .
    3. Colocar en el diagrama de bloques la función Write File , situada en la paleta Functions>>All Functions>>File I/O . Esta función escribe las cadenas concatenadas en el fichero.
    4. Colocar en el diagrama de bloques la función Close File , situada en la paleta Functions>>All Functions>>File I/O . Esta función cierra el fichero.
    5. Colocar en el diagrama de bloques el VI Simple Error Handler , situado en la paleta Functions>>All Functions>>Time&Dialog . Esta función chequea el cluster de error y muestra una caja de diálogo si ocurre un error.
    6. Completar el diagrama de bloques como se muestra en la [link] .
  2. Salvar el VI como File Writer.vi en el directorio C:\Exercises\LabVIEW Basics I .

Puesta en marcha del instrumento virtual

  1. Introducir valores en los controles del panel frontal y ejecutar el VI. Aparece la caja de diálogo Enter Filename .
  2. Escribir demofile.txt y hacer clic sobre el botón Save u OK para salvar el fichero.El VI escribe los valores String to Write , Numeric to Write , y Unit to Write en el fichero.
  3. Cerrar el VI.

Questions & Answers

what is defense mechanism
Chinaza Reply
what is defense mechanisms
Chinaza
I'm interested in biological psychology and cognitive psychology
Tanya Reply
what does preconceived mean
sammie Reply
physiological Psychology
Nwosu Reply
How can I develope my cognitive domain
Amanyire Reply
why is communication effective
Dakolo Reply
Communication is effective because it allows individuals to share ideas, thoughts, and information with others.
effective communication can lead to improved outcomes in various settings, including personal relationships, business environments, and educational settings. By communicating effectively, individuals can negotiate effectively, solve problems collaboratively, and work towards common goals.
it starts up serve and return practice/assessments.it helps find voice talking therapy also assessments through relaxed conversation.
miss
Every time someone flushes a toilet in the apartment building, the person begins to jumb back automatically after hearing the flush, before the water temperature changes. Identify the types of learning, if it is classical conditioning identify the NS, UCS, CS and CR. If it is operant conditioning, identify the type of consequence positive reinforcement, negative reinforcement or punishment
Wekolamo Reply
please i need answer
Wekolamo
because it helps many people around the world to understand how to interact with other people and understand them well, for example at work (job).
Manix Reply
Agreed 👍 There are many parts of our brains and behaviors, we really need to get to know. Blessings for everyone and happy Sunday!
ARC
A child is a member of community not society elucidate ?
JESSY Reply
Isn't practices worldwide, be it psychology, be it science. isn't much just a false belief of control over something the mind cannot truly comprehend?
Simon Reply
compare and contrast skinner's perspective on personality development on freud
namakula Reply
Skinner skipped the whole unconscious phenomenon and rather emphasized on classical conditioning
war
explain how nature and nurture affect the development and later the productivity of an individual.
Amesalu Reply
nature is an hereditary factor while nurture is an environmental factor which constitute an individual personality. so if an individual's parent has a deviant behavior and was also brought up in an deviant environment, observation of the behavior and the inborn trait we make the individual deviant.
Samuel
I am taking this course because I am hoping that I could somehow learn more about my chosen field of interest and due to the fact that being a PsyD really ignites my passion as an individual the more I hope to learn about developing and literally explore the complexity of my critical thinking skills
Zyryn Reply
good👍
Jonathan
and having a good philosophy of the world is like a sandwich and a peanut butter 👍
Jonathan
generally amnesi how long yrs memory loss
Kelu Reply
interpersonal relationships
Abdulfatai Reply
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Programación gráfica labview - cadenas de texto y ficheros de entrada y salida. OpenStax CNX. Feb 24, 2009 Download for free at http://cnx.org/content/col10658/1.1
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Programación gráfica labview - cadenas de texto y ficheros de entrada y salida' conversation and receive update notifications?

Ask