Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:python-ivi:readme [2013/04/08 01:14] – [Usage example] alex | en:python-ivi:readme [2014/02/12 19:28] (current) – [Usage example] alex | ||
|---|---|---|---|
| Line 8: | Line 8: | ||
| * Oscilloscopes (scope) | * Oscilloscopes (scope) | ||
| + | * Agilent InfiniiVision 2000A/3000A series | ||
| + | * Agilent InfiniiVision 6000A series | ||
| * Agilent InfiniiVision 7000A/B series | * Agilent InfiniiVision 7000A/B series | ||
| * Agilent Infiniium 90000A/ | * Agilent Infiniium 90000A/ | ||
| Line 13: | Line 15: | ||
| * Tektronix AWG2000 series | * Tektronix AWG2000 series | ||
| * DC Power Supplies (dcpwr) | * DC Power Supplies (dcpwr) | ||
| - | * Tektronix PS2520G/ | ||
| * Agilent E3600A series | * Agilent E3600A series | ||
| + | * Agilent 603xA series | ||
| + | * Rigol DP800 series | ||
| + | * Rigol DP1000 series | ||
| + | * Tektronix PS2520G/ | ||
| * RF Power Meters (pwrmeter): | * RF Power Meters (pwrmeter): | ||
| * Agilent 436A | * Agilent 436A | ||
| * RF Signal Generators (rfsiggen) | * RF Signal Generators (rfsiggen) | ||
| * Agilent 8642 A/B | * Agilent 8642 A/B | ||
| + | * Other | ||
| + | * Agilent 8156A optical attenuator | ||
| + | * Agilent 86140B series optical spectrum analyzer | ||
| + | * Colby Instruments PDL10A Programmable Delay Line | ||
| + | * DiCon Fiberoptics GP700 Programmable Fiberoptic Instrument | ||
| + | * JDS Uniphase TB9 Series Optical Grating Filter | ||
| + | * Tektronix AM5030 programmable current probe amplifier | ||
| + | * Tektronix OA5000 series optical attenuator | ||
| ===== Instrument communication ===== | ===== Instrument communication ===== | ||
| - | Python IVI can use Python VXI-11, pySerial and linux-gpib to connect to instruments. The implementation of the initialize method takes a VISA resource string and attempts to connect to an instrument. If the resource string starts with TCPIP, then Python IVI will attempt to use Python VXI-11. If it starts with GPIB, it will attempt to use linux-gpib' | + | Python IVI can use Python VXI-11, Python USBTMC, pySerial and linux-gpib to connect to instruments. |
| ===== A note on standards compliance ===== | ===== A note on standards compliance ===== | ||
| Line 30: | Line 42: | ||
| The Python IVI library is a Pythonized version of the .NET and COM IVI API specifications, | The Python IVI library is a Pythonized version of the .NET and COM IVI API specifications, | ||
| + | |||
| + | ===== Requirements ===== | ||
| + | |||
| + | * Python 2 or Python 3 | ||
| + | * One or more communication extensions | ||
| ===== Installation ===== | ===== Installation ===== | ||
| Line 38: | Line 55: | ||
| # python setup.py install | # python setup.py install | ||
| </ | </ | ||
| + | |||
| + | ==== Instrument Communication Extensions ==== | ||
| + | |||
| + | Python IVI does not contain any IO drivers itself. | ||
| + | |||
| + | === Python VXI11 === | ||
| + | |||
| + | Python VXI11 provides a pure python TCP/IP driver for LAN based instruments that support the VXI11 protocol. | ||
| + | |||
| + | Home page: | ||
| + | http:// | ||
| + | |||
| + | GitHub repository: | ||
| + | https:// | ||
| + | |||
| + | === Python USBTMC === | ||
| + | |||
| + | Python USBTMC provides a pure python USBTMC driver for instruments that support the USB Test and Measurement Class. | ||
| + | |||
| + | Home page: | ||
| + | http:// | ||
| + | |||
| + | GitHub repository: | ||
| + | https:// | ||
| + | |||
| + | === Linux GPIB === | ||
| + | |||
| + | Python IVI provides an interface wrapper for the Linux GPIB driver. | ||
| + | |||
| + | Home page: | ||
| + | http:// | ||
| + | |||
| + | === pySerial === | ||
| + | |||
| + | Python IVI provides an interface wrapper for the pySerial library. | ||
| + | |||
| + | Home page: | ||
| + | http:// | ||
| ===== Usage example ===== | ===== Usage example ===== | ||
| Line 48: | Line 103: | ||
| # connect to MSO7104A via LXI | # connect to MSO7104A via LXI | ||
| mso = ivi.agilent.agilentMSO7104A(" | mso = ivi.agilent.agilentMSO7104A(" | ||
| + | # connect to MSO7104A via USBTMC | ||
| + | #mso = ivi.agilent.agilentMSO7104A(" | ||
| # configure timebase | # configure timebase | ||
| mso.acquisition.time_per_record = 1e-3 | mso.acquisition.time_per_record = 1e-3 | ||
| Line 69: | Line 126: | ||
| # measure phase | # measure phase | ||
| phase = mso.channels[' | phase = mso.channels[' | ||
| + | # save screenshot to file | ||
| + | png = mso.display.fetch_screenshot() | ||
| + | with open(' | ||
| + | f.write(png) | ||
| + | # save setup to file | ||
| + | setup = mso.system.fetch_setup() | ||
| + | with open(' | ||
| + | f.write(setup) | ||
| + | # restore setup from file | ||
| + | with open(' | ||
| + | setup = f.read() | ||
| + | mso.system.load_setup(setup) | ||
| </ | </ | ||