El blog de Daniel Muñoz “No hay mayor riqueza que el conocimiento ni mayor pobreza que la ignorancia.” – Alí ibn Abi-Talib

22nov/102

Cartel de Texto Pasante en LabVIEW – Matriz de LEDs

Acabo de crear un VI que muestra un Cartel de Texto Pasante implementado con una matriz de LEDs.

Primero hay que crear una fuente personalizada con el VI: "Creador de Fuente.vi". (se incluye una fuente de muestra). Clic en la imagen para ver como utilizar"Creador de Fuente.vi":

Creador de Fuente

Creador de Fuente

Luego, desde el VI "Texto Pasante", hay que abrir la fuente creada y escribir un texto para que pase. Clic en la imagen para ver como utilizar"Texto Pasante.vi":

Texto Pasante

Descargar los archivos (para tu versión de LabVIEW):

texto_pasante_8.0.zip
texto_pasante_8.2.zip
texto_pasante_8.5.zip
texto_pasante_8.6.zip
texto_pasante_9.0.zip
texto_pasante_10.0.zip

La explicación de como funcionan los diagramas de cada VI queda para más adelante...

Archivado en: LabView 2 Comentarios
14nov/102

LabVIEW: InPort.vi y OutPort.vi en Windows Vista y Windows 7

Si han intentado utilizar los VIs de LabVIEW InPort.vi y OutPort.vi (y variantes) en Windows Vista o Windows 7 se habrán dado cuenta que no están en la paleta.

Esto es porque si LabVIEW se instala en Windows Vista o Windows 7 oculta esa paleta, aunque no elimina esa biblioteca de sus directorios. O sea, si la misma versión de LabVIEW que se instala en una máquina con Windows XP, y tiene esos VIs en su paleta, se instala en Windows Vista o Windows 7, no muestra esos VIs en su paleta.

National Instruments explica que eso es porque Microsoft desaconseja el acceso directo a puertos a partir de Windows Vista.

Pero si querés "desoír" el consejo de Microsoft, y usar esos VIs de todas formas, hacé lo siguiente:

  1. Abrí un "Blank VI".
  2. Tools -> Advanced -> Edit Palette Set

    Tools -> Advanced -> Edit Palette Set

    Tools -> Advanced -> Edit Palette Set

  3. Clic en un espacio en blanco de la paleta "Functions", y Insert -> Subpalette:

    Insert -> Subpalette

    Insert -> Subpalette

  4. Link to an LLB (.llb):

    Link to an LLB (.llb)

    Link to an LLB (.llb)

  5. Y buscar en el directorio de instalación de LabVIEW la librería "portaccess.llb". En mi instalación está en: C:\Archivos de programa\National Instruments\LabVIEW 2010\vi.lib\Platform\portaccess.llb.
  6. A la nueva subpaleta creada, la llamé "Puertos". Para renombrarla:

    Rename Subpalette

    Rename Subpalette

  7. Una vez terminado esto, hacer clic en "Save Changes":

    Save Changes

    Save Changes

  8. Ahora ya se deberían ver esos VIs en la paleta:

    Puertos

    Puertos

*******************************************************************
Atención: Debido a la gran cantidad de pedidos de ayuda con LabVIEW que estoy recibiendo he creado un nuevo sitio web de LabVIEW, donde pueden solicitar ayuda personalizada en LabVIEW (clic aquí).
*******************************************************************
Archivado en: LabView 2 Comentarios
1oct/1036

Consultas y trabajos en LabVIEW

Ir a: http://www.soslabview.com.ar/es/node/1

Archivado en: LabView 36 Comentarios
22may/0921

Puerto Paralelo en LabVIEW.

Acá va, especialmente para Oliver, un VI para trabajar con puerto paralelo. Espero que les sirva y cualquier cosa comenten. Saludos.

Paralelo.vi

Descargar VI.

Permite ver las tensiones en los pines del Puerto paralelo y leer/escribir a sus registros de entrada/salida (DATA, STATUS y CONTROL). Los colores oscuros indican tensiones bajas en los pines (FALSO) y los colores claros tensiones altas (VERDADERO). Algunas de estas tensiones se muestran/controlan invertidas en los registros DATA, STATUS y CONTROL.

Los registros DATA, STATUS y CONTROL se muestran como los ve el software, mientras que los colores se muestran como los ve el hardware. Paralelo.vi Paralelo.vi

(Imagen tomada de PC Parallel Port)

