La descarga está en progreso. Por favor, espere

La descarga está en progreso. Por favor, espere

Curso de Medidas Eléctricas 2016 CLASE 18 MEDIDAS AUTOMÁTICAS.

Presentaciones similares


Presentación del tema: "Curso de Medidas Eléctricas 2016 CLASE 18 MEDIDAS AUTOMÁTICAS."— Transcripción de la presentación:

1 Curso de Medidas Eléctricas 2016 CLASE 18 MEDIDAS AUTOMÁTICAS

2 Objetivo n Realizar medidas en forma automática desde un computador n Para ello son necesarios: –Interface física –Drivers para el sistema operativo –Programa de manejo de instrumentos –Comandos de configuración y adquisición de datos

3 Interfaces físicas n GPIB (IEEE 488) n RS232 n USB n LAN

4 Drivers n Se instalan para que el sistema operativo pueda reconocer el hardware. n Cada interface física tiene sus propios drivers. n GPIB n USB n LAN n SERIAL

5 Programa de aplicación n Se implementa la comunicación utilizando un programa de uso general. n Matlab n C++ n Labview n Etc…

6 Interfaces disponibles en Matlab n GPIB n VISA n UDP n TCP/IP n SERIAL

7 VISA (Virtual Instrument Software Architecture) n Es una API que permite comunicar el PC con diversos instrumentos y acceder a ellos como archivos para lectura y escritura. n Permite el desarrollo de programas independientes de la interface física

8 VISA (Virtual Instrument Software Architecture) n LA Virtual Instrument Software Architecture (VISA) es un standard para configuración, programación y lectura de instrumentos y sistemas basados en GPIB, VXI, PXI, Serial, Ethernet y USB. n Hay implmetaciones VISA para interfacear hardware desde programas como Matlab, LabVIEW, LabWindows/CVI y Measurement Studio de Microsoft Visual Studio.

9 VISA (Virtual Instrument Software Architecture) n Para acceder al instrumento desde Matlab debe definirse el intrumento virtual a partir de la funcion visa visa Construct visa object. OBJ = visa('VENDOR', 'RSRCNAME') constructs a visa object, OBJ, of type RSRCNAME. The possible VENDORs are: VENDOR Description ====== =========== agilent Agilent Technologies visa. ni National Instruments visa. tek Tektronix visa.

10 VISA (Virtual Instrument Software Architecture) RSRCNAME is a symbolic name for the instrument with the following format (values in brackets [] are optional): Interface RSRCNAME ========= ======== GPIB GPIB[board]::primary_address[::secondary_address]::INSTR VXI VXI[chassis]::VXI_logical_address::INSTR PXI PXI[bus_number]::device_number::INSTR Serial ASRL[port_number]::INSTR TCPIP TCPIP[board]::remote_host[::lan_device_name]::INSTR USB USB[board]::manid::model_code::serial_No[::interface_No]::INSTR

11 VISA (Virtual Instrument Software Architecture) Parameter Description ========= =========== board Board index (optional - defaults to 0). bus_number PCI bus number of the PXI instrument chassis Chassis index (optional - defaults to 0). device_number Device number of the PXI instrument interface_No USB interface. lan_device_name Local Area Network (LAN) device name (optional - defaults to inst0). manid Manufacturer ID of the USB instrument. model_code Model code for the USB instrument. port_number Com port number (optional - defaults to 1). primary_address Primary address of the GPIB device. remote_host Host name or IP address of the instrument. secondary_address Secondary address of the GPIB device (optional - if not specified, none is assumed). serial_No Index of the instrument on the USB hub. VXI_logical_address Logical address of the VXI instrument.

12 VISA (Virtual Instrument Software Architecture) n USB[board]::manid::model_code::serial_No[::interface_No]::INSTR n Parameter Description ========= =========== board Board index (optional - defaults to 0). interface_No USB interface. manid Manufacturer ID of the USB instrument. model_code Model code for the USB instrument. serial_No Index of the instrument on the USB hub. Se abre como un archivo con un fopen y se cierra como un archivo con un fclose Se escriben comandos usando fprintf y se lee usando fscanf

13 SCPI (Standard Commands for Programmable Instruments) n Es un conjunto de comandos que permiten configurar y leer datos de los instrumentos n La estructura es la misma para todos los fabricantes, solo hay pequeñas diferencias de sintaxis n Hay distintas jerarquías de comandos. Los generales definidos en el estandar IEEE, comandos de configuración, comandos de lectura

14 SCPI (Standard Commands for Programmable Instruments) n IEEE Mandated Commands n All SCPI instruments shall implement all the common commands declared mandatory by IEEE 488.2. n Mnemonic Name n *CLS Clear Status Command n *ESE Standard Event Status Enable Command n *ESE? Standard Event Status Enable Query n *ESR? Standard Event Status Register Query n *IDN? Identification Query n *OPC Operation Complete Command n *OPC? Operation Complete Query n *RST Reset Command n *SRE Service Request Enable Command n *SRE? Service Request Enable Query n *STB? Read Status Byte Query n *TST? Self-Test Query n *WAIWait-to-Continue Command

15 SCPI (Standard Commands for Programmable Instruments) n Comandos de medida n MEASure:VOLTage:DC? n MEASure:RES? n


Descargar ppt "Curso de Medidas Eléctricas 2016 CLASE 18 MEDIDAS AUTOMÁTICAS."

Presentaciones similares


Anuncios Google