Está en la página 1de 10

Práct icas con NI myRIO

Adquisición y análisis de una señal con NI myRIO


Worldwide Technical Support and Product Information
ni.com
National Instruments Corporate Headquarters
11500 N Mopac Expw y Austin, Texas 78759 -3504 USA Tel: 512 683 0100
Worldwide Offices
Andean and Caribbean + 58 212 503 -5310, Argentina 0800 666 0037, Australia 1800 300 800, Austria 43 662 45 79 90
0, Belgium 32 0 2 757 00 20, Brazil 55 11 3262 3599, Canada 800 433 3488, Chile 800 532 951, China 86 21 5050
9800, Czech Republic/Slovakia 420 224 235 774, Denmark 45 45 76 26 00, Finland 358 0 9 725 725 11, France 33 0 1
48 14 24 24, Germany 49 89 741 31 30, Hungary 36 23 501 580, India 1 800 425 7070, Ireland 353 0 1867 4374, Israel
972 3 6393737, Italy 39 02 413091, Japan 81 3 5472 2970, Korea 82 02 3451 3400, Lebanon 961 0 1 33 28 28,
Malaysia 1800 887710, Mexico 01 800 010 0793, Netherlands 31 0 348 433 466, New Zealand 0800 553 322, Norw ay
47 0 66 90 76 60, Poland 48 22 3390150, Portugal 351 210 311 210, Russia 7 495 783 68 51, Singapore 1800 226
5886, Slovenia/Croatia, Bosnia/Herzegovina, Serbia/Montenegro, Macedonia 386 3 425 42 00, South Africa 27 0 11 805
8197, Spain 34 91 640 0085, Sw eden 46 0 8 587 895 00, Sw itzerland 41 56 200 51 51, Taiw an 886 2 2377 2222,
Thailand 662 278 6777, Turkey 90 212 279 3031, U.K. 44 0 1635 523545, Uruguay 0004 055 114
To comment on National Instruments documentation, refer to the National Instruments Web site at ni.com/info and enter the
info code feedback.
© 2013 National Instruments Corporation. All rights reserved.
Important Information
Warranty
The media on w hich you receive National Instruments softw are are w arranted not to fail to execute programming instructions, d ue to defects in materials
and
w orkmanship, for a period of 90 days from date of shipment, as evidenced by receipts or other documentation. National Instruments w ill, at its option,
repair or replace softw are media that do not execute programming instructions if National Instruments receives notice of such defects during t he w arranty
period. National Instruments does not w arrant that the operation of the softw are shall be uninterrupted or error free. A Retu rn Material Authorization
(RMA) number must be obtained from the factory and clearly marked on the outside of the package before any equipment w ill be accepted for w arranty
w ork. National Instruments w ill pay the shipping costs of returning to the ow ner parts w hich are covered by w arranty. National Instruments believes that
the information in this document is accurate. The document has been carefully review ed for technical accuracy. In the event that technical or
typographical errors exist, National Instruments reserves the right to make changes to subsequent editions of this document w ithout prior notice to
holders of this edition. The reader should consult National Instruments if errors are suspected. In no event shall National Instruments be li able for any
damages arising out of or related to this document or the information contained in it. EXCEPT AS SPECIFIED HEREIN, NA TIONAL INSTRUMENTS MAKES
NO WARRANTIES, EXPRESS OR IMPLIED, AND SPECIFICALLY DISCLAIMS ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
PURPOSE. CUSTOMER’ S RIGHT TO RECOVER DAMAGES CAUSED
BY FAULT OR NEGLIGENCE ON THE PART OF NATIONAL INSTRUMENTS SHALL BE LIMITED TO THE AMOUNT THERETOFORE PAID BY THE
CUSTOMER. NATIONAL INSTRUMENTS WILL NOT BE LIABLE FOR DAMAGES RESULTING FROM LOSS OF DATA, PROFITS, USE OF PRODUCTS,
OR INCIDENTAL OR CONSEQUENTIAL DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. This limitation of the liability of National
Instruments w ill apply regardless of the form of action, w hether in contract or tort, including negligence. Any action agains t National Instruments must be
brought
w ithin one year after the cause of action accrues. National Instruments shall not be liable for any delay in performance due to causes beyond its
reasonable control. The w arranty provided herein does not cover damages, defects, malfunctions, or service failures caused by ow ner’ s failure to follow
the National Instruments installation, operation, or maintenance instructions; ow ner’ s modification of the product; ow ner’ s abuse, misuse, or negligent
acts; and pow er failure or surges, fire, flood, accident, actions of third parties, or other events outside reasonable control.
Copyright
Under the copyright law s, this publication may not be reproduced or transmitted in any form, electronic or mechanical, includ ing photocopying, recording,
storing in an information retrieval system, or translating, in w hole or in part, w ithout the prior w ritten consent of National Instruments Corporation.
National Instruments respects the intellectual property of others, and w e ask our users to do the same. NI softw are is protec ted by copyright and other
intellectual property law s. Where NI softw are may be used to reproduce softw are or other materials belonging to others, you may use NI softw are only to
reproduce materials that you may reproduce in accordance w ith the terms of any applicable license or other legal restriction. BSIM3 and BSIM4 are
developed by the Device Research Group of the Department of Electrical Engineering and Computer Science, University of Califo rnia, Berkeley, and
copyrighted by the University of California.
Trademarks
CompactDAQ, CompactRIO, LabVIEW, National Instruments, and NI, ni.com are trademarks of National Instruments Corporation. Ref er to the Terms of
Use section on ni.com/legal for more information about National Instruments trademarks. Other product and company names mentioned herein are
trademarks or trade names of their respective companies.
Patents
For patents covering National Instruments products, refer to ni.com/patents.
Some portions of this product are protected under United States Patent No. 6,560,572 .
WARNING REGARDING USE OF NATIONAL INSTRUMENTS PRODUCTS
(1) NATIONAL INSTRUMENTS PRODUCTS ARE NOT DESIGNED WITH COMPONENTS AND TESTING FOR A LEVEL OF RELIABILITY SUITABLE
FOR USE IN OR IN CONNECTION WITH SURGICAL IMPLANTS OR AS CRITICAL COMPONENTS IN ANY LIFE SUPPORT SYSTEMS WHOSE
FAILURE TO PERFORM CAN REASONABLY BE EXPECTED TO CAUSE SIGNIFICANT INJURY TO A HUMAN.
(2) IN ANY APPLICATION, INCLUDING THE ABOVE, RELIABILITY OF OPERATION OF THE SOFTWARE PRODUCTS CAN BE IMPAIRED BY
ADVERSE FACTORS, INCLUDING BUT NOT LIMITED TO FLUCTUATIONS IN ELECTRICAL POWER SUPPLY, COMPUTER HARDWARE
MALFUNCTIONS, COMPUTER OPERATING SYSTEM SOFTWARE FITNESS, FITNESS OF COMPILERS AND DEVELOPMENT SOFTWARE USED TO
DEVELOP AN APPLICATION, INSTALLATION ERRORS, SOFTWARE AND HARDWARE COMPATIBILITY PROBLEMS, MALFUNCTIONS OR
FAILURES OF ELECTRONIC MONITORING OR CONTROL DEVICES, TRANSIENT FAILURES OF ELECTRONIC SYSTEMS (HARDWARE AND/OR
SOFTWARE), UNANTICIPATED USES OR MISUSES, OR ERRORS ON THE PART OF THE USER OR APPLICATIONS DESIGNER (ADVERSE FACTORS
SUCH AS THESE ARE HEREAFTER COLLECTIVELY TERMED “ SYSTEM FAILURES” ). ANY APPLICATION WHERE A SYSTEM FAILURE WOULD
CREATE A RISK OF HARM TO PROPERTY OR PERSONS (INCLUDING THE RISK OF BODILY INJURY AND DEATH) SHOULD NOT BE RELIANT
SOLELY UPON ONE FORM OF ELECTRONIC SYSTEM DUE TO THE RISK OF SYSTEM FAILURE. TO AVOID DAMAGE, INJURY, OR DEATH, THE
USER OR APPLICATION DESIGNER MUST TAKE REASONABLY PRUDENT STEPS TO PROTECT AGAINST SYSTEM FAILURES, INCLUDING BUT
NOT LIMITED TO BACK-UP OR SHUT DOWN MECHANISMS. BECAUSE EACH END-USER SYSTEM IS CUSTOMIZED AND DIFFERS FROM
NATIONAL INSTRUMENTS' TESTING PLATFORMS AND BECAUSE A USER OR APPLICATION DESIGNER MAY USE NATIONAL INSTRUMENTS
PRODUCTS IN COMBINATION WITH OTHER PRODUCTS IN A MANNER NOT EVALUATED OR CONTEMPLATED BY NATIONAL INSTRUMENTS,
THE USER OR APPLICATION DESIGNER IS ULTIMATELY RESPONSIBLE FOR VERIFYING AND VALIDATING THE SUITABILITY OF NATIONAL
INSTRUMENTS PRODUCTS WHENEVER NATIONAL INSTRUMENTS PRODUCTS ARE INCORPORATED IN A SYSTEM OR APPLICATION,
INCLUDING, WITHOUT LIMITATION, THE APPROPRIATE DESIGN, PROCESS AND SAFETY LEVEL OF SUCH SYSTEM OR APPLICATION.
Contenido
Requerimientos ............................................................................................................... 5
Softw are ................................................................................................................5
Hardw are ...............................................................................................................5
Ejercicio 1. Adquirir una señal por medio de un micrófono ..................................................... 6
Ejercicio 2. Indicadores de magnitud de señal .....................................................................10
Fuentes de Información ...................................................................................................12
Requerimientos
Sof t w are
 NI LabVIEW 2013
 NI LabVIEW Real-Time Module
 NI LabVIEW FPGA Module (opcional)
 NI myRIO Driver