ci8 DATA El valor que el usuario introduzca aquí se escribirá al registro DATA del puerto (PORT+0). Se muestra en formato binario.
ci8 CONTROL El valor que el usuario introduzca aquí se escribirá al registro CONTROL del puerto (PORT+2). Se muestra en formato binario.
cu32 Actualizar cada (ms) Establece cada cuanto se actualizarán los valores, o sea, cada cuanto se leerá y escribirá el puerto.Recuerde que luego de actualizar el valor en algún control numérico debe presionar ENTER o hacer clic afuera de éste para que el valor se tome por actualizado.
ci16 Puerto Dirección del puerto a utilizar.Aunque solo hay 3 puertos predefinidos, se pueden agregar más en caso la PC tuviera otros.
cbool Salir Presione para terminar la ejecución del VI.
ibool 13 STATUS_4.
ibool 12 STATUS_5.
ibool -11 NOT_STATUS_7 (entra invertido).
ibool 10 STATUS_6.
ibool 9 DATA_7.
ibool 8 DATA_6.
ibool 7 DATA_5.
ibool 6 DATA_4.
ibool 5 DATA_3.
ibool 4 DATA_2.
ibool 3 DATA_1.
ibool 2 DATA_0.
ibool -1 NOT_CONTROL_0 (sale invertido).
ibool 25 GND.
ibool 24 GND.
ibool 23 GND.
ibool 22 GND.
ibool 21 GND.
ibool 20 GND.
ibool 19 GND.
ibool 18GND.
ibool -17 NOT_CONTROL_3 (sale invertido).
ibool 16 CONTROL_2.
ibool 15 STATUS_3.
ibool -14 NOT_CONTROL_1 (sale invertido).
ii8 STATUS Muestra el valor que hay en el registro STATUS del puerto (PORT+1). Se muestra en formato binario.

Paralelo.vi

In Port.vi In Port.vi C:\Archivos de programa\National Instruments\LabVIEW 8.6\vi.lib\Platform\portaccess.llb\In Port.vi
In Port8.vi In Port8.vi C:\Archivos de programa\National Instruments\LabVIEW 8.6\vi.lib\Platform\portaccess.llb\In Port8.vi
Out Port.vi Out Port.vi C:\Archivos de programa\National Instruments\LabVIEW 8.6\vi.lib\Platform\portaccess.llb\Out Port.vi
Out Port8.vi Out Port8.vi C:\Archivos de programa\National Instruments\LabVIEW 8.6\vi.lib\Platform\portaccess.llb\Out Port8.vi

Position in Hierarchy

Paralelo.vi

30abr/094

LabVIEW – DataSocket

Índice y descarga de este y otros ejemplos de programación en LabVIEW.<- Descargar este VI

Para configurar el DataSocket Server hay que ir a:

Inicio->Programas->National Instruments->DataSocket->DataSocket Server Manager.

Una vez ahí hay pararse sobre (por ejemplo) Predefined Data Items, y presionar el botón New Item. La descripción no importa. Hay que llamarlo: waveform_str para que funcione con el VI de ejemplo. O ponerle otro nombre pero después especificar ese nombre en la URL de los instrumentos. Debe ser de tipo String.

Una vez terminada esa configuración hay que cerrar esa ventana y abrir:

Inicio->Programas->National Instruments->DataSocket->DataSocket Server.

Este servidor debe estar abierto todo el tiempo que querramos transmitir los datos, pues se transmiten a través de este servidor. El generador envía los datos a este servidor y el osciloscopio los lee de acá.

1.7.2a.vi

Generador de señales con DataSocket.

Se conecta al DataSocket Server y envía los datos a éste servidor como una string llamada waveform_str.

El programa inicia intentando conectarse con el DataSocket Server en modo write. Si no puede conectarse espera 100ms y vuelve a intentarlo. Esto lo hace hasta que se pueda conectar.

Una vez conectado, genera una señal y la envía al DataSocket Server. Espera 100ms y vuelve a hacer lo mismo.

Si hay algún error al enviar los datos al DataSocket Server o si se presiona el botón stop (SALIR), sale del bucle WHILE, cierra la conexión y termina el programa.

Nota: Debe haber un DataSocket Server funcionando además de este generador y del osciloscopio 1.7.2b para poder conectarse. Ver DataSocket Server para información de como configurarlo.

1.7.2a.vi

1.7.2a.vi

cbool OFF reset signal, if TRUE, resets the phase to the phase control value and the time stamp to zero. The default is FALSE.
cdbl OFFSET offset is the DC offset of the signal. The default is 0.0.
cdbl FRECUENCIA frequency is the frequency of the waveform in units of hertz. The default is 10.
cdbl AMPLITUD amplitude is the amplitude of the waveform. The amplitude is also the peak voltage. The default is 1.0.
cdbl FASE phase is the initial phase, in degrees, of the waveform. The default is 0. The VI ignores phase if reset signal is FALSE.
cdbl DUTY CICLE square wave duty cycle is the percentage of time a square wave remains high versus low over one period. The VI uses this parameter only if the signal type is a square wave. The default is 50.
cdbl Fs Fs is the sampling rate in samples per second. The default is 1000.
cdbl NRO. MUESTRAS #s is the number of samples in the waveform. The default is 1000.
cu16 SEÑAL Tipo de señal: Senoidal, Triangular, Cuadrada o Diente de Sierra.
cbool stop Salir del programa.
cstr URLDirección del servidor DataSocket y nombre de la variable.

