logo资料库

pyvisa官方文档.pdf

第1页 / 共198页
第2页 / 共198页
第3页 / 共198页
第4页 / 共198页
第5页 / 共198页
第6页 / 共198页
第7页 / 共198页
第8页 / 共198页
资料共198页,剩余部分请下载后查看
General overview
User guide
More information
Python Module Index
PyVISA Documentation Release 1.8 PyVISA Authors May 04, 2016
1 General overview 2 User guide 3 More information Python Module Index Contents 3 5 21 175 i
ii
PyVISA Documentation, Release 1.8 PyVISA is a Python package that enables you to control all kinds of measurement devices independently of the interface (e.g. GPIB, RS232, USB, Ethernet). As an example, reading self-identification from a Keithley Multimeter with GPIB number 12 is as easy as three lines of Python code: >>> import visa >>> rm = visa.ResourceManager() >>> rm.list_resources() ('ASRL1::INSTR', 'ASRL2::INSTR', 'GPIB0::12::INSTR') >>> inst = rm.open_resource('GPIB0::12::INSTR') >>> print(inst.query("*IDN?")) (That’s the whole program; really!) It works on Windows, Linux and Mac; with arbitrary adapters (e.g. National Instruments, Agilent, Tektronix, Stanford Research Systems). Contents 1
PyVISA Documentation, Release 1.8 2 Contents
CHAPTER 1 General overview The programming of measurement instruments can be real pain. There are many different protocols, sent over many different interfaces and bus systems (e.g. GPIB, RS232, USB, Ethernet). For every programming language you want to use, you have to find libraries that support both your device and its bus system. In order to ease this unfortunate situation, the Virtual Instrument Software Architecture (VISA) specification was de- fined in the middle of the 90ies. VISA is a standard for configuring, programming, and troubleshooting instrumentation systems comprising GPIB, VXI, PXI, Serial, Ethernet, and/or USB interfaces. Today VISA is implemented on all significant operating systems. A couple of vendors offer VISA libraries, partly with free download. These libraries work together with arbitrary peripherical devices, although they may be limited to certain interface devices, such as the vendor’s GPIB card. The VISA specification has explicit bindings to Visual Basic, C, and G (LabVIEW’s graphical language). However, you can use VISA with any language capable of calling functions in a shared library (.dll, .so, .dylib). PyVISA is Python wrapper for such shared library ... and more. 3
PyVISA Documentation, Release 1.8 4 Chapter 1. General overview
分享到:
收藏