Hardw are
 NI myRIO
 Micrófono entrada 3.5mm
 Cable USB myRIO (opcional/incluido el myRIO)
 Fuente de alimentación 12V (Incluida en myRIO)
Adquisición de dat os

Ejercicio 1. Adquisición de una señal por medio


de un micróf ono
Objetivos

 Familiarizarse con las entradas del NI myRIO


 Adquirir una señal con un micrófono por medio de la entrada de audio

Introducción

NI myRIO es un hardw are embebido diseñado específicamente para ayudar a los


estudiantes a desarrollar sistemas de ingeniería complejos y reales, de manera más rápida y
económica que antes.

De igual forma él NI myRIO posee múltiples entradas y salidas, en esta práctica se utilizará
la entrada de audio, de 3.5mm, que viene integrada con nuestro NI myRIO, para adquirir
una señal y obtener sus valores por medio de LabVIEW, a esta entrada se le puede
conectar un micrófono o un reproductor de música portátil.

Desarrollo

1. Conecte su NI myRIO a la fuente de alimentación y a su vez a la toma eléctrica.


Conecte el cable USB del myRIO a su computadora (aparecerá la siguiente pantalla).
Figura 1. Detección del NI myRIO

2. Cerciórese de tener la versión actualizada del controlador (drivers) de su dispositivo