1.7.2a.vi

NI_MABase.lvlib:Basic Function Generator.vi NI_MABase.lvlib:Basic Function Generator.vi

C:\Archivos de programa\National Instruments\LabVIEW 8.6\vi.lib\measure\masignal.llb\Basic Function Generator.vi

1.7.2b.vi

Osciloscopio con DataSocket.

Se conecta al DataSocket Server y recibe los datos desde este servidor como una string llamada waveform_str.

El programa inicia intentando conectarse con el DataSocket Server en modo BufferedRead. Si no puede conectarse espera 100ms y vuelve a intentarlo. Esto lo hace hasta que se pueda conectar.

Una vez conectado, lee la señal desde el DataSocket Server y la muestra en el osciloscopio. Luego vuelve a repetir el mismo proceso hasta que haya algún error al recibir los datos del DataSocket Servero si se presiona el botón stop (SALIR). Si ocurre alguna de estas dos cosas sale del bucle WHILE, cierra la conexión y termina el programa.

Nota: Debe haber un DataSocket Server funcionando además de este osciloscopior y del generador 1.7.2a para poder conectarse. Ver DataSocket Server para información de como configurarlo.

1.7.2b.vi

1.7.2b.vi

cbool stop Termina el programa.
cdbl Ch1 VOLTS/DIV Canal 1.
cdbl Tiempo SEC/DIV de ambos canales (solo se usa el CH1).
cbool Ch1 CH1 ON.
cbool Ch2 CH 2 ON (no se usa).
cdbl Ch2 VOLTS/DIV Canal 2 (no se usa).
cstr URL URL del DataSocket Server y nombre de la variable.
i1dmsdt Waveform Graph Onda leída del DataSocket.

1.7.2b.vi

Osciloscopio.vi Osciloscopio.vi

C:\Documents and Settings\Daniel\Mis documentos\facu\5to\Digitales 3\1\Practico\Osciloscopio.vi

Etiquetado con: 4 Comentarios
30abr/097

LabVIEW – TCP/IP.

Índice y descarga de este y otros ejemplos de programación en LabVIEW.<- Descargar este VI

1.7.1a.vi

Servidor TCP/IP.

Envía la onda generada a la IP y puerto especificados.

En primer lugar intenta, cada 100ms, establecer una comunicación a la IP y puerto especificados. Cuando se establece la conexión empieza a enviar los datos.

Para enviar la onda primero la transforma a formato cadena (que es lo que se puede enviar por TCP/IP). Luego envía, también en formato cadena, el tamaño de esa cadena. La cadena que contiene el tamaño es un cast de int a vector de chars. Son 4 bytes. A continuación envía la cadena con los datos.

Este proceso (de envío) se repite cada 100ms siempre y cuando no haya error en la comunicación ni se presione el botón STOP.

Al finalizar, cierra la conexión TCP/IP.

1.7.1a.vi

1.7.1a.vi

cbool OFF reset signal, if TRUE, resets the phase to the phase control value and the time stamp to zero. The default is FALSE.
cdbl OFFSET offset is the DC offset of the signal. The default is 0.0.
cdbl FRECUENCIA frequency is the frequency of the waveform in units of hertz. The default is 10.
cdbl AMPLITUD amplitude is the amplitude of the waveform. The amplitude is also the peak voltage. The default is 1.0.
cdbl FASE phase is the initial phase, in degrees, of the waveform. The default is 0. The VI ignores phase if reset signal is FALSE.
cdbl DUTY CICLE square wave duty cycle is the percentage of time a square wave remains high versus low over one period. The VI uses this parameter only if the signal type is a square wave. The default is 50.
cdbl Fs Fs is the sampling rate in samples per second. The default is 1000.
cdbl NRO. MUESTRAS #s is the number of samples in the waveform. The default is 1000.
cu16 SEÑAL
cbool stop Se presiona este botón para salir.
cu16 Puerto Puerto remoto al que se enviarán los datos.
cstr ip IP remota donde se enviarán los datos.

1.7.1a.vi

NI_MABase.lvlib:Basic Function Generator.vi NI_MABase.lvlib:Basic Function Generator.vi

C:\Archivos de programa\National Instruments\LabVIEW 8.6\vi.lib\measure\masignal.llb\Basic Function Generator.vi

