How to install Py VISA+take measurement PDF

Title How to install Py VISA+take measurement
Author Chi V. Pham
Course Engineering Circuits
Institution University of California Davis
Pages 6
File Size 793.4 KB
File Type PDF
Total Downloads 101
Total Views 166

Summary

Download How to install Py VISA+take measurement PDF


Description

This manual shows how to set-up PyVISA and other python packages to remotely get waveform from oscilloscope and network analyzer Note: If you’ve already installed Python packages, please uninstall this and delete its corresponding folder. On this manual, you will download and install suggested packages to avoid software conflict. 1. First, install following packages. ALL of them are free a. NI VISA for Windows (free): http://www.ni.com/download/ni-visa-15.0.1/5693/en/ b. NI- 488.2 for Windows (free): http://www.ni.com/download/ni-488.2-16.0.0/6132/en/ c. Python 3.5 (free): https://www.python.org/downloads/release/python-351/ Choose to customize installation, create a folder C:\Python35. Check on options

d. Text editor (free): https://atom.io/ e. Keysight IO library to check instrument connections and address (free) http://www.keysight.com/main/software.jspx?id=2175637&pageMode=CV&cc=US& lc=eng 2. Enable all running services by Agilent and NI, then check Keysight Connection Expert and NI Max See results of installing below

Microwave Microsystems Laboratory- UC Davis

3. After installing all above packages, process to install pyVISA package a. Add Python to your system path by navigating to Start menu->Control panel->System>Advanced tab->Environment Variables and adding: C:\Python35 and C:\Python35\Scripts to the PATH variable. b. Restart your computer

Microwave Microsystems Laboratory- UC Davis

c. Download PyVISA 1.8 : https://pypi.python.org/pypi/PyVISA d. Extract this package PyVISA to C:\Python35 e. Open command line on Window, then navigate to PyVISA-1.8 folder f. Type: python setup.py install This should automatically install PyVISA to the C:\python\Lib\site-packages\ directory

g. Test your installation -

Using command line, navigating C:\Python35

-

Type: python. Then, type >>> import visa >>> rm = visa.ResourceManager() >>> print(rm.list_resources())

Microwave Microsystems Laboratory- UC Davis

4. Install Python packages: numpy and Matlabplot -

First, download two packages matplotlib-2.0.0b4-cp35-cp35m-win32.whl http://www.lfd.uci.edu/~gohlke/pythonlibs/#matplotlib numpy-1.11.2rc1+mkl-cp35-cp35m-win32.whl http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy

-

Copy the downloaded packages to C:\Python35

-

Open command line on Windown, navigate to C:\Python35

-

Run pip to install these packages: Pip install matplotlib-2.0.0b4-cp35-cp35m-win32.whl Pip install numpy-1.11.2rc1+mkl-cp35-cp35m-win32.whl

5. Next steps show how to take out measured data using MATLAB (example with normal TDR and TDT). a. Open NormalTDR.py using any text editor, change GPIB address (highlight part on figure below) if this address is different with your current setting, which shows on Keysight Connection Expert.

Microwave Microsystems Laboratory- UC Davis

b. Open PythonTestNormalTDR.m on MATLAB. Go to Editor, hit RUN or F5

c. This will ask you to Enter the file name for collected data on Command Window. Microwave Microsystems Laboratory- UC Davis

For example, type: RefNormalTDR.csv. The measured plot will pop up and you can see the RefNormalTDR.csv file on the folder directory where you are running the program

d. Repeat the steps for PythonTestVSWR.m

Microwave Microsystems Laboratory- UC Davis...


Similar Free PDFs