y que está bien conectado, para esto lo buscará en NI MAX.

Figura 2. Dispositivo det ectado en NI MAX


3. Ejecute LabVIEW y abra el proyecto “ Electret Microphone demo.lvproj”
4. Conecte el micrófono a la entrada de audio de su myRIO

Figura 3. Micrófono conectado a la entrada de audio

5. En la carpeta de su proyecto abra el “ Main.vi”


6. Ejecute el VI y emita un sonido en el micrófono

Figura 4. Panel frontal y diagrama de bloques


(Como podrá ver en el panel frontal, por medio de la tabla puede observar los
valores de amplitud que son emitidos por el micrófono)

FIN DEL EJERCICIO

Ejercicio 2. Indicadores de magnit ud de señal


Objetivo

 Utilizar los indicadores integrados en él NI myRIO para crear un sistema más robusto
de medición

Introducción

Una característica importante y sumamente útil del NI myRIO es que tienen varios
indicadores, uno de estos es el indicador LED, ese funciona con lógica booleana, el valor
true enciende el LED y el valor false lo mantiene apagado.

Cuando se desea crear un sistema de medición más complejo y autónomo habitualmente se


agregan indicadores que permiten dar un panorama general sobre el status de nuestro
sistema, en este caso utilizaremos los LED para que nos indique el esta actual de la onda
que estamos generando.

Como observó en el ejercicio anterior la onda producida por nuestro micrófono no tiene una
amplitud mayor a .2 volts.

Desarrollo
1. Abra el diagrama de bloques del ejercicio anterior
2. Modifique el diagrama de bloques de tal manera que quede de la siguiente forma

Figura 1.Diagrama de bloques modificado

3. Conecte de acuerdo a las siguientes instrucciones.

[1]Less? Se encuentra haciendo clic derecho y luego en la paleta de comparación,


compara un numero X con un Y y si esto resulta ser menor, se obtiene una salida
true.
[2]Equal? Se encuentra en la paleta de comparación, compare un numero X con un
Y y si estos son iguales tiene como salida true.
[3]Greater? Se encuentra haciendo clic derecho y luego en la paleta de
comparación, compara un numero X con un Y y si esto resulta ser mayor tiene
como salida true.
[4]LED Este VI exprés se encuentra en la paleta de Funciones
> > myRIO> > Onboard devices y le permitirá configurar los LED, desde el nombre
así como los que le interesa utilizar.

4. Una vez terminadas las modificaciones guarde el VI y ejecute


5. Como pudo observar al producir un sonido la onda sigue igual pero en él NI myRIO
los LED están encendidos dependiendo del valor actualizado de la onda
Figure 2. NI myRIO con la nueva programación

FIN DEL EJERCICIO

Fuent es de Inf ormación


VI tomados de NI myRIO Project Essentials Guide ,12 Marzo de 2014,
http://w w w .ni.com/w hite-paper/14621/en/

Hoja de datos del NI myRIO 1900 http://w w w .ni.com/pdf/manuals/376047a.pdf

También podría gustarte