1.7.1b.vi

Cliente TCP/IP.

Escucha por conexiones entrantes TCP/IP en el puerto 2056.

Cuando se establece una conexión (supone que quien la estableció es el servidor 1.7.1a), lee primero los 4 bytes, que se supone contienen el tamaño de los datos que van a ser recibidos (porque así los envió 1.7.1a). Luego lee esa cantidad de bytes y transforma la cadena leída en un dato tipo waveform, que era el tipo de datos original en el servidor. El tipo de datos (la constante waveform) se crea afuera del bucle, para que no se tenga que estar creando una constante en cada repetición del bucle (para optimizar nomás). Una vez obtenida la forma de onda se la muestra en el osciloscopio.

Esto se repite hasta que:

1- Falle la lectura del tamaño de los datos.

2- Falle la lectura de los datos.

3- Falle la conversión de los datos a formato waveform.

4- Se presione el botón stop (SALIR).

Cuando ocurre alguna de las 4 cosas arriba mencionadas se cierra la conexión y termina el programa.

1.7.1b.vi

1.7.1b.vi

cbool stop SALIR: Presionando este botón se termina el programa.
cdbl Ch1 VOLTS/DIV de CH1.
cdbl Tiempo SEG/DIV de ambos canales.
cbool Ch1 CH1 ON.
cbool Ch2 CH2 ON.
cdbl Ch2 VOLTS/DIV de CH2.
i1dmsdt Waveform Graph Gráfico de la forma de onda recibida.

1.7.1b.vi

Osciloscopio.vi Osciloscopio.vi

C:\Documents and Settings\Daniel\Mis documentos\facu\5to\Digitales 3\1\Practico\Osciloscopio.vi

TCP Listen.vi TCP Listen.vi

C:\Archivos de programa\National Instruments\LabVIEW 8.6\vi.lib\Utility\tcp.llb\TCP Listen.vi

30abr/0919

LabVIEW – Comunicación RS-232 entre PCs.

Índice y descarga de este y otros ejemplos de programación en LabVIEW.<- Descargar este VI

1.5.1.vi

Envía o Recibe un archivo por puerto serie.

La acción predeterminada es Recibir. Cuando se está en modo recepción, se comprueba cada 500ms a ver si hay datos en el puerto. Como la transmisión se hace con el protocolo DTR/DSR, cuando se llena el buffer de entrada, la PC transmisora espera para seguir enviando. El cable debe ser FULL DUPLEX.

Cuando se cambia el modo a Enviar se abre un cuadro de diálogo pidiendo el archivo a enviar y lo envía.

El transmisor también envía el hash MD5 para que el receptor verifique que la transferencia fue correcta.

1.5.1.vi

1.5.1.vi

cbool stop
cvsrn Puerto VISA resource name specifies the resource to be opened. This control also specifies the session and class.
cstr Acción Acción: EnviarRecibir el archivo.
cu32 Baudios Velocidad de transmisión. Ambos programas, emisor y receptor, deben tener configurada la misma velocidad de transimisión.

1.5.1.vi

1.5.1.vi

1.5.1.vi

Merge Errors.vi Merge Errors.vi

C:\Archivos de programa\National Instruments\LabVIEW 8.6\vi.lib\Utility\error.llb\Merge Errors.vi

1.5.1.vi:Instance:0 File Dialog

File Dialog

RecibirArchivoPuerto.vi RecibirArchivoPuerto.vi

C:\Documents and Settings\Daniel\Mis documentos\facu\5to\Digitales 3\1\Practico\RecibirArchivoPuerto.vi

EnviarArchivoPuerto.vi EnviarArchivoPuerto.vi

C:\Documents and Settings\Daniel\Mis documentos\facu\5to\Digitales 3\1\Practico\EnviarArchivoPuerto.vi

EnviarArchivoPuerto.vi

Envía un archivo por puerto serie.

Abre el archivo en modo binario y extrae su contenido. Si hay error al leer el archivo, termina el programa. Sino, extrae el nombreMD5 del archivo y lo une con el contenido en un cluster.

En primer lugar se envía el tamaño del cluster recién armado y luego el cluster.

Se cierra la conexión y termina el programa.

EnviarArchivoPuerto.vi

cpath Archivo a enviar Ruta del archivo a enviar.
cvsrn Puerto (COM1) VISA resource name specifies the resource to be opened. This control also specifies the session and class.
cu32 Baudios (57600) Velocidad de transferencia. Debe ser la misma que en la otra PC.
cerrcodeclst error in error in can accept error information wired from VIs previously called. Use this information to decide if any functionality should be bypassed in the event of errors from other VIs.

Right-click the error in control on the front panel and select Explain Error or Explain Warning from the shortcut menu for more information about the error.

    cbool status status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.

    Right-click the error in control on the front panel and select Explain Error or Explain Warning from the shortcut menu for more information about the error.

    ci32 code code is the error or warning code.

    Right-click the error in control on the front panel and select Explain Error or Explain Warning from the shortcut menu for more information about the error.

    cstr source source describes the origin of the error or warning.

    Right-click the error in control on the front panel and select Explain Error or Explain Warning from the shortcut menu for more information about the error.

ierrcodeclst error out error in can accept error information wired from VIs previously called. Use this information to decide if any functionality should be bypassed in the event of errors from other VIs.

Right-click the error in control on the front panel and select Explain Error or Explain Warning from the shortcut menu for more information about the error.

    ibool status status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.

    Right-click the error in control on the front panel and select Explain Error or Explain Warning from the shortcut menu for more information about the error.

    ii32 code code is the error or warning code.

    Right-click the error in control on the front panel and select Explain Error or Explain Warning from the shortcut menu for more information about the error.

    istr source source describes the origin of the error or warning.

    Right-click the error in control on the front panel and select Explain Error or Explain Warning from the shortcut menu for more information about the error.

EnviarArchivoPuerto.vi

EnviarArchivoPuerto.vi

EnviarArchivoPuerto.vi

MD5Checksum File.vi MD5Checksum File.vi

C:\Archivos de programa\National Instruments\LabVIEW 8.6\vi.lib\Utility\MD5Checksum.llb\MD5Checksum File.vi

VISA Configure Serial Port (Instr).vi VISA Configure Serial Port (Instr).vi

C:\Archivos de programa\National Instruments\LabVIEW 8.6\vi.lib\Instr\_visa.llb\VISA Configure Serial Port (Instr).vi

VISA Configure Serial Port VISA Configure Serial Port

C:\Archivos de programa\National Instruments\LabVIEW 8.6\vi.lib\Instr\_visa.llb\VISA Configure Serial Port

RecibirArchivoPuerto.vi

Recibe un archivo por puerto serie.

Se abre la conexión y se comprueba si hay bytes esperando para ser leídos en el puerto (estarían almacenados en el caché).

Si no hay bytes esperando, se cierra la conexión y termina.

Si hay bytes esperando, se leen 4 bytes, que representa un int y que contiene el tamaño del cluster, en bytes, que se espera recibir. Luego se lee esa cantidad de bytes desde el puerto y se arma el cluster. Se pide al usuario un nombre de archivo, sugiriendole el mismo nombre que tenía en la otra PC. Se crea el archivo con el nombre sugerido, se guardan en él los datos y se cierra el archivo. Se comprueba si el hash MD5 del archivo recién creado es el mismo que el recibido de la otra PC. Sino, se envía un mensaje de error.

Se podrían hacer otras comprobaciones, como por ejemplo si el usuario canceló la operación presionando cancelar cuando se le pidió un nombre para el archivo. Pero si ocurre esto, simplemente habrá un error al crear el archivo con un nombre no válido en el siguiente paso y se propagará por los siguientes SubVIs. Y simplemente se terminará con un error.

RecibirArchivoPuerto.vi

cvsrn Puerto (COM1) VISA resource name specifies the resource to be opened. This control also specifies the session and class.
cu32 Baudios (57600) Velocidad de transferencia. Debe ser la misma que en la otra PC.
cerrcodeclst error in error in describes error conditions that occur before this VI or function runs.
    cbool status status is TRUE (X) if an error occurred before this VI or function ran or FALSE (checkmark) to indicate a warning or that no error occurred before this VI or function ran. The default is FALSE.
    ci32 code code is the error or warning code. The default is 0.
    cstr source source specifies the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.
ierrcodeclst error out error in can accept error information wired from VIs previously called. Use this information to decide if any functionality should be bypassed in the event of errors from other VIs.

Right-click the error in control on the front panel and select Explain Error or Explain Warning from the shortcut menu for more information about the error.

    ibool status status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.

    Right-click the error in control on the front panel and select Explain Error or Explain Warning from the shortcut menu for more information about the error.

    ii32 code code is the error or warning code.

    Right-click the error in control on the front panel and select Explain Error or Explain Warning from the shortcut menu for more information about the error.

    istr source source describes the origin of the error or warning.

    Right-click the error in control on the front panel and select Explain Error or Explain Warning from the shortcut menu for more information about the error.

RecibirArchivoPuerto.vi

RecibirArchivoPuerto.vi

RecibirArchivoPuerto.vi

RecibirArchivoPuerto.vi

RecibirArchivoPuerto.vi

VISA Configure Serial Port VISA Configure Serial Port

C:\Archivos de programa\National Instruments\LabVIEW 8.6\vi.lib\Instr\_visa.llb\VISA Configure Serial Port

VISA Configure Serial Port (Instr).vi VISA Configure Serial Port (Instr).vi

C:\Archivos de programa\National Instruments\LabVIEW 8.6\vi.lib\Instr\_visa.llb\VISA Configure Serial Port (Instr).vi

Merge Errors.vi Merge Errors.vi

C:\Archivos de programa\National Instruments\LabVIEW 8.6\vi.lib\Utility\error.llb\Merge Errors.vi

MD5Checksum File.vi MD5Checksum File.vi

C:\Archivos de programa\National Instruments\LabVIEW 8.6\vi.lib\Utility\MD5Checksum.llb\MD5Checksum File.vi

RecibirArchivoPuerto.vi:Instance:0 File Dialog

File Dialog

30abr/094

LabVIEW – Visualizador de Sonidos.

Índice y descarga de este y otros ejemplos de programación en LabVIEW.<- Descargar este VI

1.4.2.vi

Visualiza en un osciloscopio virtual los sonidos adquiridos mediante la placa de sonido.

Se configura el formato de sonido al principio y por única vez. Luego, en el bucle WHILE, se lee una muestra de sonido y se muestra en el osciloscopio.

Cuando se presiona el botón STOP se sale del bucle WHILE, borrando por única vez la configuración de la placa que se estableció al principio y saliendo del programa.

El sonido se toma en stereo, utilizando ambos canales del osciloscopio para mostrarlo.

1.4.2.vi

1.4.2.vi

cbool stop Se presiona para salir del programa.
cdbl Ch1 Voltios por división del canal 1.
cdbl Tiempo Segundos por división de ambos canales.
cbool Ch1 Canal 1 encendido.
cbool Ch2 Canal 2 encendido.
cdbl Ch2 Voltios por división del canal 2.
ci32 sample mode sample mode specifies whether the VI acquires samples just once (Finite Samples) or continuously (Continuous Samples).
ci32 number of samples/ch number of samples/ch specifies the number of samples per channel in the buffer.
cu32 device ID device ID is the input or output device you access for a sound operation. In general, most users should select the default value of 0.
cnclst sound format sound format sets the acquisition rate, the number of channels, and the bits per sample of the sound operation. The values for each of these controls is dependent on your sound card.
    cdbl sample rate (S/s) sample rate (S/s) sets the sampling rate for the sound operation. Common rates are 44,100 S/s, 22,050 S/s, and 11,025 S/s. The default is 22050 S/s.
    ci32 number of channels number of channels specifies the number of channels. This input can accept as many channels as the sound card supports. For most sound cards 1 is Mono and 2 is Stereo.
    ci32 bits per sample bits per sample specifies the quality of each sample in bits. Common resolutions are 16 bits and 8 bits. The default is 16 bits.
i1dmsdt Waveform Graph

1.4.2.vi

Sound Input Read.vi Sound Input Read.vi

C:\Archivos de programa\National Instruments\LabVIEW 8.6\vi.lib\sound2\lvsound2.llb\Sound Input Read.vi

Sound Input Read (DBL).vi Sound Input Read (DBL).vi

C:\Archivos de programa\National Instruments\LabVIEW 8.6\vi.lib\sound2\lvsound2.llb\Sound Input Read (DBL).vi

Sound Data Format.ctl Sound Data Format.ctl

C:\Archivos de programa\National Instruments\LabVIEW 8.6\vi.lib\sound2\lvsound2.llb\Sound Data Format.ctl

Sampling Mode.ctl Sampling Mode.ctl

C:\Archivos de programa\National Instruments\LabVIEW 8.6\vi.lib\sound2\lvsound2.llb\Sampling Mode.ctl

Sound Input Clear.vi Sound Input Clear.vi

C:\Archivos de programa\National Instruments\LabVIEW 8.6\vi.lib\sound2\lvsound2.llb\Sound Input Clear.vi

Osciloscopio.vi Osciloscopio.vi

C:\Documents and Settings\Daniel\Mis documentos\facu\5to\Digitales 3\1\Practico\Osciloscopio.vi

Sound Input Configure.vi Sound Input Configure.vi

C:\Archivos de programa\National Instruments\LabVIEW 8.6\vi.lib\sound2\lvsound2.llb\Sound Input Configure.vi

Etiquetado con: 4 Comentarios
30abr/093

LabVIEW – Generador de Sonidos.

Índice y descarga de este y otros ejemplos de programación en LabVIEW.<- Descargar este VI

1.4.1.vi

Genera una señal y la reproduce en la placa de sonido.

En primer lugar y por única vez, se configura la placa. Luego, dentro del bucle WHILE, se configura el volumen del sonido y luego se envía la onda a la placa. De esta forma el sonido se repite y da la impresión de que fuer contínuo. Ya fuera del bucle WHILE, y por única vez, se cancela la configuración de la placa y el programa termina.

Si el generador está apagado (presionando el botón OFF) se aguarda a que haya algún evento en el panel frontal para leer el valor del botón OFF, y si este está apagado, seguir reproduciendo el sonido.

1.4.1.vi

1.4.1.vi

cbool OFF Suspende el envío de sonido a la placa.
cdbl OFFSET offset is the DC offset of the signal. The default is 0.0.
cdbl FRECUENCIA frequency is the frequency of the waveform in units of hertz. The default is 10.
cdbl AMPLITUD amplitude is the amplitude of the waveform. The amplitude is also the peak voltage. The default is 1.0.
cdbl FASE phase is the initial phase, in degrees, of the waveform. The default is 0. The VI ignores phase if reset signal is FALSE.
cdbl DUTY CICLE square wave duty cycle is the percentage of time a square wave remains high versus low over one period. The VI uses this parameter only if the signal type is a square wave. The default is 50.
cdbl Fs Fs is the sampling rate in samples per second. The default is 1000.
cdbl NRO. MUESTRAS #s is the number of samples in the waveform. The default is 1000.
cu16 SEÑAL Tipo de la señal: Senoidal, Triangular, Cuadrada y Diente de Sierra.
cbool stop Sale del bucle principal para luego terminar el programa.

1.4.1.vi

1.4.1.vi

1.4.1.vi

NI_MABase.lvlib:Basic Function Generator.vi NI_MABase.lvlib:Basic Function Generator.vi

C:\Archivos de programa\National Instruments\LabVIEW 8.6\vi.lib\measure\masignal.llb\Basic Function Generator.vi

Sound Output Write.vi Sound Output Write.vi

C:\Archivos de programa\National Instruments\LabVIEW 8.6\vi.lib\sound2\lvsound2.llb\Sound Output Write.vi

Sound Output Write (DBL Single).vi Sound Output Write (DBL Single).vi

C:\Archivos de programa\National Instruments\LabVIEW 8.6\vi.lib\sound2\lvsound2.llb\Sound Output Write (DBL Single).vi

Sound Output Set Volume.vi Sound Output Set Volume.vi

C:\Archivos de programa\National Instruments\LabVIEW 8.6\vi.lib\sound2\lvsound2.llb\Sound Output Set Volume.vi

Sound Output Set Volume (Single).vi Sound Output Set Volume (Single).vi

C:\Archivos de programa\National Instruments\LabVIEW 8.6\vi.lib\sound2\lvsound2.llb\Sound Output Set Volume (Single).vi

Sound Data Format.ctl Sound Data Format.ctl

C:\Archivos de programa\National Instruments\LabVIEW 8.6\vi.lib\sound2\lvsound2.llb\Sound Data Format.ctl

Sound Output Clear.vi Sound Output Clear.vi

C:\Archivos de programa\National Instruments\LabVIEW 8.6\vi.lib\sound2\lvsound2.llb\Sound Output Clear.vi

Sound Output Configure.vi Sound Output Configure.vi

C:\Archivos de programa\National Instruments\LabVIEW 8.6\vi.lib\sound2\lvsound2.llb\Sound Output Configure.vi

Etiquetado con: 3 Comentarios
30abr/0919

LabVIEW – Osciloscopio.

Índice y descarga de este y otros ejemplos de programación en LabVIEW.<- Descargar este VI

1.3.2.vi

Genera dos ondas con dos SubVIs generadores de señales (desarrollados en 1.3.1) y las muestra utilizando el SubVI que simula un osciloscopio creado para este punto (1.3.2).

Dentro del bucle WHILE se aguarda a que se genere un cambio en el panel frontal antes de generar la siguiente forma de onda.

1.3.2.vi

1.3.2.vi

1.3.2.vi

Osciloscopio.vi Osciloscopio.vi

C:\Documents and Settings\Daniel\Mis documentos\facu\5to\Digitales 3\1\Practico\Osciloscopio.vi

1.3.1.vi 1.3.1.vi

C:\Documents and Settings\Daniel\Mis documentos\facu\5to\Digitales 3\1\Practico\1.3.1.vi

Osciloscopio.vi

Simula un osciloscopio.

Los acondicionadores de Amplitud y de Tiempo están diseñados de la siguiente manera: Suponiendo que el Waveform Graph (de salida) debe tener 10x10 divisiones en la pantalla, y debe tener escala fija en los siguientes rangos:

- Eje X: [0 10]

- Eje Y: [-5 5]

Osciloscopio.vi

cdbl V/Div CH1 Voltios por División para el canal 1.
cdbl Seg/DivS egundos por división para ambos canales.
cdbl V/Div CH2 Voltios por División para el canal 1.
cbool CH1 On Activa el canal 1.
cbool CH2 On Activa el canal 2.
cmsdt Onda Canal 1 Entrada de señal para el canal 1.
    • cdbl dt
      cbool status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning.

      The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed.

      ci32 code The code number identifies the error or warning.

      The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed.

      cstr source The source string describes the origin of the error or warning.

      The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed.

  • catrn t0
    cdbl dt
    c1ddbl Y
    cerrcodeclst error The error cluster contains error or warning information.

    The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed.

    cfxdt attributes
cmsdt Onda Canal 2 Entrada de señal para el canal 2.
    • cdbl dt
      cbool status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning.

      The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed.

      ci32 code The code number identifies the error or warning.

      The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed.

      cstr source The source string describes the origin of the error or warning.

      The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed.

  • catrn t0
    cdbl dt
    c1ddbl Y
    cerrcodeclst error The error cluster contains error or warning information.

    The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed.

    cfxdt attributes
i1dmsdt Gráfico (Waveform Graph)Grafico de la señal.

El Waveform Graph (de salida) debe tener 10x10 divisiones en la pantalla, y debe tener escala fija en los siguientes rangos:

- Eje X: [0 10]

- Eje Y: [-5 5]

Osciloscopio.vi

AcondicionamientoTiempo.vi AcondicionamientoTiempo.vi

C:\Documents and Settings\Daniel\Mis documentos\facu\5to\Digitales 3\1\Practico\AcondicionamientoTiempo.vi

AcondicionamientoAmplitud.vi AcondicionamientoAmplitud.vi

C:\Documents and Settings\Daniel\Mis documentos\facu\5to\Digitales 3\1\Practico\AcondicionamientoAmplitud.vi

AcondicionamientoAmplitud.vi

Acondiciona la amplitud de una waveform para mostrarla en un Waveform Graph (de salida) que debe tener 10x10 divisiones en la pantalla, y debe tener escala fija en los siguientes rangos:

- Eje X: [0 10]

- Eje Y: [-5 5]

AcondicionamientoAmplitud.vi

cdbl Ch1 Voltios por división en el canal.
cmsdt Onda de entrada (waveform) Onda de entrada a acondicionar en amplitud.
    • cdbl dt
      cbool status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning.

      The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed.

      ci32 code The code number identifies the error or warning.

      The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed.

      cstr source The source string describes the origin of the error or warning.

      The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed.

  • catrn t0
    cdbl dt
    c1ddbl Y
    cerrcodeclst error The error cluster contains error or warning information.

    The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed.

    cfxdt attributes
imsdt Onda de salida (waveform) Onda de salida ya condicionada en amplitud.
    • idbl dt
      ibool status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning.

      The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed.

      ii32 code The code number identifies the error or warning.

      The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed.

      istr source The source string describes the origin of the error or warning.

      The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed.

  • iatrn t0
    idbl dt
    i1ddbl Y
    ierrcodeclst error The error cluster contains error or warning information.

    The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed.

    ifxdt attributes

AcondicionamientoAmplitud.vi

AcondicionamientoTiempo.vi

Acondiciona el tiempo de una waveform para mostrarla en un Waveform Graph (de salida) que debe tener 10x10 divisiones en la pantalla, y debe tener escala fija en los siguientes rangos:

- Eje X: [0 10]

- Eje Y: [-5 5]

AcondicionamientoTiempo.vi

cdbl SEG / DIV Segundos por división en el canal.
cmsdt Onda de entrada (waveform)Onda de entrada a acondicionar en tiempo.
    • cdbl dt
      cbool status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning.

      The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed.

      ci32 code The code number identifies the error or warning.

      The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed.

      cstr source The source string describes the origin of the error or warning.

      The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed.

  • catrn t0
    cdbl dt
    c1ddbl Y
    cerrcodeclst error The error cluster contains error or warning information.

    The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed.

    cfxdt attributes
imsdt Onda de salida (waveform) Onda de salida ya condicionada en tiempo.
    • idbl dt
      ibool status The status boolean is either TRUE (X) for an error, or FALSE (checkmark) for no error or a warning.

      The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed.

      ii32 code The code number identifies the error or warning.

      The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed.

      istr source The source string describes the origin of the error or warning.

      The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed.

  • iatrn t0
    idbl dt
    i1ddbl Y
    ierrcodeclst error The error cluster contains error or warning information.

    The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed.

    ifxdt attributes

AcondicionamientoTiempo.vi